Docker
One container, one named volume. Use this for a trial, or on a server where you already run a reverse proxy.
Prerequisites
Section titled “Prerequisites”- 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.
Run it
Section titled “Run it”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.0Open http://localhost:8080 and sign in as admin@kinglet.local. If you did not
set KINGLET_ADMIN_PASSWORD, read the generated password:
docker exec kinglet cat /data/admin-password.txt127.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.
Environment variables
Section titled “Environment variables”Pass variables with -e, or keep them in a file and add --env-file .env:
KINGLET_BASE_URL=https://logs.example.comKINGLET_ADMIN_EMAIL=you@example.comKINGLET_ADMIN_PASSWORD=<strong-password># Encrypts notification channel secrets: openssl rand -base64 32KINGLET_SECRET_KEY=<generated key># Only behind a reverse proxy: the proxy's address, nothing wider.# KINGLET_TRUSTED_PROXIES=<proxy-ip>/32KINGLET_BASE_URLmust match the browser origin. Set it before the first public sign-in.BETTER_AUTH_SECRETis optional on a single instance: one is generated and kept in/data/auth-secret.txt.KINGLET_SECRET_KEYencrypts notification channel secrets and is needed to add channels. Keep a copy outside/data; see Encrypted channel secrets.KINGLET_TRUSTED_PROXIESstays 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.
Upgrade
Section titled “Upgrade”Back up /data, then replace the container with the same volume and a new tag:
docker pull ghcr.io/rushlightlab/kinglet:<new-version>docker stop kinglet && docker rm kinglet# rerun the docker run command above with the new tagMigrations run on boot. Read the changelog and the upgrade notes first.
Troubleshooting
Section titled “Troubleshooting”- Sign-in returns
403 INVALID_ORIGIN.KINGLET_BASE_URLdoes 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 andKINGLET_ADMIN_PASSWORDis unset, and the file is written only for a local database. Checkdocker logs kingletfrom 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 updateKINGLET_BASE_URL.- The container is
unhealthy. The image checks/healthzevery 30 seconds. Readdocker logs kinglet; a large migration can delay the first healthy check. - Data is gone after recreating the container. The
-v kinglet-data:/datamount was missing or named differently. Reuse the original volume name.