Skip to main content
MonoRelay supports five deployment methods. Docker is the recommended choice for most production environments because it handles dependencies, isolation, and data persistence automatically. If you prefer to run MonoRelay directly on the host, systemd and PM2 both provide automatic restart and log management.
Docker is the fastest path to a production-ready deployment. The official image is built on python:3.12-slim and exposes port 8787.1. Copy and edit the configuration file
2. Start the container
3. Verify the container is healthy
Common commands
Environment variablesThe docker-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.
After adding the Nginx config, set public_host in config.yml so MonoRelay generates correct API URLs in the admin dashboard:
config.yml