logo-color
← Go Back

.env File Information

We recommend just using our config generator but if you have additional customization you would like to perform, here is a cheat sheet to what all the environment variables do:

Option Required? Should you change? Description
SECRET_KEY_BASE TRUE NO Used internally for encryption
PASSWORD_KEY TRUE NO Used internally for encryption
DOMAIN TRUE YES (if incorrect)
URL TRUE YES (if incorrect)
SUBDOMAINS TRUE YES (if incorrect)
TWO_FACTOR_KEY TRUE NO Used internally for encryption
PUID TRUE NO Used internally
PGID TRUE NO Used internally
ONLY_SUBDOMAINS TRUE NO Used internally
VALIDATION TRUE NO Used internally
STAGING TRUE NO Used internally
DB_HOST TRUE NO Used internally
DB_USERNAME TRUE NO Used internally
DB_PASSWORD TRUE NO Used internally
DB_NAME TRUE NO Used internally
SENTRY_URL FALSE YES (if incorrect) Can be used for Error Tracking. Requires https://sentry.io API key
SMTP_ADDRESS TRUE YES (if incorrect) Your SMTP address
SMTP_PORT TRUE YES (if incorrect) Your SMTP port
SMTP_STARTTLS_AUTO TRUE YES (if incorrect) Your SMTP option
SMTP_USERNAME TRUE YES (if incorrect) Your SMTP username
SMTP_PASSWORD TRUE YES (if incorrect) Your SMTP password
USE_LOCAL_FILESYSTEM TRUE YES (if incorrect) Recommendation: false. When false, you need an Amazon S3/DigitalOcean Spaces/Wasabi/MinIO account with credentials. If true, leave S3 options below all blank.
S3_ENDPOINT FALSE YES (if incorrect) Can be left blank when using Amazon S3 only
S3_BUCKET FALSE YES (if incorrect) Bucket you are using
S3_ACCESS_KEY_ID FALSE YES (if incorrect) Access key of IAM user
S3_SECRET_ACCESS_KEY FALSE YES (if incorrect) Secret key of IAM user
S3_REGION FALSE YES (if incorrect) Region bucket is in
RAILS_ENV TRUE NO Used internally
RACK_ENV TRUE NO Used internally
RAILS_MAX_THREADS TRUE NO Used internally
REDIS_URL TRUE NO Used internally

If you are planning on hosting files directly on the server, (something we recommend against!) turn USE_LOCAL_FILESYSTEM to true and leave all S3 options blank.