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 caseCPURAMDiskOS
Up to ~20 users2 cores4 GB40 GB SSDUbuntu 22.04 / Debian 12 / RHEL 9
Up to ~100 users4 cores8 GB100 GB SSDAny Linux with Docker 24+
100+ users8+ cores16+ GB200 GB SSDDedicated 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:

ServiceImageRole
Backend APImunera-backendFastAPI application server
Frontendmunera-frontendNginx-served React SPA
Celery Workermunera-backendBackground task processor
Celery Beatmunera-backendScheduled task runner
Nginxnginx:alpineReverse proxy + TLS termination
PostgreSQLpostgres:15-alpinePrimary database
Redisredis:7-alpineCache, 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.