Skip to main content
You’ve got a GPU box running Ollama or vLLM on your tailnet. You access it from your laptop, your phone, maybe a few friends or teammates. Tailscale handles the networking — SSH, file sharing, maybe even Funnel for external access. It works. But there’s friction. You’re sharing a raw 100.x.y.z:11434 address. Everyone on your tailnet has the same access. There’s no per-user authentication, no model scoping, no way to revoke one person without disrupting everyone. And when someone asks “how do I use this from Claude Code?” you’re sending them a 6-step setup guide involving environment variables and base URLs. There’s a better layer for AI API access specifically — and you don’t have to replace Tailscale to add it.

What Tailscale gets you right

Tailscale is excellent at what it does:
  • Zero-config mesh networking. Your devices find each other automatically, even behind CGNAT.
  • Peer-to-peer latency. Direct WireGuard tunnels, no relay server in the middle.
  • Offline with Headscale. Self-host the coordination server and your tailnet works without Tailscale’s cloud.
  • Mature ecosystem. 10+ years of development, thousands of integrations, active community.
  • Free for personal use. Up to 100 devices on the free tier.
For infrastructure access — SSH, file sharing, internal service discovery — Tailscale is the right tool. You’re not going to replace it, and you shouldn’t.

What Tailscale doesn’t do for AI APIs

Tailscale is a network layer. It gets your devices connected. But for AI API access specifically, you’re still missing:

1. Per-user authentication

Your Ollama instance on 100.x.y.z:11434 has no authentication. Anyone on your tailnet can call it. If you want to restrict access, you need to add a reverse proxy with basic auth, or configure Ollama’s experimental API key support (single shared key, not per-user). vLLM and llama.cpp have optional single-key authentication, but it’s the same key for everyone. There’s no per-user scoping, no way to give Alice access to model A and Bob access to model B, no way to revoke Alice’s access without affecting Bob.

2. OpenAI-compatible endpoint for remote clients

Tailscale Funnel exposes your local service to the internet, but it’s still the raw Ollama/vLLM API — no authentication, no model scoping. And Funnel has limitations: it only works for HTTP/HTTPS (not raw TCP), and it’s subject to Tailscale’s terms of service. When a teammate asks “can I use this from my phone without installing Tailscale?” or “can I point my n8n workflow at this?” the answer is “not easily.”

3. Protocol translation

Your local model speaks Ollama API or vLLM API. Your coding agents (Claude Code, Cursor, Cline, Codex) speak OpenAI API or Anthropic API. You need a translation layer. Tailscale doesn’t provide this. You’d need to run LiteLLM, LocalAI, or a custom proxy on your tailnet — another service to maintain, another port to expose, another thing that can break.

4. Streaming without buffering

Tailscale Funnel and Cloudflare Tunnel both have issues with Server-Sent Events (SSE) buffering. When your model streams a response token-by-token, the proxy buffers the entire response before sending it to the client. The result: your “streaming” chat interface feels like it’s hanging for 10 seconds, then dumps the entire response at once. This breaks the UX for interactive chat, code completion, and any streaming use case.

The graduation path: add Tokios on top

Tokios is not a Tailscale replacement. It’s an API layer that sits on top of your existing infrastructure — including your tailnet. Here’s how they stack:
  • Tailscale handles your mesh network. SSH, file sharing, internal services, device discovery — all still on Tailscale.
  • Tokios handles your AI API access. Per-user authentication, model scoping, OpenAI-compatible endpoint, outbound-only tunnel (no Funnel needed), streaming without buffering.
You can run both on the same machine. Tailscale manages the mesh network on its own interface. The Tokios connector dials out independently to api.tokios.com. They don’t conflict.

What you get

  1. Per-user API keys. Each teammate gets their own sk-tok-… key, scoped to specific models. Alice gets access to team-llama and team-qwen. Bob gets only team-llama. You revoke Alice’s key — Bob is unaffected.
  2. OpenAI-compatible endpoint. Your team calls https://api.tokios.com/v1 with their API key. Any OpenAI-compatible client works — Python SDK, JavaScript SDK, curl, Claude Code, Cursor, Cline, Continue, Open WebUI. No Tailscale client needed on their device.
  3. Outbound-only tunnel. The Tokios connector dials out to api.tokios.com. No inbound ports, no Funnel, no port forwarding. Works behind CGNAT, corporate firewalls, NAT. Your model stays on 127.0.0.1:11434 — the connector is the only thing that reaches it.
  4. Streaming without buffering. Tokios handles SSE correctly. Your streaming chat interface streams. Your code completion completes in real-time. No 10-second buffering delay.
  5. Model routing. Serve multiple models (Ollama, vLLM, llama.cpp) through one endpoint. Register deployments like team-llama, team-qwen, team-coder. Route them to different upstream models or different runtimes. Your team calls the deployment name; you swap the backend without touching their client config.

Setup in 5 minutes

1

Install the Tokios connector on your model host

Get your claim code from the dashboard.
2

Point the connector at your local model

Your model stays on localhost. The connector dials out.
3

Register a deployment

On the Models tab, map your upstream model to a public name:
  • Upstream: llama3.1
  • Deployment: team-llama
4

Create API keys for your team

On the Keys tab, create a key for each teammate. Scope it to team-llama. Share the key and the endpoint URL (https://api.tokios.com/v1).
5

Your team calls the API

No Tailscale client needed. No SSH tunnel. No port forwarding.

When to use Tailscale alone

Tailscale is the right choice when:
  • You’re the only user. Personal multi-device access — your laptop, your phone, your desktop. You control all the devices, and you don’t need per-user authentication.
  • You need infrastructure access. SSH, file sharing, internal service discovery — not just AI API access.
  • You’re offline or air-gapped. 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 add Tokios

Tokios is the right addition when:
  • You need API key management. Multiple teammates or external users each need their own scoped credential.
  • You want coding agent compatibility. Claude Code, Cursor, Cline, and similar tools expect a base URL + API key — not a VPN connection.
  • Your callers can’t install client software. Scripts, CI pipelines, SaaS apps, or teammates on managed devices that can’t install Tailscale.
  • You want team access without VPN. Hand someone a URL and a key, not onboard them onto a tailnet.
  • You need streaming without buffering. Tailscale Funnel and Cloudflare Tunnel both have SSE buffering issues. Tokios handles streaming correctly.

Using both together

The best setup for most teams: Tailscale for infrastructure access, Tokios for AI API access.
  • SSH into your model server over Tailscale.
  • Access Grafana dashboards over Tailscale.
  • Reach internal services over Tailscale.
  • Call your local model’s AI API over Tokios.
They operate at different layers and complement each other. Tailscale manages the mesh network. Tokios manages the AI API gateway. Running both on the same machine is straightforward — they don’t conflict.

The migration path

If you’re already using Tailscale Funnel to expose your model to the internet, the migration to Tokios is painless:
  1. Install the Tokios connector alongside Tailscale.
  2. Point it at your local model (same 127.0.0.1:11434 address).
  3. Register deployments and create API keys.
  4. Update your team’s client config to use https://api.tokios.com/v1 instead of the Funnel URL.
  5. Disable Tailscale Funnel for the model port (keep it for other services).
Your team gets per-user authentication, model scoping, and streaming without buffering. You keep Tailscale for everything else.

Next steps