> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-release-1-14.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 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 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.

## 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:

```bash theme={null}
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:

<Steps>
  <Step title="Stop the Running Services">
    ```bash theme={null}
    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:

    ```bash theme={null}
    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.

      If you have manually modified any configuration files beyond `.env`, back them up before upgrading.
    </Warning>

    Pull the latest code and sync the configuration files:

    ```bash theme={null}
    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:

    ```bash theme={null}
    diff /dify/.env /dify/.env.example
    ```
  </Step>

  <Step title="Start Services">
    ```bash theme={null}
    docker-compose pull
    docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d
    ```
  </Step>
</Steps>
