HenniOKF
Documentation

Guide

Environment variables

Every variable of the application with its effect, default and the place where it is set.

What it is about

The operation of the application is configured only through environment variables. All start with HENNIOKF_. Their names stand with an explanation in .env.example, never with a real value. They are read in one place, lib/env.ts, and only at start: after a change you restart the application.

An empty value counts as not set. Spaces at the edge are dropped. An invalid value silently falls back to the default. Which value applies, The status page shows.

The variables

HENNIOKF_ROOT

The root directory of the instance, required. Below it the application creates what is missing, in phase 1 only users/ with the accounts database. A relative path counts relative to the directory in which the server starts.

There is no default path. Without the variable the application starts anyway, every protected page leads to /status, and that page says what is missing.

HENNIOKF_SYNC_TOKEN

The instance token. It protects creating the first admin, see The first admin; from the next phase it also starts a sync of the bundles without a session. Without it no first admin can be created. Create it with openssl rand -hex 32. /status only says whether it is set.

HENNIOKF_URL

The main address of the instance, such as https://<subdomain>.<domain>. Passkeys work only under exactly this address. If it is https, signing in over an http address in the network does not work. Without the variable, or if it is not an address with http or https, http://localhost:3370 applies.

HENNIOKF_AUTH_SECRET

The secret with which Better Auth protects the sessions, at least 32 characters. If it is missing or shorter, the application creates one and stores it under users/secret, readable only by itself. That is enough for most instances, because the root directory is backed up anyway. Whoever changes the secret signs out every session.

HENNIOKF_SIGN_IN_LIMIT

How many sign-in attempts an address has per minute, an integer from 1. Default 10. The browser tests set 100000, because they sign in more often within seconds than a human ever would.

Where you set them

WhereFileWhat stands there
development.env.local, a copy of .env.exampleroot directory ./.data, token, optionally the others
browser testsplaywright.config.ts under webServer.env.data-e2e, a token only for the tests, sign-in limit, the own address on port 3371
container locallyenvironment of the call of docker composetoken and address, see Compose locally
VPSdocker/.env after docker/vps.env.examplehost, token, path of the data, names of Traefik, see On a VPS with Traefik
imagedocker/DockerfileHENNIOKF_ROOT=/henniokf, PORT, HOSTNAME

Values of secrets never stand in the repository, in an address or in a log. .env.local and docker/.env are in .gitignore.

What is not a setting

HENNIOKF_COMMIT and HENNIOKF_BUILT_AT are set by the image when building. They name the version on /status and are not set by hand. All names at a glance, also those for Docker and the backup, are under Variables.

Next: Troubleshooting.