Truthbeam docs
v1.0.0
Get help
● Set up

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.

.envADMIN_SECRET_KEYPUBLIC_BASE_URL

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

VariableWhat it doesDefault
PORTThe port the server listens on (0 to 65535).8787optional
DATABASE_PATHThe 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 folderoptional
ADMIN_SECRET_KEYThe 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.generatedlive
ADMIN_SETUP_TOKENA 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.noneoptional
TRUST_PROXY_HOPSHow 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.0live
PUBLIC_BASE_URLThe 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.nonelive
UPLOAD_MAX_CONCURRENTHow many file uploads may stream to disk at the same time, over all installs (a whole number from 1 to 9999). See Uploads.8optional
ADMIN_DEMO_PASSWORDOnly 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.nonedemo only
ADMIN_DEMO_EMAIL, ADMIN_DEMO_NOTICEDemo server only: the demo account's e-mail and the banner text.built-in demo e-maildemo only

03Back up the secret key

Without it, saved keys are lost

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.

Never set it higher than the real number

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.