Skip to main content

Storage database environment variables

Reference documentation of environment variables for the postgres service and database.

Storage database environment variables available for use with Self-hosted Retool deployments.

Only configure environment variables when needed. You can configure many environment variables from your organization's Settings rather than directly editing your deployment's configuration file.

You must restart your instance after setting any variables for them to take effect.

DATABASE_MIGRATIONS_TIMEOUT_SECONDS

The timeout, in seconds, for database migrations. If the migration takes longer than this time, the migration fails. Consider setting a higher value if you're upgrading to another major version of Self-hosted Retool or the upgrade includes changes from multiple minor versions.

Type number
Format Integer
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
1000

ENCRYPTION_KEY

The encryption key used to encrypt data stored in the PostgreSQL database (e.g., database credentials, SSH keys, etc). If you change this key, you will lose access to all resources that were created before the change.

Type string
Format Plain Text
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
key

POSTGRES_CUSTOM_SSL_CA_FILE_NAME

The custom SSL CA file name for the PostgreSQL connection. This is required when configuring Google Cloud SQL as the database to use instead of Retool's PostgreSQL database.

Type string
Format Plain Text
ConfigurabilityUpdate the deployment's configuration file.
Required Required
Examples
ca.pem

POSTGRES_CUSTOM_SSL_CERT_PATH

The custom SSL certificate path for the PostgreSQL connection. This is required when configuring Google Cloud SQL as the database to use instead of Retool's PostgreSQL database.

Type string
Format File Path
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
/path/to/cert

POSTGRES_CUSTOM_SSL_KEY_FILE_NAME

The custom SSL key file name for the PostgreSQL connection. This is required when configuring Google Cloud SQL as the database to use instead of Retool's PostgreSQL database.

Type string
Format File Name
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
client-key.pem

POSTGRES_SSL_ENABLED

Whether to enable SSL for the PostgreSQL connection.

Type boolean
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
true

POSTGRES_SSL_REJECT_UNAUTHORIZED

Whether to reject unauthorized SSL certificates for the PostgreSQL connection if POSTGRES_SSL_ENABLED is true.

Type boolean
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
true

USE_GCM_ENCRYPTION

Whether to use AES-192-GCM authenticated encryption method instead of AES-192-CBC. If set to true, you must also set ENCRYPTION_KEY.

Type boolean
ConfigurabilityUpdate the deployment's configuration file.
Required Optional
Examples
true