# tuna and Ollama

## Step 1. Download the client

Instructions are available on the [installation page](https://tuna.am/en/docs/guides/install.md).

## Step 2. Run Ollama

Installation instructions can be found in the [official documentation](https://github.com/ollama/ollama/tree/main/docs#getting-started).

## Step 3. Run tuna

Ollama uses port `11434` by default:

```bash
tuna http 11434 --request-header="host:localhost:11434"

```

Please note that the API will be accessible to everyone. If you need to restrict access, there are several ways:

* [basic authentication protection](https://tuna.am/en/docs/tunnels/http.md#basic-authentication-protection)
* [API token protection](https://tuna.am/en/docs/tunnels/http.md#api-token-protection)
* [traffic policies](https://tuna.am/en/docs/traffic-policy.md#basic_auth)

An example of basic authentication protection might look like this:

```bash
tuna http 11434 --request-header="host:localhost:11434" --basic-auth="login:password"

```

All requests without correct credentials will receive a `401` error.
