This repository contains the Docker Compose setup file that brings up all components of the OpenKor platform with a single command.
┌─────────────┐
│ korapi │ :8080 (API Gateway)
└──────┬──────┘
┌───────────────┼───────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ korauth │ │ korvm │ │ korvol │
│ :8081 │ │ :8082 │ │ :8083 │
└────┬─────┘ └────┬─────┘ └──────────┘
│ │
┌─────┴──────────────┴─────┐
│ │
┌────▼─────┐ ┌──────▼───┐
│ postgres │ │ redis │
│ :5432 │ │ :6379 │
└──────────┘ └──────────┘
| Service | Port | Description |
|---|---|---|
korapi |
8080 | Main API gateway, routes all incoming requests |
korauth |
8081 | Authentication and JWKS management |
korvm |
8082 | Virtual machine management (libvirt/KVM) |
postgres |
5432 | Primary database |
redis |
6379 | Cache and message queue |
- Docker >= 24.0
- Docker Compose >= 2.20
- A Linux host with KVM enabled (required for
korvm)lsmod | grep kvmoutput should showkvm_intelorkvm_amd- User must be in the
kvmgroup for/dev/kvmaccess:sudo usermod -aG kvm $USER
- libvirt must be installed and running (required for
korvm)/var/run/libvirt/libvirt-sockmust exist
This repository expects the following sibling directories:
projects/
├── openkor-installer/ # this repo
│ └── docker-compose.yml
├── korauth/
│ ├── Dockerfile
│ ├── .env # optional
│ └── keys/ # JWT signing keys
├── korvm/
│ ├── Dockerfile
│ └── .env # optional
├── korapi/
│ └── Dockerfile
└── korvol/
└── Dockerfile
git clone <korauth-repo-url> ../korauth
git clone <korvm-repo-url> ../korvm
git clone <korapi-repo-url> ../korapi
git clone <korvol-repo-url> ../korvolmkdir -p ../korauth/keys
# Generate RSA key pair
openssl genrsa -out ../korauth/keys/private.pem 2048
openssl rsa -in ../korauth/keys/private.pem -pubout -out ../korauth/keys/public.pemFor production, change the database password and other sensitive variables:
../korauth/.env
# Example — variable names depend on the service source code
JWT_ISSUER=https://auth.example.com../korvm/.env
# korvm-specific configurationMake sure to change
POSTGRES_PASSWORD: changemeindocker-compose.ymlbefore deploying to production.
docker compose up -dTo wait until all services pass their health checks:
docker compose up -d --waitcurl http://localhost:8080/healthzA 200 OK response indicates all services are up and running.
# Stream all logs live
docker compose logs -f
# Stream logs for a specific service
docker compose logs -f korapi
# Stop services (data is preserved)
docker compose down
# Stop services and delete all data
docker compose down -v
# Restart a single service
docker compose restart korauth
# Rebuild all images from scratch
docker compose build --no-cache
# Show the status of running services
docker compose psls -la /dev/kvm
# If it doesn't exist:
sudo modprobe kvm_intel # Intel CPU
sudo modprobe kvm_amd # AMD CPUsudo systemctl start libvirtd
ls -la /var/run/libvirt/libvirt-sockWait for the postgres service to reach the healthy state. The korauth and korvm services depend on it via depends_on, but if issues persist after a manual restart:
docker compose restart korauth korvmIf you suspect another process is using the required ports (8080, 8081, 8082, 5432, 6379):
lsof -i :8080- All services run on a bridge network named
openkor; only mapped ports are accessible from the outside. postgres_data— database filesimage_pool— virtual machine disk images used bykorvm
Running docker compose down -v will permanently delete these volumes.