Skip to content

Environment reference

OpenPartner follows the principle that env is for secrets and build-time config; runtime content lives in the admin UI. So this list is shorter than you’d expect from competing products.

Required

VariableDescription
DATABASE_URLPostgres connection string.
SECRETS_ENCRYPTION_KEY32-byte hex. Used to encrypt SMTP passwords, Postmark tokens, etc.

Generate a key with:

Terminal window
openssl rand -hex 32

Optional

VariableDescription
OPENPARTNER_MODEselfhost (default), flat, or revshare. Gates billing layer.
COOKIE_DOMAINFirst-party cookie scope. Default: request host.
MAIL_FROMDefault From: address. Overridable in admin UI.
POSTMARK_SERVER_TOKENPostmark API token. Overridable in admin UI.
SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASSWORDSMTP fallback. Overridable.
STRIPE_SECRET_KEYRequired for Connect payouts on hosted tiers and for billing the merchant subscription.
STRIPE_WEBHOOK_SECRETWebhook signing secret(s). Accepts a single value or a comma-separated list — Stripe’s “Event destinations” UI uses separate destinations for platform-account vs connected-account events, so you’ll have two secrets to verify against.
STRIPE_FLAT_PRICE_IDStripe Price ID for the Hosted Flex monthly subscription (flat mode).
ADMIN_API_KEYBootstrap / CI bearer. Bypasses Admin user, behaves like a headless admin.

What’s NOT in env

These all live in the Config table and are managed from the admin UI:

  • Program name (the brand partners see)
  • Support email
  • Active mail transport (Postmark vs. SMTP vs. none)
  • Attribution model + lookback window
  • Commission rules

Why? You can rotate them without redeploying, and self-host customers don’t have to manage config in two places.