Nakama

Coolify

Coolify is a self-hosted PaaS that manages Docker deployments, reverse proxy, and SSL for you. Nakama runs on it via the Docker Compose resource type — no upstream template approval needed.

Deploy

  1. In your Coolify project, create a new resource → Docker Compose Empty.
  2. Paste the compose file below (or point Coolify at the repository's docker-compose.yaml directly).
  3. Click Deploy.
services:
  nakama:
    image: ghcr.io/ahmadrosid/nakama:latest
    ports:
      - "4310:4310"
    environment:
      - NAKAMA_CONFIG_DIR=/nakama/data
      # Optional: skip the browser setup wizard on first boot.
      # All three must be set together or none at all.
      # - NAKAMA_SEED_ADMIN_EMAIL=admin@example.com
      # - NAKAMA_SEED_ADMIN_NAME=Admin
      # - NAKAMA_SEED_ADMIN_PASSWORD=changeme123
      # Optional: public URL for OAuth callbacks and shared links.
      # - NAKAMA_WEB_PUBLIC_URL=https://nakama.example.com
    volumes:
      - nakama-data:/nakama/data
    restart: unless-stopped

volumes:
  nakama-data:

On first run, open the assigned domain and complete the setup wizard. To skip the wizard, uncomment the NAKAMA_SEED_* variables — all three are required together.

Environment variables

Set these in the Coolify UI under Environment Variables:

VariableRequiredPurpose
NAKAMA_SEED_ADMIN_EMAILTogether with the other twoAdmin email — skips setup wizard
NAKAMA_SEED_ADMIN_NAMETogether with the other twoAdmin display name
NAKAMA_SEED_ADMIN_PASSWORDTogether with the other twoAdmin password (min 8 chars)
NAKAMA_WEB_PUBLIC_URLRecommendedPublic URL Coolify assigns, e.g. https://nakama.example.com

Set NAKAMA_WEB_PUBLIC_URL to the domain Coolify routes to your service. Nakama uses it for OAuth callbacks and shared links.

SSE and reverse proxy

Nakama uses Server-Sent Events for streaming responses. Coolify's default Traefik proxy handles SSE correctly with no extra config.

If you use a custom Nginx proxy in front of Coolify, disable buffering for the Nakama location:

proxy_buffering off;
proxy_set_header X-Accel-Buffering no;

Healthcheck

The container ships a built-in healthcheck on GET /health. Coolify picks this up automatically — no extra configuration needed.

Next steps

On this page