Configuration
By the end of this page you know every environment variable redfish reads, and how host isolation and the content security policy protect a deployment.
All configuration is read from the environment, usually through the .env file loaded by Compose. The file .env.example is the template, and secrets are never committed.
Environment variables
Section titled “Environment variables”| Variable | Use |
|---|---|
REDFISH_SECRET_KEY | High-entropy key of at least 32 bytes. Encrypts the sending-profile secrets stored in the database, so a stolen database is not enough to read them. Validated at startup: a missing or weak value stops the application. Generate one with openssl rand -base64 32. |
DATABASE_URL | Path to the SQLite database. Defaults to file:./data/redfish.db. |
ORIGIN | Public URL of the application, required by adapter-node. Set it to the address the browser uses, for example https://redfish.example.org. |
DASHBOARD_HOST | Host name that serves the operator dashboard. See Host isolation. |
TRACKING_HOST | Host name that serves the public tracking links (/t/*). See Host isolation. |
LITESTREAM_BUCKET, LITESTREAM_PATH, LITESTREAM_ENDPOINT, LITESTREAM_ACCESS_KEY_ID, LITESTREAM_SECRET_ACCESS_KEY | Continuous backup to S3-compatible storage. Optional, used by the backup Compose profile. See Operations. |
Sending profiles
Section titled “Sending profiles”A campaign sends mail through a sending profile, which holds the SMTP server, port and credentials for one organization. Each organization has its own profiles, so a campaign only ever sends through credentials you configured for that organization. The SMTP secrets are encrypted at rest with REDFISH_SECRET_KEY. You create and edit profiles from the operator dashboard. See Campaigns.
Host isolation
Section titled “Host isolation”In production you serve two things on two different host names: the operator dashboard, and the public tracking links that targets click. Set both DASHBOARD_HOST and TRACKING_HOST (include the port if it is not standard). When both are set:
/t/*is served only on the tracking host, and the operator application only on the dashboard host.- Any cross-host request, or a request to an unknown host, gets a
404. /_app/,/healthand/favicon.icoare served on both.
If either variable is empty, as in local development, no host restriction is applied and everything is served everywhere.
Content security policy
Section titled “Content security policy”redfish sends a strict content security policy: default-src 'self', no external origin, and script-src 'self' with a per-response nonce placed on the inline scripts, including the beacon on the landing page. It never uses 'unsafe-inline' for scripts. Inline styles stay allowed for the templates.
Your reverse proxy has a part to play. Configure it to:
- Not log request bodies, so nothing a target might type is ever written down.
- Not log the
CookieorAuthorizationheaders. - Forward the original
Hostheader, or set adapter-node’sHOST_HEADER, so host isolation works.
See Security for the full security model.