# prontaro CLI command reference

Source: https://prontaro.com/docs/cli/commands/

Every prontaro CLI subcommand and global flag in one place, complete with syntax, options, and real terminal output.

Run `prontaro <command> --help` anytime to inspect the options in your installed build. Three hidden global flags (`--no-color`, `--no-input`, `--state-dir`) and `completion` are omitted from `--help` but supported in every release.

Proxy credentials, [Relay URLs](https://prontaro.com/docs/outbound/relay.md), [custom domains](https://prontaro.com/docs/tunnels/domains.md), Basic Auth passwords, and PTR records are managed in the [Prontaro dashboard](https://my.prontaro.com/) (`IP addresses` and `Tunnels`).

For exit codes and troubleshooting, see [Diagnostics and error codes](https://prontaro.com/docs/cli/errors.md#cli-exit-codes).

| Group | Commands | Purpose |
| --- | --- | --- |
| **Tunnels** | `http`, `tcp`, `run`, `ls`, `stop`, `rename`, `rm`, `access` | Run and manage HTTPS/TCP tunnels and IP access rules |
| **Static IP** | `forward` | Forward a local TCP port through your dedicated IPv4 |
| **Account** | `login`, `logout`, `status` | Sign in, sign out, and check plan, static IPs, and usage |
| **Other** | `service`, `doctor`, `update`, `version`, `completion` | Background services, diagnostics, updates, version, shell completion |

## Global flags

Every `prontaro` subcommand accepts these flags:

| Flag | Description |
| --- | --- |
| `--json` | Write structured JSON (object or array) to `stdout` for management commands, or plain-text public URL/listen address to `stdout` and line-delimited JSON (JSON Lines, including `"code"` on errors) to `stderr` for running tunnels and `forward`. |
| `-q`, `--quiet` | Print only state changes and errors; hide request logs and `Next:` hints. |
| `-y`, `--yes` | Confirm deletions, public access changes, and Linux `linger` without prompting. |
| `--no-color` | Disable ANSI colors (hidden in `--help`; also `NO_COLOR=1` or `CLICOLOR=0`). |
| `--no-input` | Never ask interactive questions (hidden in `--help`; same as `PRONTARO_NO_INPUT=1` or `CI=true`). If `http`, `tcp`, `run`, or `forward` hit a startup refusal (unpaid or blocked account, `online_limit`, `no_own_ip`), the process exits immediately with a non-zero code (`1`, or `7` for `no_own_ip`) instead of waiting; startup waiting applies only to services installed via `prontaro service install`. |
| `--state-dir <path>` | Override the state directory (hidden in `--help`; also `PRONTARO_STATE_DIR`). |

---

## Tunnels

Management commands (`ls`, `rename`, `stop`, `rm`, `access`) are also available in [Dashboard → Tunnels](https://my.prontaro.com/tunnels) without the CLI; tunnels themselves (`http`, `tcp`, `run`) are started by the CLI.

### `prontaro http`

Expose a local HTTP or HTTPS server over a public HTTPS URL.

- **Syntax:** `prontaro http <port | host:port | http://host[:port] | https://host[:port]>`
- **Flags:** `--name <name>`, `--url <subdomain|host|url>`, `--host-header <host>`, `--verify-local-cert`, `--to <IP|shared|shared@IP>`, `--location <code>`, `--takeover`

```bash
prontaro http 3000 --name api --to 203.0.113.10
```

```text
prontaro 0.2.0                                          Ctrl+C to stop

  Tunnel     api                                     ● connected
  Address    https://api-demo.prontaro.run  →  http://127.0.0.1:3000
  Access     everyone · no password   (as of launch)
  Server     <server> · <region> · 18 ms
  Account    user@example.com
  Slots      2 of 25 · plan "Dedicated"   (as of launch)

  Requests   seen 0 · 5xx 0
```

### `prontaro tcp`

Expose a local TCP port on a shared address or directly on your dedicated IPv4.

- **Syntax:** `prontaro tcp <port | host:port>`
- **Flags:** `--name <name>`, `--proxy-protocol v1|v2`, `--to <IP|IP:port|shared|shared@IP|host:port>`, `--location <code>`, `--takeover`

```bash
prontaro tcp 5432 --name pg --to 203.0.113.10:5432 --proxy-protocol v2
```

```text
prontaro 0.2.0                                          Ctrl+C to stop

  Tunnel     pg                                      ● connected
  Address    203.0.113.10:5432  →  127.0.0.1:5432
  Access     1 address   (as of launch)
  Server     <server> · <region> · 18 ms
  Account    user@example.com
  Slots      2 of 25 · plan "Dedicated"   (as of launch)

  Connections  total 0 · open 0
```

### `prontaro run`

Run multiple saved tunnels in one process in a single terminal view or shared log stream (local addresses and ports come from each tunnel’s saved settings). In an interactive terminal, `prontaro run` renders a combined live screen; without a TTY (pipes or scripts), it writes tab-separated `<name>\t<address>` lines to `stdout`.

- **Syntax:** `prontaro run <name or address>... [--takeover]`

```bash
prontaro run api pg | cat
```

```text
api	https://api-demo.prontaro.run
pg	203.0.113.10:5432
```

### `prontaro ls`

List active tunnels, or include saved and stopped tunnels with `-a` / `--all`. Alias: `list`.

When connected custom domains have the default `*.prontaro.run` address turned off, `ls` displays `(paused while custom domain is active)`. Piping `prontaro ls` into another command switches to tab-separated lines (TSV) with `http` or `tcp` in the kind column.

- **Syntax:** `prontaro ls [-a|--all]`

```bash
prontaro ls
```

```text
IP 203.0.113.10 · "Dedicated" · <loc> · 2 of 25 in use
  NAME  ADDRESS                                   LOCAL           LOCATION  STATE         MACHINE  ACCESS
  api   https://api.prontaro.run (203.0.113.10)   127.0.0.1:3000  <loc>     ● running 2h  edge-1   everyone
  pg    203.0.113.10:5432                         127.0.0.1:5432  <loc>     ● running 2h  edge-1   1 address
```

### `prontaro stop`

Stop a running tunnel from any machine (even if it runs on another server) while keeping its saved name or port.

- **Syntax:** `prontaro stop <tunnel>`

```bash
prontaro stop api
```

```text
✓ Stopped api.
  Next: prontaro run api — start again
```

### `prontaro rename`

Rename a tunnel in your account: its public URL, custom domains, and access rules stay unchanged, and the running process continues without interruption.

- **Syntax:** `prontaro rename <tunnel> <new-name>`

```bash
prontaro rename api api-v2
```

```text
✓ api is now called api-v2; its address is unchanged
```

### `prontaro rm`

Delete a tunnel and release its name or port immediately. Aliases: `remove`, `delete`.

- **Syntax:** `prontaro rm <tunnel> [-y|--yes]`

```bash
prontaro rm api-v2 --yes
```

```text
✓ api-v2: Removed from your account. The address may still answer briefly while the change reaches every server.
```

### `prontaro access`

Inspect or update tunnel IP [access rules](https://prontaro.com/docs/tunnels/access.md): IP allowlists and closing a TCP port (`close` works for TCP tunnels only). You can pass `me` instead of typing an IPv4 address — the CLI inserts the public IPv4 that the Prontaro API sees for your current machine.

Basic Auth passwords are shown as enabled/disabled in `prontaro access <tunnel>` and managed in [Dashboard → Tunnels](https://my.prontaro.com/tunnels) (**Access** tab).

- **Syntax:** `prontaro access <tunnel> [public | allow <addresses>... | remove <addresses>... | close]`

```bash
prontaro access pg allow 198.51.100.7/32
```

```text
✓ pg now open only to 198.51.100.7/32 (was: closed); takes effect within seconds.
```

---

## Static IP

Manage proxy credentials, [Relay URLs](https://prontaro.com/docs/outbound/relay.md), and PTR records in [Dashboard → IP addresses](https://my.prontaro.com/ips).

### `prontaro forward`

Listen on a local port (`127.0.0.1:<port>` by default) and forward TCP connections over TLS through a Prontaro node to a remote `host:port` from your dedicated IPv4.

Pass `--listen <addr>` (such as `--listen 0.0.0.0` for a Docker sidecar) to bind another interface; binding a non-loopback address prints a warning on `stderr`. In non-TTY scripts, `forward` prints `<listen_addr>` to `stdout` once ready.

- **Syntax:** `prontaro forward <local port> <host:port> [--ip <IP>] [--listen <addr>] [--new-credentials]`

```bash
prontaro forward 15432 db.example.com:5432 --ip 203.0.113.10
```

```text
prontaro forward 15432 db.example.com:5432
  127.0.0.1:15432  →  db.example.com:5432 from your IP 203.0.113.10
```

---

## Account

### `prontaro login`

Sign in to your Prontaro account and save a CLI token locally. In an interactive terminal, `prontaro login` prints a one-time code and opens your browser to confirm sign-in (over SSH or with `--no-browser`, it prints the code and URL without opening a browser). Use `--token` to paste a manually created token, or `--token-stdin` on headless hosts.

In CI and containers, set the `PRONTARO_KEY` environment variable directly instead of calling `prontaro login`.

- **Syntax:** `prontaro login [--no-browser] [--token] [--token-stdin] [--label <name>]`

```bash
prontaro login --label dev-laptop
```

```text
Your one-time code: K7NP-4WQR
Open: https://my.prontaro.com/cli/approve?code=K7NP-4WQR
Opening browser… waiting for confirmation (Ctrl+C to cancel).
✓ Logged in: user@example.com · CLI token "dev-laptop" · this machine: dev-laptop
```

### `prontaro logout`

Remove the saved CLI token from this machine (revoke the token itself on the [CLI page](https://my.prontaro.com/cli)).

- **Syntax:** `prontaro logout`

```bash
prontaro logout
```

```text
✓ Logged out on this machine. The CLI token remains active until you revoke it in your dashboard (https://my.prontaro.com/cli).
```

### `prontaro status`

Display your signed-in account, CLI token source (`saved` or `PRONTARO_KEY`; `"saved"` or `"env"` in `--json`), active plan, dedicated static IPs, concurrent tunnel slots, and monthly traffic and request usage. Alias: `whoami`.

- **Syntax:** `prontaro status [--json]`

```bash
prontaro status
```

```text
Account       user@example.com
CLI token     dev-laptop (saved · machine: dev-laptop)
Plan          Dedicated · active
Static IP     203.0.113.10 (<loc> · served)
Tunnel slots  2 of 25 online
Traffic       420 MB / <limit> (resets 1 Dec 2026)
Requests      12,400 / <limit> (resets 1 Dec 2026)
Dashboard     https://my.prontaro.com
```

---

## Other

### `prontaro service`

Install, inspect, or remove a `systemd` (Linux) or `launchd` (macOS) background service for `http`, `tcp`, `forward`, or `run`.

Passing `--takeover` to `service install` is rejected with exit code `7` so background services never fight over the same tunnel. Not supported on Windows — see [Windows Task Scheduler](https://prontaro.com/docs/cli/windows.md#auto-start-on-windows-with-task-scheduler).

- **Syntax:** `prontaro service install [--system] [--dry-run] -- <command>` or `prontaro service uninstall|status [--system] -- <command>`

```bash
prontaro service install -- http 3000 --name api
```

```text
✓ Service prontaro-api installed; its process runs. Whether the tunnel is up: prontaro ls · its log: journalctl --user -u prontaro-api
```

### `prontaro doctor`

Check your saved token, state file permissions, clock skew, `HTTPS_PROXY`, DNS, TLS to the Prontaro API and Prontaro servers (`Servers :443`), tunnel DNS records, and CLI version. Exits `0` if every check passes (`1` otherwise).

- **Syntax:** `prontaro doctor [--json]`

```bash
prontaro doctor
```

```text
  ✓ CLI token              accepted · user@example.com · token "deploy" · from saved login
  ✓ Clock                  0.1 s off server time
  ✓ Proxy                  none for API (proxy environment unset or NO_PROXY)
  ✓ Name cli.prontaro.net  → 203.0.113.10
  ✓ API :443               TLS in 22 ms · certificate valid until 15 Mar 2027
  ✓ Server <host> :443     TLS in 19 ms · certificate valid until 15 Mar 2027
  ✓ Version 0.2.0          current

Result: all good.
```

### `prontaro update`

Check for a new release or update a standalone `prontaro` binary in place over HTTPS with SHA256 verification. If `prontaro` was installed via Homebrew or WinGet, `prontaro update` detects it and prints the package manager upgrade command without modifying files on disk.

- **Syntax:** `prontaro update [--check] [--version <X.Y.Z>] [--json]`

```bash
prontaro update --check
prontaro update
```

```text
✓ Updated prontaro 0.1.6 → 0.2.0 (/home/alice/.local/bin/prontaro)
Running tunnels and services keep the old version until restarted. For systemd services: systemctl --user reload <service>.
```

### `prontaro version`

Print CLI version, Go runtime version, OS, and architecture (or JSON with `--json`). Shorthand: `prontaro -v` or `prontaro --version`.

- **Syntax:** `prontaro version [--json]` | `prontaro -v` | `prontaro --version`

```bash
prontaro version
```

```text
prontaro 0.2.0 (go1.25.6, linux/amd64)
```

### `prontaro completion`

Print shell completion scripts (hidden from `prontaro --help`, but officially supported).

- **Syntax:** `prontaro completion <bash | zsh | fish | powershell>`

```bash
prontaro completion zsh > ~/.zsh/completions/_prontaro
```

## Next steps

- [Background services (Linux & macOS)](https://prontaro.com/docs/cli/service.md) — run tunnels and port forwards automatically with `systemd` or `launchd`.
- [Diagnostics and error codes](https://prontaro.com/docs/cli/errors.md) — troubleshooting with `prontaro doctor`, HTTP/proxy errors, and CLI exit codes.
- [Usage, limits & quotas](https://prontaro.com/docs/billing/limits.md) — monthly traffic, request, and concurrent tunnel allowances by plan.
