Skip to main content

Azure Container Instance

Azure Container Instances (ACI) is a simple and efficient way to run containers in the cloud. This document guides you through launching an ACI instance and running an Appsmith container.

note

Azure only supports CIFS file shares and doesn't support NFS file shares.

Best practices

For production deployments, use Azure Files only to persist Appsmith's filesystem artifacts. Don't use it to host databases or cache services because network-mounted volumes can cause poor performance, data inconsistency, or startup failures.

Before deploying Appsmith, follow the relevant guides to configure the external services you need:

Prerequisites​

Before launching an ACI instance, you need to have an Azure subscription and have the Azure CLI installed on your machine.

  • Azure Subscription - If you don't have an Azure subscription, you can sign up for a free trial.
  • Azure CLI.
  • Complete the external MongoDB and Redis setup described in Best practices, and keep their connection URLs available.
  • Whitelist cs.appsmith.com in your firewall settings to allow outbound HTTPS traffic. If using Azure Firewall, add these domains under Application Rules.

Configure variables

Update the following values for your deployment, and enter them in your shell or terminal.

resourceGroupName="myResourceGroup"
aciName="myAppsmithACI"
storageAccountName="mystorageaccount$RANDOM"
aciLocation="southindia"
fileShareName="myFileShareName"
dnsNameLabel="myDNSLabel"

Set the following variables using connection strings from the external service guides and secrets from your preferred secret-management method. Don't commit or share the actual values.

mongodbUrl="<mongodb-connection-url>"
redisUrl="<redis-connection-url>"
encryptionPassword="<strong-encryption-password>"
encryptionSalt="<strong-encryption-salt>"
caution

Use strong values for the encryption password and salt. Store them securely and reuse the same values whenever you redeploy or restore the instance. Changing them prevents Appsmith from decrypting stored credentials.

Create a resource group (optional)

You can skip this step if you want to use an existing resource group.

az group create --name $resourceGroupName --location $aciLocation

Create a storage account (optional)

You can skip this step if you want to use an existing storage account.

az storage account create --resource-group $resourceGroupName --name $storageAccountName --location $aciLocation --sku Standard_LRS

Get the storage account key

storageAccountKey=$(az storage account keys list --resource-group $resourceGroupName --account-name $storageAccountName --query "[0].value"  --output tsv)

Create a file share

az storage share create --name $fileShareName --account-name $storageAccountName --account-key $storageAccountKey

Install Appsmith

  • Choose a release tag from Appsmith on GitHub and set it in place of <version> in the --image value below. Pinning the tag keeps upgrades under your control.

  • Create an Azure container instance for Appsmith with:

    az container create \
    --resource-group $resourceGroupName \
    --name $aciName \
    --image appsmith/appsmith-ee:<version> \
    --ip-address public \
    --dns-name-label $dnsNameLabel \
    --ports 80 443 \
    --cpu 2 \
    --memory 4 \
    --secure-environment-variables \
    "APPSMITH_DB_URL=$mongodbUrl" \
    "APPSMITH_REDIS_URL=$redisUrl" \
    "APPSMITH_ENCRYPTION_PASSWORD=$encryptionPassword" \
    "APPSMITH_ENCRYPTION_SALT=$encryptionSalt" \
    --azure-file-volume-account-name $storageAccountName \
    --azure-file-volume-account-key $storageAccountKey \
    --azure-file-volume-share-name $fileShareName \
    --azure-file-volume-mount-path "/appsmith-stacks/"

Install Appsmith Community

To install the Appsmith open source edition (Appsmith Community), replace appsmith-ee with appsmith-ce in the --image value while creating an Azure container instance on this page, and keep the same :<version> suffix.

Post-installation configuration

Once you have completed the installation process, consider performing the tasks below to configure and manage your Appsmith instance, enhancing its security and performance, specifically if it's intended for production use.


Troubleshooting

If you are facing issues during deployment, refer to the guide on troubleshooting deployment errors. If you continue to face issues, contact the support team using the chat widget at the bottom right of this page.

See also