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.
SITE_URLSite url where Lightdash is being hosted. It should include the protocol. E.g https://lightdash.mycompany.com

Lightdash also accepts all standard postgres environment variables

SMTP environment variables#

This is a reference to all the SMTP environment variables that can be used to configure a Lightdash email client.

VariableDescriptionRequired?Default
EMAIL_SMTP_HOSTHostname of email serverโœ…
EMAIL_SMTP_PORTPort of email server587
EMAIL_SMTP_SECURESecure connectiontrue
EMAIL_SMTP_USERAuth userโœ…
EMAIL_SMTP_PASSWORDAuth password[1]
EMAIL_SMTP_ACCESS_TOKENAuth access token for Oauth2 authentication[1]
EMAIL_SMTP_ALLOW_INVALID_CERTAllow connection to TLS server with self-signed or invalid TLS certificatefalse
EMAIL_SMTP_SENDER_EMAILThe email address that sends emailsโœ…
EMAIL_SMTP_SENDER_NAMEThe name of the email address that sends emailsLightdash

[1] EMAIL_SMTP_PASSWORD or EMAIL_SMTP_ACCESS_TOKEN needs to be provided