- Docker
- systemd
- Background script
- PM2
- Direct Python
Docker is the fastest path to a production-ready deployment. The official image is built on 2. Start the container3. Verify the container is healthyCommon commandsEnvironment variablesThe
python:3.12-slim and exposes port 8787.1. Copy and edit the configuration filedocker-compose.yml passes the following environment variables to the container. You can override them in a .env file or directly in docker-compose.yml.Data persistenceDocker Compose creates a named volume (
monorelay-data) mounted at /app/data. The following files are persisted across container restarts and upgrades:Your
config.yml on the host is mounted read-only at /app/config.yml. Edits made through the admin dashboard’s config editor are written to the persistent volume at /app/data/config.yml and take precedence.Port reference
Data persistence
Regardless of the deployment method, MonoRelay writes its runtime data to the./data/ directory (relative to the working directory where the server was started). All files in this directory should be backed up if you need to preserve logs and user accounts across reinstalls.
The
data/ directory is excluded from version control (.gitignore). Do not delete it while the server is running.Nginx reverse proxy
To serve MonoRelay over HTTPS or on a standard port, place Nginx in front of it. The following configuration proxies all traffic to MonoRelay on port 8787 and adds SSE-specific settings for the log stream endpoint.public_host in config.yml so MonoRelay generates correct API URLs in the admin dashboard:
config.yml