Skip to main content
Dify Premium is our AWS AMI offering that allows custom branding and is one-click deployable to your AWS VPC as an EC2 instance. Head to AWS Marketplace to subscribe. It’s useful in a couple of scenarios:
  • You’re looking to create one or a few applications as a small/medium business and you care about data residency.
  • You are interested in Dify Cloud, but your use case requires more resources than supported by the plans.
  • You’d like to run a POC before adopting Dify Enterprise within your organization.

Access & Set up

After the AMI is deployed, access Dify via the instance’s public IP found in the EC2 console (HTTP port 80 is used by default). If this is your first time accessing Dify, enter the Admin initialization password (your EC2’s instance ID) to start the setup process.

Customize

Configuration

Just like a self-hosted deployment, you may modify the environment variables in the .env file in your EC2 instance as you see fit. Then, restart Dify with:
docker-compose down
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d

Web App Logo & Branding

In Settings > Customization, you can remove the Powered by Dify branding or replace it with your own logo.

Upgrade

Before upgrading, check the Release Notes on GitHub for version-specific upgrade instructions. Some versions may require additional steps such as database migrations or configuration changes.
In the EC2 instance, run the following commands:
1

Stop the Running Services

cd /dify
docker-compose down
2

Back Up Your Data

Back up your .env file and the volumes directory, which contains your database, storage, and other persistent data:
cp /dify/.env /dify/.env.bak
tar -cvf volumes-$(date +%s).tgz volumes
3

Update Dify

The upgrade process will overwrite configuration files but will not affect your .env file or runtime data (such as databases and uploaded files) in the volumes/ directory.If you have manually modified any configuration files beyond .env, back them up before upgrading.
Pull the latest code and sync the configuration files:
git clone https://github.com/langgenius/dify.git /tmp/dify
rsync -av /tmp/dify/docker/ /dify/
rm -rf /tmp/dify
4

Check for New Environment Variables

New versions may introduce new environment variables in .env.example. Compare it with your current .env and add any missing variables:
diff /dify/.env /dify/.env.example
5

Start Services

docker-compose pull
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d