Skip to content

Docker

One container, one named volume. Use this for a trial, or on a server where you already run a reverse proxy.

  • Docker on a Linux host (amd64 or arm64), or Docker Desktop for a local trial.
  • For a public instance: a domain and a TLS reverse proxy (Caddy, nginx, or similar) in front of the container.
Terminal window
docker run -d --name kinglet \
--restart unless-stopped \
-p 127.0.0.1:8080:3000 \
-v kinglet-data:/data \
-e KINGLET_BASE_URL=http://localhost:8080 \
ghcr.io/rushlightlab/kinglet:0.5.0

Open http://localhost:8080 and sign in as admin@kinglet.local. If you did not set KINGLET_ADMIN_PASSWORD, read the generated password:

Terminal window
docker exec kinglet cat /data/admin-password.txt

127.0.0.1:8080 keeps the port on loopback. Drop the 127.0.0.1: prefix only if other machines must reach the container directly, and never without TLS in front of it. The container runs as the non-root node user (UID 1000); if you use a host bind mount instead of a named volume for /data, make sure the host directory is writable by UID 1000.

Pass variables with -e, or keep them in a file and add --env-file .env:

.env
KINGLET_BASE_URL=https://logs.example.com
KINGLET_ADMIN_EMAIL=you@example.com
KINGLET_ADMIN_PASSWORD=<strong-password>
# Encrypts notification channel secrets: openssl rand -base64 32
KINGLET_SECRET_KEY=<generated key>
# Only behind a reverse proxy: the proxy's address, nothing wider.
# KINGLET_TRUSTED_PROXIES=<proxy-ip>/32
  • KINGLET_BASE_URL must match the browser origin. Set it before the first public sign-in.
  • BETTER_AUTH_SECRET is optional on a single instance: one is generated and kept in /data/auth-secret.txt.
  • KINGLET_SECRET_KEY encrypts notification channel secrets and is needed to add channels. Keep a copy outside /data; see Encrypted channel secrets.
  • KINGLET_TRUSTED_PROXIES stays empty when clients reach Kinglet directly. See Common deployments for the value behind each proxy.

Everything else is in the configuration reference. Keep .env at mode 600 and out of Git.

Back up /data, then replace the container with the same volume and a new tag:

Terminal window
docker pull ghcr.io/rushlightlab/kinglet:<new-version>
docker stop kinglet && docker rm kinglet
# rerun the docker run command above with the new tag

Migrations run on boot. Read the changelog and the upgrade notes first.

  • Sign-in returns 403 INVALID_ORIGIN. KINGLET_BASE_URL does not match the origin in the browser. Fix it and recreate the container.
  • No admin-password.txt. A password is generated only when no administrator exists and KINGLET_ADMIN_PASSWORD is unset, and the file is written only for a local database. Check docker logs kinglet from the first boot.
  • address already in use. Something else holds host port 8080. Map a free port, such as -p 127.0.0.1:18080:3000, and update KINGLET_BASE_URL.
  • The container is unhealthy. The image checks /healthz every 30 seconds. Read docker logs kinglet; a large migration can delay the first healthy check.
  • Data is gone after recreating the container. The -v kinglet-data:/data mount was missing or named differently. Reuse the original volume name.