Skip to content

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.

VariableUse
REDFISH_SECRET_KEYHigh-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_URLPath to the SQLite database. Defaults to file:./data/redfish.db.
ORIGINPublic URL of the application, required by adapter-node. Set it to the address the browser uses, for example https://redfish.example.org.
DASHBOARD_HOSTHost name that serves the operator dashboard. See Host isolation.
TRACKING_HOSTHost name that serves the public tracking links (/t/*). See Host isolation.
LITESTREAM_BUCKET, LITESTREAM_PATH, LITESTREAM_ENDPOINT, LITESTREAM_ACCESS_KEY_ID, LITESTREAM_SECRET_ACCESS_KEYContinuous backup to S3-compatible storage. Optional, used by the backup Compose profile. See Operations.

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.

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/, /health and /favicon.ico are served on both.

If either variable is empty, as in local development, no host restriction is applied and everything is served everywhere.

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 Cookie or Authorization headers.
  • Forward the original Host header, or set adapter-node’s HOST_HEADER, so host isolation works.

See Security for the full security model.