Prerequisites
1
System Requirements
- Node.js >= 20 (LTS recommended)
- pnpm (installed via
corepack enable && corepack prepare pnpm@latest --activate) - Build tools for
better-sqlite3native compilation:- Ubuntu/Debian:
sudo apt-get install -y python3 make g++ - macOS:
xcode-select --install
- Ubuntu/Debian:
2
Network Configuration
- Open port 3000 (or your custom port) for incoming HTTP/HTTPS traffic
- Configure reverse proxy (Nginx, Caddy, Traefik) for TLS termination
- Set up DNS records pointing to your server
3
Security Preparation
- Generate strong credentials:
- Prepare TLS certificates (Let’s Encrypt recommended)
- Configure firewall rules (allow only necessary ports)
Deployment Methods
Direct Deployment (systemd)
For direct Node.js deployments on Linux servers with systemd:1
Install dependencies and build
2
Create environment file
/opt/mission-control/.env
3
Create systemd service
/etc/systemd/system/mission-control.service
4
Start the service
Docker Deployment
For containerized deployments, see the Docker Deployment guide. Quick start:Reverse Proxy Configuration
Always deploy Mission Control behind a reverse proxy for TLS termination and security headers.High Availability Considerations
Single Instance with Failover
For production deployments, use active-passive failover:- Primary server: Runs Mission Control with mounted data volume
- Standby server: Warm standby with replicated data
- Health checks: Monitor primary server health
- Automatic failover: Promote standby on primary failure
Read Replicas (Future)
For read-heavy workloads, Mission Control may support read replicas in the future using SQLite’s WAL mode replication.Monitoring & Observability
Health Check Endpoint
Mission Control responds to health checks at the/login endpoint:
Systemd Journal Logs
View logs with journalctl:Docker Logs
Metrics (Recommended)
Integrate with monitoring platforms:- Prometheus: Export metrics via
/api/metricsendpoint (if configured) - Grafana: Visualize performance and usage dashboards
- Uptime monitoring: Pingdom, UptimeRobot, or Healthchecks.io
Backup Strategy
1
Stop the application
2
Backup the database
3
Restart the application
Automated Backups with Cron
Data Retention
Configure automatic cleanup of old data to prevent database growth:Upgrading
1
Backup the database
Follow the backup procedure before upgrading.
2
Pull the latest code or image
3
Restart the service
4
Verify the upgrade
Check logs for errors:Test critical functionality:
- Login with admin credentials
- Verify gateway connectivity
- Test API endpoints
Troubleshooting
”Database locked” errors
Ensure only one instance is running:“Module not found: better-sqlite3”
Native compilation failed. Reinstall with build tools:“Invalid ELF header” or “Mach-O” errors
Native binary was compiled on a different platform. Rebuild on the target server:“Forbidden” (403) errors
Host access control is blocking the request. Add your domain toMC_ALLOWED_HOSTS:
Production Checklist
1
Security
- Set strong
AUTH_PASSandAPI_KEY - Configure
MC_ALLOWED_HOSTSto restrict access - Enable
MC_COOKIE_SECURE=truefor HTTPS - Deploy behind reverse proxy with TLS
- Configure firewall rules
- Review Security Best Practices
2
Reliability
- Mount persistent volume for
/app/.data - Configure restart policy (
systemdor Docker) - Set up health checks
- Implement backup automation
- Test restore procedure
3
Monitoring
- Configure centralized logging
- Set up uptime monitoring
- Create alerting rules for errors
- Monitor disk usage for SQLite database
4
Performance
- Configure data retention policies
- Schedule regular database vacuuming
- Monitor SQLite WAL file growth