Sereal Docs

Configuration

Environment variables and runtime flags for a self-hosted Sereal.

Sereal is configured entirely through .env.local. Copy .env.example and fill it in. This page explains what each variable is for; the example file is the canonical list.

Boolean flags are strict. SELF_HOSTED, PUBLIC_SIGNUP_ENABLED, BILLING_ENABLED, and DEMO_TENANT_ENABLED accept only true, false, 1, or 0. Any other value ("True", "yes", an empty trailing space) throws at startup by design — see lib/config.ts. Fail fast beats quiet misconfig.

Required — Supabase

VariablePurpose
NEXT_PUBLIC_SUPABASE_URLProject URL. Browser-safe.
NEXT_PUBLIC_SUPABASE_ANON_KEYAnon public key. Browser-safe.
SUPABASE_SERVICE_ROLE_KEYService-role key. Server-only — never exposed to the browser.
SUPABASE_URLSame value as NEXT_PUBLIC_SUPABASE_URL; used by seed/bootstrap scripts.

Required — owner account

VariablePurpose
OWNER_EMAIL / OWNER_PASSWORDThe account the bootstrap script creates and you log in with.
PLATFORM_OWNER_EMAILGates instance-level metadata (the db_backups view in Account). For single-tenant self-host, set it equal to OWNER_EMAIL. Leave blank to fail closed.

Required — security

VariablePurpose
CRON_SECRETShared secret validating /api/cron/* requests. Generate with openssl rand -hex 32.

Self-host flags

Defaults preserve cloud behavior; for a personal install you'll typically set:

SELF_HOSTED=true            # disables signup, billing, and shared-key paths
PUBLIC_SIGNUP_ENABLED=false # signup is invite-only; not used on self-host
BILLING_ENABLED=false       # no billing code path
DEMO_TENANT_ENABLED=false   # no demo tenant on a personal install

Optional — eBay

VariablePurpose
EBAY_APP_ID / EBAY_CERT_IDYour own eBay app credentials. Leave blank to run without deal-watching, Scout, and comp lookup. Sereal will not ship shared credentials (ADR-001).

Optional — email and comps

VariablePurpose
RESEND_API_KEY or SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASSOutbound email for the daily deal digest. Skip entirely and the app still runs; you just get no email summaries.
DEAL_ALERT_EMAILWhere the deal digest is sent.
SOLDCOMPS_API_KEYExternal sold-comp data source; not required for core flows.
NEXT_PUBLIC_PLAUSIBLE_SRCAnalytics override for public funnel pages. Public client-side config, not a secret; loads only in production.

Verifying configuration

The health check reflects config state directly:

curl -sf http://localhost:3000/api/health | jq .checks.env

"ok" means every required variable is present and parseable. "fail" means something is missing or empty — and if you edited .env.local on Windows, a BOM or CRLF line ending can break parsing (dos2unix .env.local).

On this page