# si port

List, open, close, forward and share the ports of an SVM

Source: https://slashinfra.com/docs/cli/port
Last modified: 2026-11-30T16:36:19.000Z

List, open, close, forward and share the ports of an SVM

## Usage

```bash
si port [OPTIONS] <COMMAND>
```

## Flags

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port ls

List the open ports of an SVM

```bash
si port ls [OPTIONS] [SVM]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port open

Open a port to members or, with --public, to anyone

```bash
si port open [OPTIONS] [SVM] [PORT]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `port` | `PORT` | The port number, from 1 to 65535 |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--public` |  | Let anyone reach the port, not only members and link holders | false |  |
| `--auth` |  | Keep the port for members and link holders; the default | false |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port close

Close a port and invalidate its links

```bash
si port close [OPTIONS] [SVM] [PORT]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `port` | `PORT` | The port number, from 1 to 65535 |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port url

Print a link to an open port

```bash
si port url [OPTIONS] [SVM] [PORT]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `port` | `PORT` | The port number, from 1 to 65535 |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--ttl` | `TTL` | How long the link works: 30m, 1h, 7d or seconds; 1h by default | 1h |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port rotate

Invalidate every link of a port

```bash
si port rotate [OPTIONS] [SVM] [PORT]
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `port` | `PORT` | The port number, from 1 to 65535 |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

## si port forward

Forward a port of an SVM to this computer

```bash
si port forward [OPTIONS] [SVM] [PORT[:LOCAL]]...
```

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `svm` | `SVM` | The SVM to use; defaults to the one set with si use |  |  |
| `ports` | `PORT[:LOCAL]` | An SVM port, and optionally the local port after a colon |  |  |

| Name | Value | Description | Default | Env |
| --- | --- | --- | --- | --- |
| `--stdio` |  | Carry one port between standard input and output, as an SSH ProxyCommand does | false |  |
| `--json` |  | Print the result as JSON | false |  |
| `--project` | `PROJECT` | The project of the command: an id or a name; `SI_PROJECT` when the flag is absent |  | SI_PROJECT |
| `--help` |  | Print help |  |  |

```bash
Examples:
si port forward web 3000
si port forward web 3000 8000 5432:15432
si port forward --stdio %h 22
```
