Skip to main content

Environment variables

This is a reference to all environment variables that can be used to configure a Lightdash deployment.

VariableDescriptionRequired?Default
PGHOSTHostname of postgres server to store Lightdash dataโœ…
PGPORTPort of postgres server to store Lightdash dataโœ…
PGUSERUsername of postgres user to access postgres server to store Lightdash dataโœ…
PGPASSWORDPassword for PGUSERโœ…
PGDATABASEDatabase name inside postgres server to store Lightdash dataโœ…
PGCONNECTIONURIConnection URI for postgres server to store Lightdash data in the format postgresql://user:password@host:port/db?paramsThis is an alternative to providing the previous PG variables
LIGHTDASH_SECRETSecret key used to secure various tokens in Lightdash. This must be fixed between deployments. If the secret changes, you won't have access to Lightdash data.โœ…
SECURE_COOKIESOnly allows cookies to be stored over a https connection. We use cookies to keep you logged in. This is recommended to be set to true in production.false
TRUST_PROXYThis tells the Lightdash server that it can trust the X-Forwarded-Proto header it receives in requests. This is useful if you use SECURE_COOKIES=true behind a HTTPS terminated proxy that you can trust.false
LIGHTDASH_CONFIG_FILEPath to a lightdash.yml file to configure Lightdash. This is set by default and if you're using docker you shouldn't change it.

Lightdash also accepts all standard postgres environment variables