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

# FAQs

## Deployment Methods

### Install Older Version

Use the `--branch` flag to install a specific version:

```bash theme={null}
git clone https://github.com/langgenius/dify.git --branch 0.15.3
```

The rest of the setup is identical to installing the latest version.

### Install Using ZIP Archive

For network-restricted environments or when git is unavailable:

```bash theme={null}
# Download latest release
wget -O dify.zip "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r '.zipball_url')"
unzip dify.zip && rm dify.zip
```

Alternatively, download the ZIP on another device and transfer it manually.

**To upgrade**:

```bash theme={null}
wget -O dify-latest.zip "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r '.zipball_url')"
unzip dify-latest.zip && rm dify-latest.zip
rsync -a dify-latest/ dify/
rm -rf dify-latest/
cd dify/docker
docker compose pull
docker compose up -d
```

### Clone Fails with "Remote branch null not found"

The clone command in [Deploy Dify with Docker Compose](/en/self-host/deploy/quick-start/docker-compose) resolves the latest Dify version through the GitHub API. When that request fails (usually due to GitHub's rate limit on unauthenticated requests), `jq` outputs `null`, and git reports `fatal: Remote branch null not found in upstream origin`.

Clone with an explicit version instead. Find the latest version number on [Dify releases](https://github.com/langgenius/dify/releases), then run:

```bash theme={null}
git clone --branch <version> https://github.com/langgenius/dify.git
```

Cloning without `--branch` also works. The Compose file on `main` pins the latest released images, so you still run release builds, but the deployment files themselves (the Compose file and environment templates) track development and can drift from the tagged release.

## Backup Procedures

### Create Backup Before Upgrading

Always backup before upgrading to prevent data loss:

```bash theme={null}
cp -r dify "dify.bak.$(date +%Y%m%d%H%M%S)"
```

This creates a timestamped backup for easy restoration.

## Reverse Proxy Setup

### Login Session Drops with Split Frontend and Backend Subdomains

If you have split web and API across subdomains behind a reverse proxy (for example, `app.example.com` for the UI and `api.example.com` for the backend), authentication cookies cannot reach both hosts. Login appears to succeed, but the session is dropped on the next request.

Set both variables in `.env`, then restart Dify:

* **`COOKIE_DOMAIN`**: set to the shared top-level domain (e.g., `example.com`). Leading dots are optional.
* **`NEXT_PUBLIC_COOKIE_DOMAIN`**: set to `1` to enable cross-subdomain cookies on the frontend.

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

Cookies cannot cross top-level domains, so the frontend and backend must share the same registrable domain. For full details, see [environment variables](/en/self-host/deploy/configuration/environments).
