Skip to content

Dokploy

Dokploy manages Traefik TLS and routes your domain over dokploy-network, so Kova’s Compose service uses expose and must not publish a host ports: mapping.

In your Dokploy project, click Create Service → Compose (Raw / editor mode).

docker-compose.yml
services:
kova:
image: ghcr.io/rushlightlab/kova:0.1.0
restart: unless-stopped
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
stop_grace_period: 15s
expose:
- "3000"
env_file:
- .env
volumes:
- kova_data:/data
volumes:
kova_data:

Dokploy writes the service’s Environment tab to .env, and env_file: .env loads every variable (including optional OIDC or storage settings you add later) into Kova. Without env_file: .env (or explicit environment: entries), variables never reach the container.

  1. In the Environment tab, paste and fill in:

    KOVA_BASE_URL=https://kova.example.com
    # Encrypts saved S3 credentials (32 bytes): openssl rand -hex 32
    KOVA_ENCRYPTION_KEY=<generated-64-hex-key>
    KOVA_ADMIN_EMAIL=you@example.com
    KOVA_ADMIN_PASSWORD=<strong-12+-char-password>
    KOVA_TRUSTED_PROXIES=<traefik-ip>/32

    Keep a backup of KOVA_ENCRYPTION_KEY in a password manager outside Dokploy. Replace <traefik-ip> with the /32 address from Trusted proxy.

  2. In Domains, click Add Domain, select the kova service, set Container Port to 3000, enable HTTPS, and pick Let’s Encrypt.

  3. Click Deploy and open https://kova.example.com. Redeploy after any change to Environment, Domains, or the Compose file.

Set KOVA_TRUSTED_PROXIES to the dokploy-traefik container IP on dokploy-network as a single /32:

Terminal window
docker inspect dokploy-traefik \
--format '{{(index .NetworkSettings.Networks "dokploy-network").IPAddress}}'

Set KOVA_TRUSTED_PROXIES=<ip>/32 in Environment and redeploy. Do not list the entire dokploy-network subnet—other apps share that network, and listing it lets them spoof forwarded client IPs. If Kova also sits behind Cloudflare CDN/Tunnel, see Reverse Proxies & Trusted IPs.

Back up /data/kova.db (see Backups & Key Rotation), bump ghcr.io/rushlightlab/kova:0.1.0 to the new release tag in the Compose editor, and click Deploy.

  • Pull fails with denied: denied: The image is public, so this almost always means a stale ghcr.io credential on the host. Run docker logout ghcr.io && docker pull ghcr.io/rushlightlab/kova:0.1.0 on the server (or remove the stale ghcr.io registry entry in Dokploy) and redeploy.
  • Sign-in returns INVALID_ORIGIN: KOVA_BASE_URL does not match the browser origin (check for http:// vs https:// or leftover kova.example.com). Fix it in Environment and redeploy.
  • HTTPS shows a 526 or Traefik’s default certificate: Ensure Let’s Encrypt is selected under Domains and redeploy. Behind Cloudflare, use Full (strict) once the origin certificate is valid.
  • address already in use: The Compose file publishes a host ports: mapping. Replace it with expose: ["3000"] and route via Domains.
  • Variables have no effect: Confirm env_file: .env is present under kova: and click Deploy again so the running container recreates with the updated .env.