# Klonkt — self-host with Docker Compose. # # 1. cp .env.example .env (works as-is: SESSION_SECRET is auto-generated; # optionally set PUBLIC_BASE_URL to your domain so # email/login links are correct) # 2. docker compose up -d # 3. open your site and create your admin account at /auth/register # # The app listens on port 3000. Put a reverse proxy (Caddy/nginx) in front for # HTTPS on your domain — see README. services: klonkt: build: . image: klonkt:latest restart: unless-stopped env_file: .env environment: # Inside the container it always runs on port 3000 in production mode and # binds all interfaces (so the port mapping works) — overrides .env. The # loopback host-mapping below is what keeps it off the public internet. NODE_ENV: production PORT: "3000" HOST: "0.0.0.0" ports: # Bind the host port to loopback only — reach the app through your reverse # proxy (Caddy/nginx) on this host, not directly from the internet. # Change the left side if 3000 is taken, e.g. "127.0.0.1:3001:3000". - "127.0.0.1:3000:3000" volumes: # All data (database, uploaded media + audio) is kept here. - klonkt-data:/app/storage volumes: klonkt-data: