OOlgax DXP
Getting started

Configuration

Environment variables, database choice and secrets for an Olgax DXP site - PAYLOAD_SECRET, DATABASE_URL, NEXT_PUBLIC_SITE_URL and the optional Umami settings.

A generated project reads its configuration from .env. .env.example lists every variable with comments.

Environment variables

VariableRequiredPurpose
PAYLOAD_SECRETYesSigns sessions and tokens. The CLI generates a unique value for you.
DATABASE_URLNofile:./payload.db (SQLite, the default) or a postgres:// connection string
NEXT_PUBLIC_SITE_URLIn productionYour public URL. Needed when data-backed blocks fetch on the server.
NEXT_PUBLIC_UMAMI_SCRIPT_URLNoUmami tracker script URL
NEXT_PUBLIC_UMAMI_WEBSITE_IDNoUmami website id
NEXT_PUBLIC_UMAMI_DASHBOARD_URLNoLink target for the Umami card in the dashboard

Keep secrets per environment

Use a long, random PAYLOAD_SECRET for each environment, and never reuse your local one in production. Do not commit .env. The generated .gitignore already excludes it.

Database

payload.config.ts picks the adapter from DATABASE_URL:

  • A file: path uses SQLite. It needs no external service, which is why a new project runs immediately.
  • A value starting with postgres:// or postgresql:// uses Postgres.
.env
# Local development (default)
DATABASE_URL=file:./payload.db

# Production: any managed Postgres works (Neon, Supabase, Railway, Vercel Postgres, ...)
DATABASE_URL=postgres://user:password@host:5432/dbname

Switching to Postgres is an environment change, not a code change. Read Production before you point a real site at a database, especially for migrations.

Localization

Languages are defined once, in LOCALES in lib/i18n.ts. payload.config.ts reads the same list. The runtime on and off switch lives in the admin under Site Settings. See Localization.

Email

Payload logs verification and password reset emails to the console until you configure an email adapter. See Payload's email docs before launch.

Questions, ideas or something not working?

Ask in our official Discord, open an issue on GitHub, or edit this page.

On this page