Single Server
The simplest deployment: everything on one server.
# Clone the repo (early-access only — see note above)cd /opt/modelreins
# Create a virtualenv and install dependenciespython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt
# Copy and edit the configcp .env.example .env# Edit .env — set DATABASE_URL, SECRET_KEY, and provider API keysStart the coordinator
Section titled “Start the coordinator”cd /opt/modelreinssource .venv/bin/activatepython -m modelreins.server --port 7420Systemd service (Linux)
Section titled “Systemd service (Linux)”Create /etc/systemd/system/modelreins.service:
[Unit]Description=ModelReins CoordinatorAfter=network.target postgresql.service
[Service]WorkingDirectory=/opt/modelreinsExecStart=/opt/modelreins/.venv/bin/python -m modelreins.server --port 7420EnvironmentFile=/opt/modelreins/.envRestart=on-failureUser=modelreins
[Install]WantedBy=multi-user.targetThen enable it:
sudo systemctl daemon-reloadsudo systemctl enable --now modelreinsAdd workers on the same machine
Section titled “Add workers on the same machine”Install the Companion app on the same host and point it at http://localhost:7420. See Add a Worker for details.
Reverse proxy
Section titled “Reverse proxy”Put the dashboard behind nginx with HTTPS:
server { listen 443 ssl; server_name modelreins.example.com;
ssl_certificate /etc/ssl/certs/modelreins.pem; ssl_certificate_key /etc/ssl/private/modelreins.key;
location / { proxy_pass http://localhost:7420; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; }}Verify
Section titled “Verify”curl http://localhost:7420/healthShould return 200 OK. Then open http://your-server:7420 in a browser to reach the dashboard.