Skip to main content

Environment variables

Below you can find a comprehensive list of environment variables used in particular services.

If you would like to find how to set correct environment on AWS check this guide.

backend service

Required variables:

NameDescriptionExample
DJANGO_DEBUGdocsTrue
DJANGO_SECRET_KEYdocsZs639zRcb5!9om2@tW2H6XG#Znj^TB^I
HASHID_FIELD_SALTdocst5$^r\*xsMRXn1xjzhRSl8I5Hb3BUW$4U
ADMIN_EMAILWill be used to create first super admin user[email protected]
ADMIN_DEFAULT_PASSWORDWill be used to create first super admin userAvPZpabgj9Z8

Required variables for Stripe usage:

NameDescriptionExample
STRIPE_TEST_SECRET_KEYUse this one for Stripe test mode. docssk_test_4dEFRCLCgCb
STRIPE_LIVE_SECRET_KEYUse this one for Stripe live mode. docssk_4dEFRCLCgCbMy6O4FX
DJSTRIPE_WEBHOOK_SECRETdocswhsec_12345
STRIPE_LIVE_MODE(bool) Set true or false to toggle between live and test Stripe mode. By default set to Falsetrue

Optional variables:

NameDescriptionExample
SENTRY_DSNSentry client keyhttps://(...)@(...).ingest.sentry.io/(...)
SOCIAL_AUTH_ALLOWED_REDIRECT_HOSTSAllowed hosts for OAuth redirection. Check Python Social Auth package documentation for more detailsapp.demo.saas.apptoku.com
SOCIAL_AUTH_FACEBOOK_KEYClient key for Facebook OAuth integration
SOCIAL_AUTH_FACEBOOK_SECRETClient secret for Facebook OAuth integration
SOCIAL_AUTH_GOOGLE_OAUTH2_KEYClient key for Google OAuth integration
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRETClient secret for Google OAuth integration
SUBSCRIPTION_TRIAL_PERIOD_DAYSNumber of days for subscription trial. By default set to 71
OPENAI_API_KEYOpenAI API for generative AI module

workers service

Required variables:

NameDescriptionExample
FROM_EMAILEmail used in From email field[email protected]
HASHID_SALTdocst5$^r\*xsMRXn1xjzhRSl8I5Hb3BUW$4U
JWT_SECRETSecret used to decode JWT used in subscriptions. The value needs to be the same as DJANGO_SECRET_KEY backend environment variable
WEB_APP_URLhttps://app.demo.saas.apptoku.com

Optional variables (in order to use contentful or sentry services):

NameDescription
CONTENTFUL_ACCESS_TOKENContentful API access token
CONTENTFUL_ENVIRONMENTContentful environment name
CONTENTFUL_SPACE_IDContentful Space ID
SENTRY_DSNSentry client key

webapp service

Required variables:

NameDescriptionExample
VITE_BASE_API_URLPath to access backend API/api
WEB_APP_URL
VITE_EMAIL_ASSETS_URLAbsolute URL to applicationhttps://example.com

Optional variables (in order to use contentful or stripe services):

NameDescription
VITE_CONTENTFUL_SPACEContentful Space ID
VITE_CONTENTFUL_TOKENContentful API access token
VITE_CONTENTFUL_ENVContentful environment name
VITE_STRIPE_PUBLISHABLE_KEYStripe Publishable key
VITE_SENTRY_DSNSentry client key
VITE_GOOGLE_ANALYTICS_TRACKING_IDGoogle Analytics 4 GTM ID