Skip to Content
Self-HostingDocker Deployment

Docker Deployment

Nexora ships as a Docker Compose stack. This guide covers production deployment.

System requirements

ResourceMinimumRecommended
CPU2 cores4+ cores
RAM4 GB8+ GB
Disk20 GB50+ GB
OSUbuntu 22.04 / Debian 12Ubuntu 24.04
Docker24.0+Latest

Services

ServiceImagePortRole
nginxnginx:alpine80 (external)Reverse proxy
backendCustom (multi-stage)8000 (internal)FastAPI
frontendCustom3000 (internal)Next.js
postgrespostgres:16-alpine5432 (internal)Database
redisredis:7-alpine6379 (internal)Cache + pub/sub

Prepare the server

apt update && apt install -y docker.io docker-compose-plugin git systemctl enable --now docker

Clone and configure

git clone https://gitlab.com/parendum/nexora/nexora.git /opt/nexora cd /opt/nexora cp .env.example .env nano .env

Generate secrets

# SECRET_KEY openssl rand -hex 32 # ENCRYPTION_KEY (Fernet) python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

Start

make up

Run migrations

docker compose exec backend alembic upgrade head

Verify

make ps curl http://localhost/api/health

Logs

make logs # all services docker compose logs -f backend # backend only

Upgrades

git pull make up docker compose exec backend alembic upgrade head

Always run alembic upgrade head after pulling new code that includes migration files.

Backups

Database

docker compose exec postgres pg_dump -U nexora nexora > backup_$(date +%Y%m%d).sql

Restore

cat backup_20260101.sql | docker compose exec -T postgres psql -U nexora nexora

Persistent volumes

VolumeContents
postgres_dataDatabase files
redis_dataRedis persistence

Do not run make clean in production — it destroys these volumes.