Skip to main content

Environment Variables

Environment variables play a crucial role in configuring different aspects of your Appsmith instance, such as authentication, logging levels, email settings, and more. These variables are available in a configuration file located in your Appsmith installation directory. For example, if you’ve installed Appsmith using Docker, you’ll find the docker.env file under <Appsmith_Installation_Directory>/stacks/configuration. This page provides a detailed description of each environment variable, along with its purpose and usage.

Google OAuth

The following environment variables help in configuring OAuth 2.0 authentication with Google, enabling seamless login experiences and allowing Appsmith applications to authenticate users with their existing Google credentials.

APPSMITH_OAUTH2_GOOGLE_CLIENT_ID

This variable stores the Client ID provided by Google during OAuth 2.0 configuration. It's unique to your application, identifying you during the authentication process with Google's servers. Set this variable to the Google OAuth 2.0 Client ID available in your Google Cloud Platform console under the credentials section for your project.

APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET

This variable holds the Client Secret provided by Google for OAuth 2.0. The secret is confidential and used in server-to-server communications. Assign this variable with the Google OAuth 2.0 Client Secret obtained from the Google Cloud Platform console where you configured your OAuth credentials.

GitHub OAuth

The following environment variables help in configuring OAuth 2.0 authentication with GitHub, enabling seamless login experiences and allowing Appsmith applications to authenticate users with their existing GitHub credentials.

APPSMITH_OAUTH2_GITHUB_CLIENT_ID

This variable represents the GitHub OAuth 2.0 Client ID used for authenticating users via GitHub. It's a public identifier for your application. Get your GitHub OAuth 2.0 Client ID by registering your Appsmith instance as a GitHub OAuth application and setting it as the variable's value.

APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET

This variable, in conjunction with the Client ID, holds the secret key provided by GitHub OAuth 2.0 to authenticate your application's requests securely. Set this variable with the Client Secret provided by GitHub upon creating your OAuth application. Ensure that you store it securely and do not expose it publicly.

OIDC OAuth

The following environment variables help in configuring OAuth 2.0 authentication with your OIDC provider, enabling seamless login experiences and allowing Appsmith applications to authenticate users with their existing OIDC credentials.

APPSMITH_OAUTH2_OIDC_CLIENT_ID

This variable represents your OIDC OAuth 2.0 Client ID used for authenticating users via the OIDC provider. It's a public identifier for your application. Get your OIDC OAuth 2.0 Client ID by registering your Appsmith instance with your provider and setting it as the variable's value.

APPSMITH_OAUTH2_OIDC_CLIENT_SECRET

This variable, in conjunction with the OIDC Client ID, holds the secret key provided by your OIDC provider to authenticate your application's requests securely. Set this variable with the Client Secret provided by your provider upon creating your OIDC application. Ensure that you store it securely and do not expose it publicly.

Form Login and Signup

With Appsmith, you can manage user access and authentication methods in your instance. This helps streamline logins and control who can create accounts on the platform.

APPSMITH_FORM_LOGIN_DISABLED

Set to true to turn off the default username and password login. Useful for administrators who want to enforce Single Sign-On (SSO) or limit authentication methods for added security and control.

APPSMITH_SIGNUP_DISABLED

Set to true to stop new user account creation. Useful when you want to restrict access to your Appsmith instance, allowing only users who have been specifically invited to join.

Client logging

Appsmith provides a way to enhance the log levels of your applications, aiding in monitoring client-side operations and troubleshooting issues. The following environment variable helps define the verbosity level of the logs that Appsmith will generate for client-side activities.

APPSMITH_CLIENT_LOG_LEVEL

This variable determines the level of detail that your client-side logs will capture. Ordered by their severity logging levels can also be adjusted based on the needs of your environment. The available levels are:

  • debug: Provides informational logs useful for debugging. Set the level to 0 to turn on the debug log level.
  • error: Logs error events that might signify a problem and warrant investigation. Set the level to 1 to turn on the error log level.

Email server

Configure your email server in Appsmith to handle application emailing needs. The following environment variables enable you to set up and manage these email-related capabilities for your Appsmith instance.

APPSMITH_EMAIL_ENABLED

Controls whether Appsmith can send emails. Use true to enable email capabilities or false to disable it.

APPSMITH_EMAIL_SERVER_HOST

Specifies the host address of the email server that Appsmith will use to send emails. This is part of the SMTP server configuration necessary for email delivery. Set this variable to the fully qualified domain name or IP address of your email server.

APPSMITH_EMAIL_SERVER_PORT

Indicates the port number on which the email server is listening. Different services use different ports; for example, port 25 for non-encrypted transport, 587 for submission with StartTLS, and 465 for SMTPS (deprecated). Select the appropriate port that corresponds to your email server's setup and protocols.

APPSMITH_EMAIL_SERVER_USERNAME

Used to authenticate with the email server and allows logging into your SMTP server. Provide the username configured at your email server for sending emails.

APPSMITH_EMAIL_SERVER_PASSWORD

The password corresponds to the username for the SMTP server. You must protect the secret as it grants access to your email-sending capabilities. Enter the password associated with your APPSMITH_EMAIL_SERVER_USERNAME to authenticate with the email server.

APPSMITH_EMAIL_FROM_ADDRESS

This is the email address displayed in the From field of the emails sent through Appsmith, essentially representing who the email is from. Set this to a valid email address that recipients of your emails can recognize and associate with.

APPSMITH_EMAIL_REPLY_TO_ADDRESS

The ReplyTo address is the email displayed in the response field of Appsmith emails, indicating where replies will be sent. Set this to a valid email address that recipients can recognize and associate with the response destination.

APPSMITH_SMTP_AUTH_ENABLED

Defines to use of SMTP authentication when sending emails. Set it to true to authenticate your emails by the server, reducing the likelihood of them being marked as spam.

APPSMITH_MAIL_SMTP_TLS_ENABLED

Determines whether the email server connection uses Transport Layer Security (TLS) for enhanced security, protecting email contents and credentials. Set to true to enable TLS.

Telemetry

Monitoring the performance of your Appsmith instance is crucial for making informed decisions about feature improvements and resource allocation.

APPSMITH_TELEMETRY_ENABLED

Controls whether Appsmith sends telemetry data to its servers. You may choose to turn off the setting if it conflicts with your privacy policies or preferences. Set to true to allow Appsmith to collect anonymous telemetry data or false to opt out.

Google reCAPTCHA

Ensure the safety of your applications and data by configuring security settings, including reCAPTCHA, to safeguard your instance against automated threats. Use the environment variables below to manage these settings:

APPSMITH_RECAPTCHA_ENABLED

Enables Google reCAPTCHA verification on your Appsmith instance by embedding a reCAPTCHA in the login page, offering protection against spam and abuse by automated bots. Configure this to true after setting up reCAPTCHA with your domain to activate this feature.

APPSMITH_RECAPTCHA_SITE_KEY

Public key provided by Google reCAPTCHA for integrating the service into your web application. Set this variable with the site key you received after registering your Appsmith instance as a site under Google reCAPTCHA.

APPSMITH_RECAPTCHA_SECRET_KEY

The secret key provided by Google reCAPTCHA that Google uses to verify the user input during communication between your server and the reCAPTCHA server. The secret is confidential and used in server-side code. Set this variable with the secret key provided by reCAPTCHA.

Database and session management

Appsmith can connect to external providers for MongoDB and Redis. The associated environment variables ensure that Appsmith establishes a connection to external hosting rather than using the embedded MongoDB or Redis servers.

APPSMITH_MONGODB_URI

Appsmith uses this variable to connect to an external MongoDB instance. Set it to the full MongoDB URI supplied by the hosting service. This enables Appsmith to store data in your MongoDB database, ensuring control and ownership of the application data.

If your password or username contains special characters, you need to URL encode them. For instance, if the password is Something@123, it should be URL encoded as Something%40123, like:

// Syntax
APPSMITH_MONGODB_URI=mongodb+srv://<USERNAME>:<PASSWORD>@<MONGO.HOST.NAME>/<DATABASENAME>

// Example - password encoded
APPSMITH_MONGODB_URI=mongodb://appsmithadmin:Something%40123@1.3.4.5:27017/appsmith?retryWrites=true

To learn how to URL encode your username and password, see Encode to URL-encoded format.

APPSMITH_MONGODB_USER

Defines the username credential used by Appsmith to establish a connection with an external MongoDB instance. This setting ensures secure access to the designated database.

APPSMITH_MONGODB_PASSWORD

Sets the password associated with the MongoDB user specified in APPSMITH_MONGODB_USER. This password is crucial for secure authentication, allowing Appsmith to connect and interact with the external MongoDB instance securely.

APPSMITH_REDIS_URL

Appsmith uses this variable to establish a link to an external Redis server, which Appsmith uses for session handling and caching operations. This connection string typically includes the Redis host, port number, and optionally, authentication credentials.

APPSMITH_ENCRYPTION_PASSWORD

The encryption password is critical for safeguarding your datasource credentials through encryption. Select a strong password that exhibits a good level of entropy to prevent easy decryption.

APPSMITH_ENCRYPTION_SALT

The encryption salt contributes to the security strategy by adding a layer of complexity during the encryption process. This long, unique string enhances encryption strength, making it more resistant to attacks such as brute-force attempts.

Custom Domain

If you prefer to host your Appsmith instance on a personalized domain, you can do so by setting up a custom domain. Appsmith also provisions an SSL certificate through Let’s Encrypt, securing your application with HTTPS.

APPSMITH_CUSTOM_DOMAIN

Set this variable with your custom domain to access Appsmith. For more information about how to set up Custom domain and SSL Certificate, see Custom Domain and SSL guide.

File size limit

The default file size limit in Appsmith is 150 MB. This limit is customizable based on your requirements for larger file uploads in self-hosted instances.

APPSMITH_CODEC_SIZE

Specifies the allowed file size. To change the file size limit, update the APPSMITH_CODEC_SIZE parameter in the configuration file specific to your deployment. For example, when installed on Docker, update the docker.env file, and when installed on Kubernetes, update the values.yaml file. For more information about large file uploads, see Configure File Size Limit.

Supervisord

Access the Supervisord web interface seamlessly through Appsmith by setting login credentials using environment variables. Securely control your background processes, ensuring reliable application management.

APPSMITH_SUPERVISOR_USER

Specifies the username for authentication within Supervisord. Appsmith uses this credential to interact with Supervisord, facilitating the management and monitoring of background processes and tasks.

APPSMITH_SUPERVISOR_PASSWORD

Sets the password associated with the Supervisord user specified in APPSMITH_SUPERVISOR_USER. This password is essential for secure authentication, enabling Appsmith to manage and control background processes seamlessly through Supervisord.

Schedule automatic backups

In Appsmith, you have the flexibility to automate backups for your self-hosted instance. You can use the cron expression to schedule regular backups.

APPSMITH_BACKUP_CRON_EXPRESSION

Specify a 5-value cron expression to define the schedule for automatic backups. This allows you to tailor the backup frequency according to your preferences. Set this to disable to disable automatic backups.

Server timeout

Adjust the internal server timeout to optimize performance based on your Appsmith instance's load and expected response times.

APPSMITH_SERVER_TIMEOUT

Specifies the internal Appsmith server timeout in seconds. Defaults to a 60 second timeout. Increase or decrease based on your server's load and expected response times.