Configure Environment Variables
Appsmith offers environment variables to customize your setup for different services and integrations. These configurations are applicable only to self-hosted Appsmith instances. The page provides step-by-step instructions for configuring environment variables in Appsmith across different deployment methods.
- Docker
- Helm
- AWS ECS
Follow these steps to configure Appsmith using environment variables for Docker-based installations, including setups on DigitalOcean, AWS AMI, and similar platforms:
-
Navigate to your installation folder.
-
Open the
stacks/configuration/docker.env
file. -
Add or update the required environment variables. For example, to set the Google Maps API key:
APPSMITH_GOOGLE_MAPS_API_KEY=YOUR_API_KEY
-
Restart the Docker containers for the changes to take effect:
docker-compose restart appsmith
For Kubernetes installations using Helm, modify the values.yaml
file to configure environment variables.
Steps for Commercial Edition:
- Navigate to your installation's root directory.
- Generate a
values.yaml
file:helm show values appsmith-ee/appsmith > values.yaml
- Update parameters under the
applicationConfig
section. For instance:applicationConfig:
APPSMITH_MAIL_FROM: "test@test.com" - Apply the updated values:
helm upgrade appsmith appsmith-ee/appsmith -f values.yaml -n appsmith
Steps for Community Edition:
- Navigate to your installation's root directory.
- Generate a
values.yaml
file:helm show values appsmith/appsmith > values.yaml
- Modify parameters under the
applicationConfig
section. For example, to set the sender email address:applicationConfig:
APPSMITH_MAIL_FROM: "test@test.com" - Apply the updated values:
helm upgrade appsmith appsmith/appsmith -f values.yaml -n appsmith
To configure an Appsmith ECS installation:
-
Open the AWS ECS console.
-
Select Task Definitions and choose the relevant task definition.
-
Click Create new revision.
-
In the Task Definition config page, edit the Appsmith container.
-
Under Environment, add or update the key-value pairs for the environment variables. For sensitive data, consider using AWS Secrets Manager. When referring a value from the AWS secrets manager, use
ValueFrom
in the environment variable. -
Click Update, then Create to generate a new task definition.
-
In the ECS console, navigate to your cluster and select the service.
-
Update the service to use the latest task definition revision.
-
Review and confirm the update.
The new ECS task should be running within a minute.