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.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/MonoRelay/llms.txt
Use this file to discover all available pages before exploring further.
- 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
Data persistenceDocker Compose creates a named volume (
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.| Variable | Description | Default |
|---|---|---|
TZ | Container timezone | Asia/Shanghai |
monorelay-data) mounted at /app/data. The following files are persisted across container restarts and upgrades:| File | Contents |
|---|---|
data/users.db | User accounts and roles |
data/requests.db | Full request and response log |
data/stats.json | Aggregated request statistics |
data/config.yml | Runtime configuration (written by the in-browser config editor) |
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
| Port | Service |
|---|---|
8787 | MonoRelay API and admin dashboard |
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.
| Path | Contents |
|---|---|
data/users.db | User accounts, roles, and OAuth identities |
data/requests.db | SQLite log of every request and response |
data/stats.json | Aggregated usage statistics |
data/config.yml | Config written by the in-browser editor (overrides config.yml) |
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