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

# ezforge rollback

> Roll back a server to a previous deployment

## Usage

```bash theme={null}
ezforge rollback <server-name> [flags]
```

Redeploys a previous version of the server. Up to 10 deployments are retained (3 on the Free tier).

## Flags

| Flag             | Description                                             |
| ---------------- | ------------------------------------------------------- |
| `--version <id>` | Deployment ID to restore (see `ezforge servers status`) |
| `--list`         | List available deployments and exit                     |
| `--project <id>` | Target project                                          |

## Examples

**List available deployments:**

```bash theme={null}
ezforge rollback my-server --list
```

Output:

```
ID           VERSION  STATUS       DEPLOYED AT
dep_qrs456   v1.2.0   running      2026-01-15 12:03 UTC  ← current
dep_abc123   v1.1.0   rolled_back  2026-01-14 09:12 UTC
dep_xyz789   v1.0.0   rolled_back  2026-01-13 15:45 UTC
```

**Roll back to a specific version:**

```bash theme={null}
ezforge rollback my-server --version dep_abc123
```

Output:

```
✓ Rolling back to v1.1.0...
✓ Health check passed
✓ Rollback complete — my-server is now running v1.1.0
```

## How rollback works

1. ezForge creates a new deployment record pointing at the historical image URI
2. Runs the full deploy pipeline: provision → health check → traffic swap
3. If the rollback itself fails, the *current* deployment remains live (it is not automatically reverted again)

## Auto-rollback

ezForge automatically rolls back to the last healthy deployment when:

* The health check at `GET {healthCheckPath}` fails after a deploy
* The health check timeout is exceeded

Auto-rollback can be disabled per-server (`rollbackOnHealthCheckFailure: false`) or per-deploy (`ezforge deploy --no-rollback`).
