Configuration Reference

EdgePress splits configuration into three layers, each with a different lifecycle.

Admin-managed (D1 settings table) — change anytime, no redeploy

SettingPurposeWrangler seed key
clientNameBrand name shown across UI, OG metadata, RSS, emailsCLIENT_NAME
clientTaglineHomepage subheadCLIENT_TAGLINE
clientLogoUrlHeader logo (replaces brand text when set)CLIENT_LOGO_URL
clientFaviconUrlCustom faviconCLIENT_FAVICON_URL
themePrimaryColorAccent color, injected as --theme-primaryTHEME_PRIMARY_COLOR
emailFromAddressResend From address. Domain must be verified in Resend. Ignored when EMAIL_PROVIDER=GMAIL.EMAIL_FROM_ADDRESS

Resolution at request time: DB row → wrangler.jsonc seed → hard-coded default. Saving an empty value in admin removes the override and falls back to the seed.

Wrangler vars — change requires redeploy

VarRequired whenPurpose
CLIENT_DOMAINalwaysCanonical URLs, sitemap, default Resend from (noreply@$CLIENT_DOMAIN), Astro site URL
CLIENT_SLUGalwaysFolder name under edgepress/ in the media bucket. Keeps tenant uploads isolated
CLIENT_FONToptionalGoogle Font family name (e.g. Inter, Playfair Display). Read at build time
MEDIA_PUBLIC_BASEalwaysPublic base URL of the R2 bucket. Used to build asset URLs after upload
EMAIL_PROVIDERalwaysRESEND or GMAIL

CLIENT_FONT is read at build time by astro.config.mjs, so changing it requires a redeploy.

Wrangler bindings

BindingTypeNotes
DBD1Per-tenant database. Binding name must always be "DB"
MEDIAR2Bucket for image / video uploads. Isolation is via CLIENT_SLUG prefix
ASSETSStatic assetsAstro's dist/ output

Secrets — wrangler secret put

SecretRequired whenPurpose
MASTER_ADMIN_KEYalwaysLogin key for /admin/login. Stored in an HttpOnly cookie after login
RESEND_API_KEYEMAIL_PROVIDER=RESENDResend API key (re_...)
GMAIL_USEREMAIL_PROVIDER=GMAILGmail address. Used as both SMTP login and the From: address
GMAIL_APP_PASSWORDEMAIL_PROVIDER=GMAILGmail App Password

Local development (.dev.vars)

.dev.vars is the Wrangler equivalent of .env — only loaded when wrangler dev runs. Do not commit it.

MASTER_ADMIN_KEY=local-dev-admin-key
RESEND_API_KEY=re_dev_xxx
GMAIL_USER=your-gmail@gmail.com
GMAIL_APP_PASSWORD=xxxxxxxxxxxxxxxx