> ## Documentation Index
> Fetch the complete documentation index at: https://ara-90a60a07.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Use a model on your own machine

> Connect Ollama, vLLM, LM Studio or any OpenAI-compatible server on localhost, a private network or the internet.

In **Settings → Models**, choose **Custom**. Set **Execution location** to **Local session device** to call your inference server from the device running the session, without exposing it to the internet.

For Ollama, start the server with a context window large enough for agent prompts:

```bash wrap theme={null}
OLLAMA_CONTEXT_LENGTH=32768 ollama serve
ollama list
```

Enter any API key for a keyless server, set **Base URL** to `http://localhost:11434/v1`, and enter the model IDs shown by `ollama list` in **Model IDs**. Separate multiple IDs with commas. Leave **API format** blank for OpenAI-compatible chat completions, or choose `openai-responses` or `anthropic-messages` if your server uses that format.

Run the session on the device that can reach the server. With local execution, `localhost` means that session's device, not your browser or Reason's cloud. A LAN address such as `http://192.168.1.10:8080/v1`, an SSH tunnel on that device, or a Tailscale address also works if reachable from that device. HTTP and HTTPS are supported; prefer HTTPS when sending credentials or session content across a network you do not trust.

**Model IDs are required for local execution.** Reason does not resolve the private hostname or discover models from the cloud when you save. Check the server's model list yourself. A cloud session cannot use this local connection: move the session to a device that can reach it, or use cloud execution with a public HTTPS endpoint instead.

* For vLLM or LM Studio, use its OpenAI-compatible API port and model IDs.
* Agent prompts run past 20,000 tokens. Raise the server's context window, because Ollama's default silently cuts off the rest.
* A connected device must be online and able to reach the inference server.
* Small models struggle with tool calls. If one makes up a tool result, start a new session instead of following up.

## Use the endpoint from a cloud session

**Reason cloud** is the default execution location, including for existing Custom connections. It requires a public HTTPS URL and retains private-network protections. It cannot call your localhost, LAN or private tailnet address. If you want cloud sessions to use your server, expose it at a public HTTPS address, for example with a [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/do-more-with-tunnels/trycloudflare/):

```bash wrap theme={null}
cloudflared tunnel --url http://localhost:11434 --http-host-header localhost:11434
```

Choose **Reason cloud** and set **Base URL** to the tunnel address plus `/v1`. Leave **Model IDs** blank to discover models when saving, or enter them explicitly.

* Ollama only answers requests addressed to `localhost`, which is why the tunnel needs `--http-host-header`.
* Anyone with a public tunnel address can use the server unless it checks a key. Put an authenticated proxy in front of it and enter that key in Reason if you need access control.
* A `trycloudflare.com` address changes whenever `cloudflared` restarts. To update the connection, use **Replace key** and enter the new base URL. A [named tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/) keeps the same address.

## FAQ

<AccordionGroup>
  <Accordion title="Can Reason reach a server on my private network or VPN?">
    Yes, with **Local session device** execution and a session running on a device that can reach that network or VPN. Reason cloud cannot reach private addresses; choose local execution or give the server a public HTTPS address.
  </Accordion>

  <Accordion title="How do I connect a server I reach over Tailscale?">
    Choose **Local session device**, enter its `100.x` or `*.ts.net` URL and model IDs, and run the session on a device in your tailnet. To use it from Reason cloud instead, run [`tailscale funnel 8080`](https://tailscale.com/kb/1223/funnel) with the server's port, then enter the printed public `https://….ts.net` address plus `/v1`.
  </Accordion>

  <Accordion title="Why are model IDs required for local execution?">
    Saving happens in the cloud, which cannot inspect your local server. Enter the IDs reported by the server, such as the names from `ollama list`. Requests are sent only when a session runs on a device that can reach it.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.