Installation

Ports and Directories

Port usage and installation directory layout after deploying Mopheus.

Ports and Directories

This page explains the ports occupied and the installation directory layout after deploying Mopheus. It applies to both Online Installation and Offline Installation.

Port Overview

ServiceDefault PortEnvironment VariableExposure Recommendation
Frontend (Web)3000FRONTEND_PORTMust be exposed — browser entry point
Backend (API)8080BACKEND_PORTMust be exposed — CLI / daemon entry point
PostgreSQL5432POSTGRES_PORTDo not expose — internal network only, or add firewall rules
SwissQL18080SWISSQL_PORTDo not expose — has management endpoints (requires SWISSQL_ADMIN_TOKEN), internal network only

Service URLs (based on .env configuration):

  • Frontend: http://<host-ip>:3000
  • Backend: http://<host-ip>:8080
  • SwissQL: http://<host-ip>:18080

Notes:

  • After changing a port, restart the services (./mopheus.sh restart) for it to take effect.
  • If a port is already in use, the container startup reports a port allocation error.
  • If PostgreSQL or SwissQL must be reachable externally, add firewall rules and make sure a strong password / SWISSQL_ADMIN_TOKEN is set.

Installation Directory Layout

The installation directory is chosen at deployment time (this doc uses /app/mopheus as an example). All persistent data lives under it:

/app/mopheus/                  # Installation directory (chosen at deployment)
├── .env                       # Configuration file (generated by init-env)
├── docker-compose.yml         # Service orchestration definition
├── data/                      # All persistent data (backup focus)
│   ├── pgdata/                #   PostgreSQL data
│   ├── uploads/               #   Uploaded files (see object storage note below)
│   ├── swissql_data/          #   SwissQL data
│   ├── swissql_audit/         #   SwissQL audit logs
│   └── swissql_jdbc_drivers/  #   SwissQL JDBC drivers
├── images/                    # Offline container images (offline package only)
├── logs/                      # Service logs
└── backups/                   # Configuration snapshots created by upgrades

uploads/ and Object Storage

data/uploads/ is the default local storage location — all uploaded attachments are saved here.

You can also switch storage to an S3-compatible object storage in the admin panel (Admin → System Configuration), with s3, oss, obs, cos, and minio drivers supported. Once switched, uploads no longer land in data/uploads/ but in the object storage bucket. See Admin Panel — System Configuration for the configuration keys and endpoint formats per cloud provider.

Restart the services after changing any storage setting for it to take effect.

Backup and Migration

All persistent data lives under data/ in the installation directory:

  • Backup: keep at least the entire data/ directory and the .env configuration file.
  • Migration: copy the whole installation directory to the new server (the path may differ) and run ./mopheus.sh start-server.
  • Upgrade: before changing files, the upgrade script automatically creates a configuration snapshot at backups/<old-version>-<timestamp>/. Data in data/ is never deleted.