> Markdown version of https://tuna.am/en/docs/troubleshooting/errors/key-cannot-start-tunnels/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# This key cannot start tunnels: create a key with the tunnels:connect scope

```text
FATA[12:00:00] This key cannot start tunnels: create a key with the tunnels:connect scope
  Code: Forbidden
  Request ID: 7f2a9c41e0b85d36a1c4f9e02b7d6538

```

tuna CLI and Tuna Desktop show this error when a tunnel starts with an API key. The client doesn't reconnect and exits right away.

`tuna login --with-api-key` saves such a key but warns:

```text
WARN[12:00:00] This api key cannot start tunnels: create a key with the tunnels:connect scope to use it for tunnels

```

## Cause

The API key lacks the Run tunnels permission (`tunnels:connect`). Such a key works with the API and with commands like `tuna domain` within its permissions, but it can't start a tunnel.

## What to do

1. Create a new [API key](https://my.tuna.am/api_keys?lang=en): select the For tunnels preset or enable the Run tunnels permission.
2. Pass it to the tunnel: in the `TUNA_API_KEY` variable, with the `--api-key` flag, or save it with `tuna login --with-api-key`.
3. If you need the key without the tunnel permission for API commands, keep it for them and pass the new key to the tunnel with the `--api-key` flag.

Your own computer doesn't need a key for tunnels: log in with `tuna login`. See [Sessions and API keys](https://tuna.am/en/docs/guides/sessions-and-api-keys.md#ci) for details.
