typress
An editorial workshop.日本語

Configuration

From here on, pages are for developers and operators. typress has no config file; everything comes from environment variables. With the installer they live in /etc/typress/typress.env, which systemd loads.

Main variables

  • TYPRESS_MASTER_KEY: a 32-byte key (base64url) that encrypts two-factor secrets, AI API keys and similar. Required in production (NODE_ENV=production). Lose it and encrypted data can't be read, so keep a copy away from your data.
  • TYPRESS_PUBLIC_ORIGIN: the public URL, e.g. https://blog.example.com. Used for CSRF checks, cookies and absolute URLs in RSS and the sitemap. Defaults to http://localhost:<port>.
  • TYPRESS_DATA_DIR: where the database and media live. Defaults to ./data.
  • TYPRESS_PORT: listen port. Defaults to 4321.
  • NODE_ENV: production turns on production behaviour (Secure cookies, HSTS and so on).
  • TYPRESS_PLUGIN_SANDBOX: plugin lockdown. auto (default, use it when available), required (don't start plugins without it) or off.

Others

  • TYPRESS_ADMIN_ORIGIN: serve the admin on a different origin. Defaults to the public URL.
  • TYPRESS_COOKIE_DOMAIN: cookie domain.
  • TYPRESS_MAX_UPLOAD_BYTES: upload limit. Defaults to 5 GiB; 0 means no limit.
  • TYPRESS_SUDO_WINDOW_MS / TYPRESS_SUDO_MAX_MS: how long a confirmation lasts (default 20 minutes) and its hard cap (default 1 hour).
  • TYPRESS_TRUSTED_PROXY_HOPS: number of proxies in front (0 to 8, default 0). Used to determine the client IP for rate limiting.
  • TYPRESS_UPDATE_KEYS: comma-separated public keys trusted by typress admin self-update.

Example

# /etc/typress/typress.env  (root:typress 0640)
TYPRESS_MASTER_KEY=<output of: openssl rand 32 | base64 | tr '+/' '-_' | tr -d '='>
TYPRESS_DATA_DIR=/var/lib/typress
TYPRESS_PORT=4321
TYPRESS_PUBLIC_ORIGIN=https://blog.example.com
NODE_ENV=production
TYPRESS_PLUGIN_SANDBOX=required