rewrite aws premium upgrade guide and fix minor issues (#695)

This commit is contained in:
Riskey
2026-03-05 13:44:20 +08:00
committed by GitHub
parent a1985649f3
commit 212ca6b18f

View File

@@ -2,128 +2,82 @@
title: Dify Premium on AWS
---
Dify Premium is our AWS AMI offering that allows custom branding and is one-click deployable to your AWS VPC as an EC2. Head to [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) to subscribe. It's useful in a couple of scenarios:
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](https://aws.amazon.com/marketplace/pp/prodview-t22mebxzwjhu6) 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](https://cloud.dify.ai), but your use case require more resource than supported by the [plans](https://dify.ai/pricing).
* You'd like to run a POC before adopting Dify Enterprise within your organization.
- 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](https://cloud.dify.ai), but your use case requires more resources than supported by the [plans](https://dify.ai/pricing).
- You'd like to run a POC before adopting Dify Enterprise within your organization.
## Setup
## Access & Set up
If this is your first time accessing Dify, enter the Admin initialization password (set to your EC2's instance ID) to start the set up process.
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).
After the AMI is deployed, access Dify via the instance's public IP found in th 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.
## Upgrading
## 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:
```bash
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
<Warning>
Before upgrading, check the [Release Notes](https://github.com/langgenius/dify/releases) on GitHub for version-specific upgrade instructions. Some versions may require additional steps such as database migrations or configuration changes.
</Warning>
In the EC2 instance, run the following commands:
```
git clone https://github.com/langgenius/dify.git /tmp/dify
mv -f /tmp/dify/docker/* /dify/
rm -rf /tmp/dify
docker-compose down
docker-compose pull
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d
```
<Steps>
<Step title="Stop the Running Services">
```bash
cd /dify
docker-compose down
```
</Step>
<Step title="Back Up Your Data">
Back up your `.env` file and the `volumes` directory, which contains your database, storage, and other persistent data:
<Accordion title="Upgrading Community Edition to v1.0.0+">
```bash
cp /dify/.env /dify/.env.bak
tar -cvf volumes-$(date +%s).tgz volumes
```
</Step>
<Step title="Update Dify">
<Warning>
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.
> This section describes migrating an older Community Edition to Dify v1.0.0+. For general upgrades of Dify Premium or Community Edition to versions *later* than this specific migration scope, please refer to their respective main upgrade instructions.
If you have manually modified any configuration files beyond `.env`, back them up before upgrading.
</Warning>
The upgrade process involves the following steps:
Pull the latest code and sync the configuration files:
1. Backup your data
2. Migrate plugins
3. Upgrade the main dify project
```bash
git clone https://github.com/langgenius/dify.git /tmp/dify
rsync -av /tmp/dify/docker/ /dify/
rm -rf /tmp/dify
```
</Step>
<Step title="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:
### 1. Backup Data
1.1 Execute the `cd` command to navigate to your Dify project directory and create a backup branch.
1.2 Run the following command to back up your docker-compose YAML file (optional).
```bash
cd docker
cp docker-compose.yaml docker-compose.yaml.$(date +%s).bak
```
1.3 Run the command to stop docker services, then execute the backup data command in the Docker directory.
```bash
docker compose down
tar -cvf volumes-$(date +%s).tgz volumes
```
### 2. Upgrade the Version
`v1.0.0` supports deployment via Docker Compose. Navigate to your Dify project path and run the following commands to upgrade to the Dify version:
```bash
git checkout 1.0.0 # Switch to the 1.0.0 branch
cd docker
docker compose -f docker-compose.yaml up -d
```
### 3. Migrate Tools to Plugins
> **Important Note on Command Execution and Package Management (for v1.0.0 migration):**
> * **Default Container Name:** The `docker exec` command examples use `docker-api-1`. If your API container has a different name or ID (which you can find using `docker ps`), please adjust the command accordingly.
> * **Python Package Manager (`uv` vs. `poetry`):**
* Dify switched from `poetry` to `uv` for Python package management starting with version [v1.3.0](https://github.com/langgenius/dify/releases/tag/1.3.0) to enhance performance. For general operations in Dify v1.3.0 or newer, the standard command is `uv run flask ...`.
* **This specific section focuses on upgrading to Dify v1.0.0.** During the period of Dify v1.0.0 up to (but not including) v1.3.0, `poetry` was the package manager. Therefore, the `flask` commands in the examples below correctly use `poetry run ...`. The code examples emphasize the current `uv` standard in comments first, then show the `poetry` command relevant to this specific v1.0.0 migration scope.
The purpose of this step is to automatically migrate the tools and model vendors previously used in the Community Edition and install them into the new plugin environment.
1. Run the `docker ps` command to check the API container name or ID. The default is often `docker-api-1`.
Example:
```bash
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
417241cd**** nginx:latest "sh -c 'cp /docker-e…" 3 hours ago Up 3 hours 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp docker-nginx-1
f84aa773**** langgenius/dify-api:1.0.0 "/bin/bash /entrypoi…" 3 hours ago Up 3 hours 5001/tcp docker-worker-1
a3cb19c2**** langgenius/dify-api:1.0.0 "/bin/bash /entrypoi…" 3 hours ago Up 3 hours 5001/tcp docker-api-1
```
Run the command `docker exec -it docker-api-1 bash` to enter the container terminal (if your container name is different, use that instead), and then run:
```bash
# For Dify v1.3.0+ environments, the standard command is 'uv run ...'.
uv run flask extract-plugins --workers=20
#
# If your target migration version for the Community Edition part described here is Dify v1.0.0 up to (but not including) v1.3.0, use 'poetry':
# poetry run flask extract-plugins --workers=20
```
> If an error occurs (e.g., `uv` or `poetry` not found) when trying to execute the commands as per this guide for v1.0.0 migration, ensure the `poetry` environment is correctly set up on the server as per the original prerequisites for that version. If the terminal asks for input after running a `poetry` command, press **"Enter"** to skip.
This command will extract all models and tools currently in use in the environment. The workers parameter controls the number of parallel processes used during extraction and can be adjusted as needed. After the command runs, it will generate a `plugins.jsonl` file containing plugin information for all workspaces in the current Dify instance.
Ensure your network can access the public internet and support access to: `https://marketplace.dify.ai`. Continue running the following command in the `docker-api-1` container:
```bash
# For Dify v1.3.0+ environments, the standard command is 'uv run ...'.
uv run flask install-plugins --workers=2
#
# If your target migration version for the Community Edition part described here is Dify v1.0.0 up to (but not including) v1.3.0, use 'poetry':
# poetry run flask install-plugins --workers=2
```
This command will download and install all necessary plugins into the latest Community Edition. When the terminal shows `Install plugins completed.`, the migration is complete.
</Accordion>
## Customizing
Just like self-hosted deploy, you may modify the environment variables under `.env` in your EC2 instance as you see fit. Then, restart Dify with:
```bash
docker-compose down
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d
```
## WebApp Logo & Branding Customization
You can enable this feature in **Customization** under settings, enable **Remove Powered by Dify** and upload your own logo.
```bash
diff /dify/.env /dify/.env.example
```
</Step>
<Step title="Start Services">
```bash
docker-compose pull
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d
```
</Step>
</Steps>