Configuration
the server's settings file.
A handful of values live in the server's .env file because they are needed before the console starts. Everything else, including every provider key, is set in the console.
01The settings file
The server reads server/.env at start (npm start and npm run dev pass it to Node.js). Make it from the template with cp .env.example .env. Every value is optional for a first start on your computer; the ones marked live should be set before real users arrive. Keep .env out of any shared folder or repository.
02Every variable
| Variable | What it does | Default | |
|---|---|---|---|
PORT | The port the server listens on (0 to 65535). | 8787 | optional |
DATABASE_PATH | The SQLite file of the server's own data (installs, usage, check results, revenue). The console keeps its tables in a second file next to it, with .admin added before the extension. The folder is created when it does not exist. | a file in the data folder under the server folder | optional |
ADMIN_SECRET_KEY | The 32-byte key that encrypts the provider keys you save in the console. Make one with openssl rand -hex 32. Without it, the server makes a key on first start and keeps it in admin-secret.key next to the database. | generated | live |
ADMIN_SETUP_TOKEN | A one-time secret for creating the first console owner (24 characters or more, openssl rand -hex 24). Without it, the server prints a one-time setup code in its log instead. Remove it once the owner exists. | none | optional |
TRUST_PROXY_HOPS | How many reverse proxies you control in front of the server: 1 for Caddy or nginx, plus 1 for each CDN. The server uses it to find the real visitor address for its rate limits. | 0 | live |
PUBLIC_BASE_URL | The address the app and a browser reach the server at, for example https://checks.yourcompany.com. Links to shared verdict pages are made from it (…/s/…). It must be a plain http or https address without user name, query or #; anything else stops the server at start. Unset, sharing a verdict answers an error. | none | live |
UPLOAD_MAX_CONCURRENT | How many file uploads may stream to disk at the same time, over all installs (a whole number from 1 to 9999). See Uploads. | 8 | optional |
ADMIN_DEMO_PASSWORD | Only for a public demo server: turns the console into a read-only demo with this published password (12 characters or more). The demo account sees every setting with keys masked; saving, Test connection and export are refused, and no owner can be created. Leave it unset on your own server. | none | demo only |
ADMIN_DEMO_EMAIL, ADMIN_DEMO_NOTICE | Demo server only: the demo account's e-mail and the banner text. | built-in demo e-mail | demo only |
03Back up the secret key
The provider keys in the console are stored encrypted with ADMIN_SECRET_KEY. If the key changes or is lost, the server still starts, but every provider key has to be entered again. Keep a copy of the key in your password manager.
04Setting TRUST_PROXY_HOPS
Count the proxies between the internet and the server that you control. One Caddy or nginx in front of the server: TRUST_PROXY_HOPS=1. Caddy behind a CDN: 2. The server directly on the internet: leave it at 0.
One hop too many lets a visitor choose the address the server sees, which defeats the per-address rate limit.
05Everything else is in the console
Provider keys and switches, daily limits, media caps, how long results are kept, content, store and ad ids are all set in the console at /admin. See the Console guide.