OpenDash targets single-binary Linux production deployments built for x86_64-unknown-linux-musl alongside three operator artifacts in cms/deploy/: install-linux.sh, opendash.service, and nginx.conf.example.
Step 1: Install or Upgrade with install-linux.sh
Run install-linux.sh as root against an extracted release bundle. The installer creates a dedicated non-login system account (opendash:opendash), stages the binary under /usr/local/lib/opendash/<version>/opendash, provisions 0700 directories under /var/lib/opendash, seeds /etc/opendash/opendash.env (0640 root:opendash), runs --check-config as user opendash, and atomically updates the /usr/local/lib/opendash/current symlink.
python3 cms/scripts/verify-release-artifact.py <bundle_dir>
sudo ./install-linux.sh --bundle-dir <extracted_bundle> --version <semver_or_sha> [--upgrade] [--external-db-dir <dir>]
Step 2: Configure config/site.json & Precedence Rules
Store persistent runtime configuration inside /var/lib/opendash/config/site.json (schema max 64 KiB, symlink/reparse targets rejected):
{
"version": 1,
"listen_ip": "127.0.0.1",
"port": 18766,
"trusted_public_origin": "https://cms.example.com",
"log_level": "info",
"recovery_safe_mode": false
}
Configuration Precedence & Environment Variables
RuntimeConfigV1::load evaluates settings in strict precedence order: defaults < config/site.json < explicit non-empty env overrides. Supported environment variables are OPENDASH_SITE_ROOT, OPENDASH_DB_PATH, OPENDASH_PORT, OPENDASH_PUBLIC_ORIGIN, and OPENDASH_LOG_LEVEL (error|warn|info|debug|trace).
Step 3: Configure the systemd Service Unit
Install cms/deploy/opendash.service to run OpenDash with strict filesystem sandboxing, zero ambient capabilities, pre-start configuration validation (ExecStartPre), and a 35-second graceful shutdown window for SQLite WAL checkpoints and subprocess workers:
[Unit]
Description=OpenDash CMS Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=opendash
Group=opendash
WorkingDirectory=/var/lib/opendash
EnvironmentFile=/etc/opendash/opendash.env
ExecStartPre=/usr/local/lib/opendash/current/opendash --check-config
ExecStart=/usr/local/lib/opendash/current/opendash
KillSignal=SIGTERM
TimeoutStopSec=35s
Restart=on-failure
RestartSec=5s
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/var/lib/opendash
CapabilityBoundingSet=
AmbientCapabilities=
LockPersonality=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
[Install]
WantedBy=multi-user.target
Step 4: Terminate TLS with Nginx
Proxy HTTPS traffic to 127.0.0.1:18766 while preserving Host and allowing full encrypted restore uploads (client_max_body_size 4100m with proxy_request_buffering off and 300s read/send timeouts):
server {
listen 80;
listen [::]:80;
server_name cms.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name cms.example.com;
ssl_certificate /etc/letsencrypt/live/cms.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cms.example.com/privkey.pem;
client_max_body_size 4100m;
location / {
proxy_pass http://127.0.0.1:18766;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_request_buffering off;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
}
}
Step 5: Verify Production Health & Safe Mode
Validate configuration as user opendash, reload Nginx, and probe the loopback health endpoint:
sudo -u opendash OPENDASH_SITE_ROOT=/var/lib/opendash /usr/local/lib/opendash/current/opendash --check-config
sudo nginx -t && sudo systemctl reload nginx
sudo systemctl enable --now opendash
sudo systemctl status opendash --no-pager
curl -sf http://127.0.0.1:18766/api/health
Encrypted Backups & Safe Recovery Mode: Admins can generate and restore single-file encrypted archives directly from Operations. When restoring onto a fresh directory without an explicit config/site.json clearing recovery state, the presence of READY.json starts the instance in recovery_safe_mode so plugins stay paused until an administrator verifies configuration and clears safe mode.