Skip to content

Environment variables

Pear reads the following settings at startup.

VariableDefaultDescription
PORT8080TCP port the web server listens on. The Docker image sets this to 80.
DB_PATHpear.dbPath to the SQLite-compatible database file. For Docker, keep it under the mounted /data directory (the image uses /data/pear.db).
SESSION_SECRETGenerated at startupStable secret used to sign and encrypt session cookies. Set a value of at least 64 bytes to keep sessions valid across restarts. If unset, a new key is generated on each start and existing sessions are invalidated.
INVITE_SECRETUnsetEnables account invitations. Enter this secret at /auth/invites to create one-time signup links. An empty value disables invite creation.
RESET_DBfalseWhen exactly true, deletes the database file at startup. This is destructive; do not enable it for persistent deployments.
CACHE_CONTROLpublic, max-age=31536000, immutableCache-Control header for static assets. Set to no-cache (or true) to disable caching, or provide another valid Cache-Control header value.

For example, generate a stable session secret for Docker with:

printf 'SESSION_SECRET=%s\n' "$(openssl rand -hex 64)" > .env

Keep .env private. Mount persistent storage at /data when running the Docker image so the database survives container replacement.