Skip to Content
Developer GuideEnvironment Variables

Environment Variables

The starter kit gives you a ready .env, so you rarely need to set these by hand. Hosting sets its own values. env.sample in the repository is the reference.

Never print, paste or commit .env, because it holds the site’s build login. Anything starting with NEXT_PUBLIC_ ends up in the browser, so keep secrets out of those.

Data service

VariableRequiredDescription
GODAAS_URLYesGoDaaS’s address, with no trailing slash. Without it, reads come back empty with a warning.
GODAAS_EMAIL, GODAAS_PASSWORDYes, or a tokenThe site’s read-only account. It can’t use two-factor authentication.
GODAAS_STATIC_TOKENInstead of the aboveA static token. If both are set, the email and password win.
GODAAS_RESOURCE_URIYesThe site’s URI, from Site details → Resource URI in Visor’s switcher. It limits reads to this site, and without it reads are refused.
GODAAS_TENANT_IDIf the account is in several organizationsThe organization’s ID. The kit always sets it.
GODAAS_MAX_RPSNoRequests started per second, per process. The default is 10.
GATEWAY_KEYOnly behind a gatewaySent with server requests when your deployment requires it.

Visor and build

VariableRequiredDescription
NEXT_PUBLIC_BUILD_MODEYesssr or ssg. See Rendering modes.
NEXT_PUBLIC_VISOR_URLYesVisor’s address, or several separated by commas. The website trusts editor messages only from these, and without it, it accepts any origin.
VISOR_FRONTEND_IDSet by hostingWhich frontend this website is. Unset, it follows the site’s active frontend. It isn’t in the kit’s .env.
NEXT_PUBLIC_SUB_SITENoA path prefix for a live website hosted below a domain’s root. ssg only.

Files

VariableRequiredDescription
NEXT_PUBLIC_FILE_URLNoA public bucket’s address for files. When empty, the live build downloads files into its output. Preview always uses Visor’s image route.
USE_SUPABASE_FILE_VERSIONINGNoAdds a version to public file addresses. It has no effect when NEXT_PUBLIC_FILE_URL is empty, or on preview.

Optional features

VariableDescription
NEXT_PUBLIC_GOOGLE_MAPS_API_KEYFor the faceted search’s map.
NEXT_PUBLIC_SITE_URLThe website’s address, for language links in search engines.

Things that aren’t variables

Older settings

If you’re updating an older site:

Old variableNow
NEXT_PUBLIC_DAAS_URLRemoved. Use GODAAS_URL, which is server-only.
DAAS_STATIC_TOKENUse GODAAS_EMAIL and GODAAS_PASSWORD, or GODAAS_STATIC_TOKEN.
NEXT_PUBLIC_TENANT_IDNot needed. GODAAS_RESOURCE_URI limits reads to the site.
Last updated on