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

# cassian forward

> Forward ports from a running instance to your local machine.

## Usage

```bash theme={null}
cassian forward
```

Opens tunnels for all ports defined in `cassian.yaml`. Stays alive until you press ctrl+c. The instance keeps running after you disconnect.

## Configuration

Ports are defined in `cassian.yaml`:

```yaml theme={null}
ports:
  - "8000:8000"     # local:container
  - "8888:8888"
  - "8080:3000"     # local 8080, container 3000
```

## Example

```bash theme={null}
# Start a server in the container
cassian exec -d "python -m http.server 8000"

# Forward it locally
cassian forward

# In another terminal
curl http://localhost:8000
```

## When to use

| Scenario                                    | Command                                     |
| ------------------------------------------- | ------------------------------------------- |
| Interactive development                     | `cassian ssh` (ports forward automatically) |
| Background server you want to reach locally | `cassian forward`                           |
| One-off command                             | `cassian exec` (no port forwarding)         |

## Notes

* Requires a running instance (`cassian up` first)
* Ports also forward automatically during `cassian ssh`
* If a local port is already in use, that tunnel is skipped with a warning
