Skip to Content
Authgate 1.7.0 is released 🎉
ConfigurationEnvironment Variables

Environment Variables

Authgate is configured using environment variables stored in the docker/.env file. Most of these are set automatically during installation, but you may want to change some later.

Database Settings

VariableDescriptionDefaultNotes
POSTGRES_DBDatabase nameauthgate-prodCan leave as-is
POSTGRES_USERDatabase usernamepostgresCan leave as-is
POSTGRES_PASSWORDDatabase passwordAuto-generated-
POSTGRES_DATA_PATHWhere database files are stored/path/to/your/authgate/docker/postgres-dataOnly change if needed
REDIS_PASSWORDRedis password (internal)Auto-generated-
REDIS_DATA_PATHWhere Redis data is stored/path/to/your/authgate/docker/redis-dataOnly change if needed

File Storage

VariableDescriptionDefaultNotes
FILE_STORAGE_PATHWhere uploaded files are stored/path/to/your/authgate/docker/uploaded-filesOnly change if needed

Admin Account

VariableDescriptionDefaultNotes
ADMIN_USERNAMEYour admin login usernameadminUsed to log into Authgate
ADMIN_PASSWORDYour admin login passwordSet during installUsed to log into Authgate

Domain & SSL

VariableDescriptionDefaultNotes
DOMAIN_NAMEYour domainSet during installe.g., auth.yourproject.com
PUBLIC_URLFull URL to AuthgateAuto-generatede.g., https://auth.yourproject.com
ENABLE_HTTPSUse HTTPStrueKeep as true for production

Port Configuration (Optional)

VariableDescriptionDefaultNotes
HTTP_PORTExternal HTTP port80Only change if needed
HTTPS_PORTExternal HTTPS port443Only change if needed

These are optional - only add them to your .env file if you need to use different ports.

Security Settings

VariableDescriptionDefaultNotes
SECRET_KEYUsed for JWT tokensAuto-generated-
FILE_CRYPTO_MASTER_KEY_B64Master key for file encryption keysAuto-generatedBase64 encoded. Don’t change after install
REQUEST_SIGNING_KEY_CRYPTO_MASTER_KEY_B64Master key for request signing keysAuto-generatedBase64 encoded. Don’t change after install
RESPONSE_SIGNING_KEY_CRYPTO_MASTER_KEY_B64Master key for response signing keysAuto-generatedBase64 encoded. Don’t change after install
AUTH_SECRETWeb session securityAuto-generated-

Changing Settings

To change any setting after installation:

  1. Stop Authgate:
cd docker docker compose down
  1. Edit the .env file with your changes

  2. Start Authgate again:

docker compose up -d

Warning: Don’t change encryption master keys (FILE_CRYPTO_MASTER_KEY_B64, REQUEST_SIGNING_KEY_CRYPTO_MASTER_KEY_B64, RESPONSE_SIGNING_KEY_CRYPTO_MASTER_KEY_B64) after installation, as this will break your existing data.

Last updated on