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.

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

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
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
1000

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
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
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
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
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
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
client-key.pem

POSTGRES_SSL_ENABLED

Whether to enable SSL for the PostgreSQL connection.

Type boolean
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
true

POSTGRES_SSL_REJECT_UNAUTHORIZED

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

Type boolean
Mutability
ControlUsage
ConfigurationUpdate the deployment's configuration file.
Examples
true