Environment variables reference
Environment variables for Self-hosted Retool deployments.
Environment variables control or override certain functions and characteristics of Self-hosted Retool instances. Some Retool features require you to set environment variables, such as SSO or Source Control.
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.
ADMIN_API_ACCESS_TOKEN
If non-empty, Retool creates an API access token with the provided string value. Requires ADMIN_USER_EMAIL to be set to a valid email address of an admin user.
ADMIN_API_ACCESS_TOKEN=token
ADMIN_API_ACCESS_TOKEN_SCOPES
Comma-separated list of scopes to be assigned to the API access token created using ADMIN_API_ACCESS_TOKEN env variable.
ADMIN_API_ACCESS_TOKEN_SCOPES=source_control:read,source_control:write,groups:read,groups:write,spaces:read,spaces:write,folders:read,folders:write,permissions:all:read,permissions:all:write
ADMIN_USER_EMAIL
If non-empty, Retool creates an admin user with the provided email in the Admin Space.
ADMIN_USER_EMAIL=admin@example.com
ALLOW_SAME_ORIGIN_OPTION
Whether to use allow-same-origin for iframes and custom components. If this is not true
, custom components are heavily restricted in their behavior. Refer to the configure same-origin and sandbox guide to learn more.
Default value is false
.
ALLOW_SAME_ORIGIN_OPTION=false
API_CALLS_PER_MINUTE
Retool uses a point system for rate limiting where endpoint requests cost a certain number of points. The default is 300 points in a 60 second window. If you exceed this, Retool blocks any subsequent API calls for 60 seconds. You can increase the number of points with the API_CALLS_PER_MIN environment variable.
Default value is 300
.
API_CALLS_PER_MINUTE=300
AZURE_REPOS_MAIN_BRANCH=main
AZURE_REPOS_ORGANIZATION=my-organization
AZURE_REPOS_PERSONAL_ACCESS_TOKEN
The personal access token for the Azure DevOps organization user.
AZURE_REPOS_PERSONAL_ACCESS_TOKEN=mpoqd2zy7jklzfbhmuzev46vbbcpkeeqminb4wcvwigsrldasdfa
AZURE_REPOS_REPO=my-repo
AZURE_REPOS_USER=retool
BASE_DOMAIN
The full URL of your Retool deployment for user invitations and password resets. This also needs to be set if you dynamically set callback URLs on protected resources.
BASE_DOMAIN=retool.example.com
BITBUCKET_APP_PASSWORD=mpoqd2zy7jklzfbhmuzev46vbbcpkeeqminb4wcvwigsrldasdfa
BITBUCKET_MAIN_BRANCH=main
BITBUCKET_REPO=my-repo
BITBUCKET_USER=retool
BITBUCKET_WORKSPACE=my-workspace
A Google OAuth client app ID for OAuth-based authentication with Google (e.g., Google SSO with OIDC or using a Google Sheets resource).
CLIENT_ID=123456789012-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com
CLIENT_MAX_BODY_SIZE
On the https-portal
container, specify the maximum request body size, in bytes, megabytes (M
), or kilobytes (K
). Any upload that exceeds this limit results in a 413 HTTP error. Set to 0
to allow bodies of any size.
CLIENT_MAX_BODY_SIZE=40M
A Google OAuth client app secret for OAuth-based authentication with Google (e.g., Google SSO with OIDC or using a Google Sheets resource).
CLIENT_SECRET=abcdefghijklmnopqrstuvwxyz
CODE_COMMIT_AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
CODE_COMMIT_AWS_DEFAULT_REGION=us-west-2
CODE_COMMIT_AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
CODE_COMMIT_HTTPS_PASSWORD
The password for HTTPS authentication with the CodeCommit repository.
CODE_COMMIT_HTTPS_PASSWORD=mpoqd2zy7jklzfbhmuzev46vbbcpkeeqminb4wcvwigsrldasdfa
CODE_COMMIT_HTTPS_USERNAME
The username for HTTPS authentication with the CodeCommit repository.
CODE_COMMIT_HTTPS_USERNAME=retool
CODE_COMMIT_MAIN_BRANCH=main
CODE_COMMIT_REPOSITORY_NAME=my-repo
CODE_EXECUTOR_INGRESS_DOMAIN
The domain for the code-executor service that executes arbitrary user-defined JavaScript and Python code with installed custom libraries. The value depends on your deployment configuration, but must include a protocol (http://
or https://
).
CODE_EXECUTOR_INGRESS_DOMAIN=code-executor.example.com
CONTAINER_UNPRIVILEGED_MODE
Whether to run the code-executor service in an unprivileged mode and remove any sandboxing of user code.
Default value is false
.
CONTAINER_UNPRIVILEGED_MODE=false
COOKIE_INSECURE
Whether to send authentication requests using insecure cookies. Enable this if your Retool deployment uses a non-HTTPS URL or IP address. This is typically used when a Retool deployment is not yet configured with a custom domain.
Default value is true
.
COOKIE_INSECURE=true
CREATE_FIRST_ORG
If set to true
, Retool automatically creates the first organization on the instance. This is useful for automated provisioning of Retool instances.
Default value is false
.
CREATE_FIRST_ORG=true
CUSTOM_LOGOUT_REDIRECT=https://example.com/logout/success
The lifespan, in minutes, of custom OpenID provider tokens.
Default value is 120
.
CUSTOM_OAUTH2_SSO_ACCESS_TOKEN_LIFESPAN_MINUTES=60
An identifier for a resource to which users should have access upon completion of an OpenID authorization process.
CUSTOM_OAUTH2_SSO_AUDIENCE=https://retool.auth0.com/api/v2
Returns an array of strings where each string represents an OpenID group name. This setting is used with CUSTOM_OAUTH2_SSO_ROLE_MAPPING to map groups to Retool permission groups.
CUSTOM_OAUTH2_SSO_JWT_ROLES_KEY=idToken.groups
The mapping of roles from your OpenID provider to Retool permission groups.
CUSTOM_OAUTH2_SSO_ROLE_MAPPING=devops -> admin, support -> viewer
CUSTOM_OAUTH2_SSO_ROLE_MAPPING_DISABLED
Disables the mapping of roles from your OpenID provider to Retool permission groups. Set this variable to true to disable passing roles from JWTs.
CUSTOM_OAUTH2_SSO_ROLE_MAPPING_DISABLED=true
The endpoint for Retool to make an additional request for a fat token containing all available claims from your OpenID SSO provider.
CUSTOM_OAUTH2_SSO_USERINFO_URL=https://yourcompany.okta.com/oauth2/v1/userinfo
CUSTOM_RETOOL_SANDBOX_RESTRICTIONS
The JavaScript sandbox restrictions to allow. Specify space-separated values for multiple restrictions. Only configure custom sandbox restrictions if you are comfortable with the security implications.
allow-downloads | Allow downloads. |
allow-popups | Allow popups. |
allow-modals | Allow modals. |
CUSTOM_RETOOL_SANDBOX_RESTRICTIONS=allow-downloads
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.
DATABASE_MIGRATIONS_TIMEOUT_SECONDS=1000
DBCONNECTOR_NUM_WORKERS
The number of worker threads for the db-connector
container. The default value is Math.min(Math.max(1, numCPUs), 3)
, where numCPUs
is the number of logical CPU cores on the machine determined by Node.js.
DBCONNECTOR_NUM_WORKERS=4
DBCONNECTOR_POSTGRES_POOL_MAX_SIZE
The PostgreSQL connection pool maximum size.
Default value is 10
.
DBCONNECTOR_POSTGRES_POOL_MAX_SIZE=20
DBCONNECTOR_QUERY_TIMEOUT_MS
The duration, in milliseconds, for queries to run before timing out. If your Retool deployment is behind a load balancer, increase the load balancer's timeout by a proportionate amount.
Default value is 120000
.
DBCONNECTOR_QUERY_TIMEOUT_MS=120000
DEBUG=1
The default Retool user group for a Google SSO domain. Default groups only apply to new users who sign up using SSO, not existing users signing in.
DEFAULT_GROUP_FOR_DOMAINS=example1.org -> admin, example2.com -> viewer
DISABLE_AUDIT_TRAILS_LOGGING
Whether to disable logging of audit trails.
Default value is false
.
DISABLE_AUDIT_TRAILS_LOGGING=true
DISABLE_FORWARDABLE_COOKIE_DECODING
Whether to disable decoding of forwardable cookies.
Default value is false
.
DISABLE_FORWARDABLE_COOKIE_DECODING=true
DISABLE_GIT_SYNCING=true
DISABLE_IMAGE_PROXY
Whether to disable the proxy used for publicly embedded apps.
Default value is false
.
DISABLE_IMAGE_PROXY=true
DISABLE_INTERCOM
Disable Retool's support widget in the frontend. Refer to the Retool Support page to learn how to contact Retool.
Default value is false
.
DISABLE_INTERCOM=true
DISABLE_IPTABLES_SECURITY_CONFIGURATION
Whether to disable the default security configuration for link-local address, which is done by running the following startup commands requiring elevated privileges. Set to true
if privileged access (e.g NET_ADMIN) cannot be given to the container running Code executor service.
Default value is false
.
DISABLE_IPTABLES_SECURITY_CONFIGURATION=false
DISABLE_MEMORY_AND_CPU_USAGE_LOGGING
Whether to disable logging of memory and CPU usage.
Default value is false
.
DISABLE_MEMORY_AND_CPU_USAGE_LOGGING=true
DISABLE_PUBLIC_PAGES
Whether to disable public access to Retool apps. If set to true
, also set DISABLE_IMAGE_PROXY to true
to fully disable public access.
Default value is false
.
DISABLE_PUBLIC_PAGES=true
DISABLE_SOURCE_CONTROL_SYNCING
Whether to disable Source Control syncing changes with the repository. This only pauses the syncing process and protected items are unaffected.
Default value is false
.
DISABLE_SOURCE_CONTROL_SYNCING=true
Disable username and password authentication. If true, users can only log in using SSO.
DISABLE_USER_PASS_LOGIN=true
DOMAINS
The domains to use for EntityID in SAML requests and obtaining SSL certificates when setting up HTTPS.
DOMAINS=retool.your-domain.com -> http://api:3000
ENABLE_CLIENT_SIDE_CUSTOM_AUTH_BROWSER_CALLS
Whether to allow custom authentication steps for resources that make REST API calls directly from the browser. If true
, these requests include all browser credentials, even cross-origin calls.
ENABLE_CLIENT_SIDE_CUSTOM_AUTH_BROWSER_CALLS=true
ENABLE_CUSTOM_PLATFORM_LEVEL_AUTH_STEPS
Whether to allow configuration of custom authentication steps for users to perform whenever they log into Retool.
Default value is false
.
ENABLE_CUSTOM_PLATFORM_LEVEL_AUTH_STEPS=true
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.
ENCRYPTION_KEY=key
FORWARDABLE_SAME_DOMAIN_COOKIES_ALLOWLIST
Whether to send authentication requests using insecure cookies. When you have cookies scoped to your primary domain, you can use this variable to include those cookies in requests from the subdomain you host Retool on to your primary domain.
FORWARDABLE_SAME_DOMAIN_COOKIES_ALLOWLIST=cookieName
GITHUB_APP_ID=12345
GITHUB_APP_INSTALLATION_ID=12345
GITHUB_APP_PRIVATE_KEY
The GitHub App private key for the GitHub repository, formatted as a single-line. If you use Kubernetes Secrets, you must base64-encode this value twice.
GITHUB_APP_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDf7Zz7z7z7z7z7
GITLAB_MAIN_BRANCH=main
GITLAB_ORGANIZATION_NAME=my-organization
GITLAB_PROJECT_ACCESS_TOKEN=mpoqd2zy7jklzfbhmuzev46vbbcpkeeqminb4wcvwigsrldasdfa
GITLAB_PROJECT_ID=123
GITLAB_PROJECT_SLUG=company/eng/product-dev
GITLAB_REPOSITORY_NAME=my-repo
GITLAB_URL=https://gitlab.com
HIDE_ALL_HEADERS_IN_AUDIT_LOG_EVENTS
Whether to prevent all query headers and cookies from being added to audit log entries.
Default value is false
.
HIDE_ALL_HEADERS_IN_AUDIT_LOG_EVENTS=true
HIDE_PROD_AND_STAGING_TOGGLES
Whether to hide the Production and Staging toggles in the Retool interface.
Default value is false
.
HIDE_PROD_AND_STAGING_TOGGLES=true
HOST_HEADER_NAME
Retool backend expects Host
header to contain the host used in the original request. This is important for Spaces to work properly. If your self-hosted instance has a proxy or load-balancer in front of the Retool backend, you can specify a different header that contains the original host.
Default value is HOST_HEADER_NAME
.
HOST_HEADER_NAME=x-forwarded-host
HTML_ESCAPE_RETOOL_EXPRESSIONS
Whether to escape HTML in {{ }}
expressions. If set to true
, all HTML in expressions is escaped.
Default value is false
.
HTML_ESCAPE_RETOOL_EXPRESSIONS=true
HTTP_PROXY=http://proxy.example.com:8080
INVITES_PER_DAY=100
JIT_ENABLED=true
JWT_SECRET
The JWT secret token to sign requests for authentication with Retool's backend API server. If changed, all active user login sessions are invalidated.
JWT_SECRET=676765765327645bvbfgbsfhfbgr
KEEPALIVE_TIMEOUT
The keep alive timeout for queries, in seconds. Queries that exceed this limit results in a 514 HTTP error.
KEEPALIVE_TIMEOUT=1000
The organization's email domain in DC syntax when syncing Google Groups to Retool.
LDAP_BASE_DOMAIN_COMPONENTS=dc=example,dc=com
The mapping of Google LDAP Groups or SAML groups to Retool permission groups used for Google Group syncing and SAML role mapping.
LDAP_ROLE_MAPPING=retool-admins -> admin, support -> Support
LDAP_ROLE_MAPPING_DISABLED
Disable syncing SAML groups or Google Groups to Retool permission groups. When LDAP_ROLE_MAPPING is set and LDAP_ROLE_MAPPING_DISABLED is true, Retool logs the groups that would have synced to Retool when a user logs in.
LDAP_ROLE_MAPPING_DISABLED=true
The certificate from the downloaded bundle when syncing Google Groups to Retool.
LDAP_SERVER_CERTIFICATE=filename
The private key from the downloaded bundle when syncing Google Groups to Retool.
LDAP_SERVER_KEY=filename
LDAP_SERVER_NAME=ldap.google.com
The LDAP server URL for Google's Secure LDAP Service when syncing Google Groups to Retool.
LDAP_SERVER_URL=ldaps://ldap.google.com:636
LDAP_SYNC_ALL_GROUPS
Whether to sync all groups regardless of whether they're configured in the LDAP_ROLE_MAPPING environment variable. When enabled, new groups are created during SAML sync.
LDAP_SYNC_ALL_GROUPS=true
LDAP_SYNC_GROUP_CLAIMS=true
LICENSE_KEY=key_1234567890
LOG_AUDIT_EVENTS=true
LOG_LEVEL
The log level for Retool logs.
Default value is info
.
debug | Raw level logs. |
verbose | More verbose logs for git syncing, authentication, etc. |
info | Default logging level. |
LOG_LEVEL=debug
MOBILE_PUSH_NOTIFIER_API_TOKEN=token
MOBILE_PUSH_NOTIFIER_HOST
The host for the mobile push notifier service. Must be `https://spb8yl7d3j.execute-api.us-west-2.amazonaws.com.
MOBILE_PUSH_NOTIFIER_HOST=https://spb8yl7d3j.execute-api.us-west-2.amazonaws.com
NO_PROXY=localhost,*.service.company
NODE_ENV=production
NODE_OPTIONS
Used to specify the maximum heap size for the JavaScript v8 engine.
Default value is --max-old-space-size=1024
.
NODE_OPTIONS=--max-old-space-size=1024
NODE_TLS_REJECT_UNAUTHORIZED
Whether to reject unauthorized TLS certificates. This setting is insecure and not recommended for production instances
NODE_TLS_REJECT_UNAUTHORIZED=0