> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Compose

## Requirements

* Docker
* Docker Compose
* Linux Server
  * Don't support Docker Desktop for Windows and Mac.
  * Minimum: 4 CPU cores, 16 GB memory, 100 GB disk space.

## Quick Start

### Download

Download a specific version from Dify Enterprise [repository](https://langgenius.github.io/dify-enterprise-docker-compose/).

Using wget:

```bash theme={null}
wget https://langgenius.github.io/dify-enterprise-docker-compose/dify-docker-compose-<version>.tgz
```

Using curl:

```bash theme={null}
curl -O https://langgenius.github.io/dify-enterprise-docker-compose/dify-docker-compose-<version>.tgz
```

## Installation

1. Extract the contents of the downloaded file to your deployment directory.

   ```bash theme={null}
   mkdir dify-enterprise
   tar -xzf dify-docker-compose-<version>.tgz -C ./dify-enterprise/
   ```

2. Start docker compose.

   ```bash theme={null}
   cd dify-enterprise
   docker compose up -d
   ```

3. [How to Access Dify Enterprise.](#how-to-access-dify-enterprise)

4. [Verify Dify Services Status.](/en/2.5.x/deploy/verify-services-status)

5. [License Activation.](/en/2.5.x/deploy/license-activation)

## Upgrade From Community Edition

1. Create the enterprise database (make sure your community version is running).

   ```bash theme={null}
   docker exec -it dify-db-1 psql -U postgres -c "CREATE DATABASE enterprise;"
   ```

   **Tip:** You may need to adjust the container name based on your running containers. Use `docker container ls` to find the name of the `db` service.

2. Shut down the community version.

   ```bash theme={null}
   docker compose down
   ```

3. Backup your data and settings (you may need to use `sudo`).

   ```bash theme={null}
   tar -czf backup.tgz volumes .env # add other customized files and folders if any.
   ```

4. Delete all files and folders from the Community version, except for the `backup.tgz` and `dify-docker-compose-<version>.tgz`.

5. Extract the contents of the downloaded file to your deployment directory.

   ```bash theme={null}
   tar -xzf dify-docker-compose-<version>.tgz -C /path/to/directory
   ```

6. Restore your backup by deleting the `volumes` folder.

   ```bash theme={null}
   rm -rf volumes
   ```

   Then run:

   ```bash theme={null}
   tar -xzf backup.tgz
   ```

7. If you have custom configurations (e.g., `docker-compose.yaml`, `ssrf_proxy/squid.conf`, or `nginx/conf.d/default.conf`), update the corresponding files with your changes.

8. Start docker compose.

   ```bash theme={null}
   docker compose up -d
   ```

9. [How to Access Dify Enterprise.](#how-to-access-dify-enterprise)

10. [Verify Dify Services Status.](/en/2.5.x/deploy/verify-services-status)

11. [License Activation.](/en/2.5.x/deploy/license-activation)

## Upgrade From Previous Enterprise Edition

1. Backup your data and settings (you may need to use sudo).

   ```bash theme={null}
   tar -czf backup.tgz volumes .env # add other customized files and folders if any
   ```
