> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokios.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Tokios exposes private local models through https://api.tokios.com using an outbound-only connector tunnel.
> Use 'connector' for the local tokios-connector process.
> Use 'deployment' for the public model name in the API model field.
> Use 'upstream model id' for the model served by Ollama, llama.cpp, vLLM, LM Studio, or another local backend.
> API keys use the prefix sk-tok-. Connector tokens use the prefix ct-tok-.

# Tokios vs Tailscale for local LLM access

> How Tailscale and Tokios differ for remote access to local models — networking model, API keys, client compatibility, and when each is the better choice.

## Overview

Tailscale is a mesh VPN built on WireGuard. You install it on your model server and every client device, and each device gets a stable IP on a private network (a "tailnet"). Traffic flows peer-to-peer over encrypted WireGuard — no inbound port, no public IP required.

For LLM use, the typical setup looks like this: install Tailscale on the machine running Ollama or vLLM, install it on your laptop and phone, then call the model at its Tailscale IP (`100.x.y.z:11434`). It works well when you control every device that needs access.

Tokios takes a different approach. Instead of a VPN mesh, it provides an outbound-only tunnel with an API gateway in front. You install 1 connector on the model server, create per-user API keys in a dashboard, and any HTTP client — a coding agent, a chat app, a `curl` script — calls a single endpoint at `api.tokios.com`. No client software needed on the caller's side.

## Comparison table

| Feature | Tailscale | Tokios |
| - | - | - |
| Networking model | WireGuard mesh VPN (peer-to-peer) | Outbound-only tunnel + API gateway |
| Client requirements | Tailscale installed on every device | Any HTTP client — no software install |
| API keys | None — device-level access only | Per-user `sk-tok-…` keys, scoped to deployments |
| Protocol translation | None — raw backend port | OpenAI and Anthropic API compatibility |
| SSE streaming | Works over WireGuard | Native SSE, no buffering |
| Setup time | \~10 minutes (install + join tailnet) | \~2 minutes (1 command + dashboard) |
| Pricing | Free for up to 6 users (personal) | Free — community plan, no credit card |
| CGNAT handling | Yes — DERP relay fallback | Yes — outbound connection only |
| Offline / airgapped | Yes — with Headscale self-hosted | No — requires internet to reach gateway |
| Works with coding agents | Requires agent to join tailnet | Standard base URL + API key |

## Where Tailscale wins

* **Free for personal use.** Up to 6 users and 100 devices on the free plan. For a solo dev or a small family of devices, that's \$0.
* **Peer-to-peer latency.** Once the WireGuard tunnel is established, traffic flows directly between devices (when possible). No intermediary server in the data path.
* **Mature ecosystem.** Tailscale has been in production since 2019. It's well-documented, widely deployed, and integrates with dozens of identity providers.
* **Tailscale Funnel and LM Link.** Funnel exposes a tailnet service on a public `*.ts.net` URL (ports `443`, `8443`, `10000` only). LM Studio's LM Link feature uses Tailscale under the hood for one-click sharing.
* **Works offline.** With Headscale as a self-hosted coordination server, Tailscale works on a fully airgapped network. Tokios requires internet to reach its gateway.
* **Full infrastructure control.** You own every node. No third-party service sits between your client and your model.

## Where Tokios wins

* **Per-user API keys.** Each `sk-tok-…` key is scoped to specific deployments. Revoke one key without touching others. Tailscale has no per-request auth — anyone on the tailnet reaches the model with no credential.
* **No client software needed.** Any HTTP client can call `api.tokios.com`. Coding agents (Claude Code, Cline, Cursor), chat apps, and scripts work with a base URL and API key — no VPN client to install.
* **OpenAI + Anthropic protocol translation.** Tokios translates between OpenAI and Anthropic API formats at the gateway. Point an Anthropic-compatible client at Tokios and it speaks the right protocol to your backend. Tailscale forwards a raw port.
* **Works with any HTTP client.** A teammate's laptop, a cloud-hosted agent, a CI pipeline — none of them need to join a VPN. Just a URL and a key.
* **CGNAT traversal built-in.** Tailscale handles CGNAT via DERP relays (which add latency). Tokios's outbound-only connection passes through CGNAT natively with no relay overhead.

## When to choose Tailscale

* **Solo dev or small team controlling all devices.** You have 2–4 machines, you control all of them, and you want peer-to-peer access with no intermediary.
* **Multi-purpose VPN needs.** You also want SSH access, file sharing, or internal service discovery — not just model API access.
* **Offline or airgapped environments.** With Headscale, Tailscale runs entirely on your network with no external dependency.
* **Budget is \$0.** The free tier covers personal use with no data caps on peer-to-peer traffic.

## When to choose Tokios

* **Need API key management.** Multiple teammates or external users each need their own scoped credential.
* **Coding agent compatibility.** Claude Code, Codex, Cline, and similar tools expect a base URL + API key — not a VPN connection.
* **No client software.** Callers are scripts, CI pipelines, or SaaS apps that can't install a VPN client.
* **Team access without VPN.** You want to hand someone a URL and a key, not onboard them onto a tailnet.

## Using both together

Tailscale and Tokios aren't mutually exclusive — they operate at different layers and complement each other:

* **Tailscale for infrastructure access.** SSH into the model server, access Grafana dashboards, reach internal services — all over the tailnet.
* **Tokios for API-layer access.** Hand out `sk-tok-…` keys to teammates, coding agents, and chat apps that need to call the model but don't need (or shouldn't have) full network access.

Running both on the same machine is straightforward — Tailscale manages the mesh network on its own interface, and the Tokios connector dials out independently. They don't conflict.

> [card] [Your tailnet deserves a proper AI API](https://docs.tokios.com/blog/your-tailnet-deserves-a-proper-ai-api.md)
>
> Blog post: graduate your tailnet with per-user API keys and OpenAI-compatible endpoints.

> [card] [Team access](https://docs.tokios.com/use-cases/team-access.md)
>
> Full walkthrough for giving your team API access to your local models.

> [card] [Remote access comparison](https://docs.tokios.com/guides/remote-access-comparison.md)
>
> Security comparison of SSH, Tailscale, Cloudflare Tunnel, and Tokios.

> [card] [When to use Tokios](https://docs.tokios.com/guides/when-to-use-tokios.md)
>
> An honest guide to when Tokios is — and isn't — the right choice.


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