Self-Hosted Setup
Run Munera on your own infrastructure. Munera is fully containerised with Docker and runs anywhere Docker is available — on-premises servers, private cloud VMs, or air-gapped environments.
ℹ️
Self-hosted vs Cloud
The self-hosted edition gives you full control over your data, network, and deployment. You are responsible for provisioning infrastructure, SSL certificates, backups, and upgrades. For teams that want a managed experience, see the Cloud Quickstart.
System requirements
| Use case | CPU | RAM | Disk | OS |
|---|---|---|---|---|
| Up to ~20 users | 2 cores | 4 GB | 40 GB SSD | Ubuntu 22.04 / Debian 12 / RHEL 9 |
| Up to ~100 users | 4 cores | 8 GB | 100 GB SSD | Any Linux with Docker 24+ |
| 100+ users | 8+ cores | 16+ GB | 200 GB SSD | Dedicated DB and Redis instances recommended |
Required software: Docker 24.0+ and Docker Compose v2.20+. Ports 80 and 443 must be accessible from the internet; all other ports (5432, 6379, 8000) should remain internal.
Architecture overview
Munera consists of 7 services that communicate over a private Docker network:
| Service | Image | Role |
|---|---|---|
| Backend API | munera-backend | FastAPI application server |
| Frontend | munera-frontend | Nginx-served React SPA |
| Celery Worker | munera-backend | Background task processor |
| Celery Beat | munera-backend | Scheduled task runner |
| Nginx | nginx:alpine | Reverse proxy + TLS termination |
| PostgreSQL | postgres:15-alpine | Primary database |
| Redis | redis:7-alpine | Cache, message broker, session store |
Installation
Step 1 — Prepare the host
# Update packages and install Docker sudo apt-get update && sudo apt-get upgrade -y curl -fsSL https://get.docker.com | sh sudo usermod -aG docker $USER newgrp docker # Verify Docker is working docker --version docker compose version # Create the application directory sudo mkdir -p /opt/munera sudo chown $USER:$USER /opt/munera cd /opt/munera
Step 2 — Pull Docker images
docker pull ghcr.io/munera/munera-backend:latest docker pull ghcr.io/munera/munera-frontend:latest
⚠️
Air-gapped environments
If your host has no internet access, use
docker save on an internet-connected machine to export the images as tarballs, transfer them, then use docker load on the target host.Step 3 — Create your environment file
Create /opt/munera/.env.production with the following values:
# Required — generate with: openssl rand -hex 32 SECRET_KEY=your-64-char-secret-key ENCRYPTION_KEY=your-fernet-encryption-key # Database DATABASE_URL=postgresql+asyncpg://munera:password@postgres:5432/munera POSTGRES_PASSWORD=a-strong-database-password # Redis REDIS_URL=redis://:redis-password@redis:6379/0 # Application ENVIRONMENT=production FRONTEND_URL=https://your-domain.com CORS_ORIGINS=https://your-domain.com # AI (required for assignment features) OPENAI_API_KEY=sk-... # Email SENDGRID_API_KEY=SG.... FROM_EMAIL=noreply@your-domain.com
# Protect the secrets file chmod 600 /opt/munera/.env.production
Step 4 — Start the application
cd /opt/munera docker compose up -d # Run database migrations docker compose exec backend alembic upgrade head # Verify all containers are healthy docker compose ps
Step 5 — Configure SSL
Use Let's Encrypt (free) for TLS certificates:
sudo apt-get install -y certbot sudo certbot certonly --standalone -d your-domain.com # Certificates saved to /etc/letsencrypt/live/your-domain.com/
Munera's included nginx.conf is pre-configured to use Let's Encrypt certificate paths. Auto-renewal is handled by Certbot's systemd timer.
Verifying the installation
# Health check
curl -sf https://your-domain.com/health
# Expected: {"status": "healthy", "database": "connected", "redis": "connected"}Upgrading
cd /opt/munera # 1. Backup the database docker exec munera-postgres pg_dump -U munera munera \ | gzip > ./backups/pre-upgrade_$(date +%Y%m%d_%H%M%S).sql.gz # 2. Pull new images docker compose pull # 3. Run migrations docker compose run --rm backend alembic upgrade head # 4. Restart services docker compose up -d --no-build
🎉
Installation complete!
Navigate to
https://your-domain.com and sign in. Check the Configuration reference for advanced options including SSO, Slack, and monitoring.