Ollama + Tailscale: Access Your Private Local AI From Any Device Without Exposing It to the Internet
_Last updated: 2026-06-26_
Here is the situation: you set up Ollama on your home workstation. It runs Llama 4 Scout at speeds that make your laptop look embarrassing. Your prompts never leave your machine. It is everything a privacy-conscious developer wants.
Then you open your laptop at a client site and reach for ChatGPT out of habit, because your local AI is sitting at home, unreachable.
This guide solves that. Using Tailscale — a zero-config private networking layer — you can expose your Ollama instance exclusively to your own devices, reachable from anywhere, with no open ports, no cloud middleman, and no data leaving your private network.
The result: your private AI travels with you.
Why Not Just Open a Port?
The naive solution is to open port 11434 on your router and point it at your workstation. Do not do this.
Ollama's API has no built-in authentication. Anyone who discovers your IP can send requests to your model, read your response history, and use your GPU for free. There have been incidents of exposed Ollama instances being scraped by automated scanners within hours of going live.
A VPN solves the authentication problem but most VPN setups require either a commercial VPN service (your traffic now goes through someone else's server) or a self-hosted WireGuard configuration that is genuinely tedious to maintain.
Tailscale gives you the WireGuard foundation without the configuration overhead. It creates a private mesh network between your devices using WireGuard under the hood, authenticated through your identity provider (GitHub, Google, Apple, or email). Every device on your tailnet gets a stable private IP in the 100.x.x.x range. Traffic between devices is end-to-end encrypted and never routed through Tailscale's servers — they handle the key exchange and NAT traversal coordination, but your actual data moves peer-to-peer.
The free personal tier covers up to 100 devices and 3 users — more than enough for a solo developer.
What You Need Before Starting
- Host machine: macOS, Linux, or Windows with Ollama already installed and at least one model pulled
- Client machine: any device you want to connect from (laptop, desktop, phone)
- Tailscale account: free at tailscale.com — sign up with GitHub or Google
- Open WebUI (optional but recommended): a browser-based frontend for Ollama
If you have not set up Ollama yet, start with our beginner's guide to running AI locally and come back here once you have a model running.
Step 1: Install Tailscale on Both Machines
Install Tailscale on your host machine (where Ollama runs) and your client machine (where you want to connect from).
macOS:
```bash
brew install tailscale
sudo tailscaled install-system-daemon
tailscale up
```
Linux (Ubuntu/Debian):
```bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
```
Windows:
Download the installer from tailscale.com. After install, click the Tailscale tray icon and sign in.
After running tailscale up on each machine, you will be prompted to authenticate through your browser. Once authenticated, run:
```bash
tailscale ip -4
```
This prints your machine's Tailscale IP (e.g., 100.64.x.x). Note the host machine's IP — you will use it shortly.
Verify both machines appear in your tailnet by visiting the Tailscale admin console at tailscale.com/admin/machines. You should see both listed with green status indicators.
Step 2: Configure Ollama to Listen on Your Tailscale IP
By default, Ollama only listens on 127.0.0.1 (localhost). It needs to also listen on your Tailscale IP so remote devices on your tailnet can reach it.
macOS (LaunchAgent):
```bash
sudo launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
Then restart Ollama
pkill ollama && ollama serve
```
Linux (systemd):
```bash
sudo systemctl edit ollama
```
Add the following to the editor:
```ini
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
```
Save, then:
```bash
sudo systemctl daemon-reload
sudo systemctl restart ollama
```
Why 0.0.0.0 and not the specific Tailscale IP?
Binding to 0.0.0.0 makes Ollama listen on all interfaces, including your Tailscale interface (tailscale0 on Linux, a virtual adapter on macOS). Your Tailscale network ACLs (configured in the admin console) control which devices can actually reach this port — the bind address alone does not expose you to the internet.
If you want to bind only to your Tailscale IP for belt-and-suspenders defense:
```bash
OLLAMA_HOST="100.64.x.x:11434" # your actual Tailscale IP
```
Step 3: Lock Down Access With Tailscale ACLs
By default, all devices in your tailnet can talk to each other. For a personal setup this is fine. If you share your tailnet with anyone else (family members, teammates), you want to restrict Ollama access explicitly.
In the Tailscale admin console, navigate to Access Controls and add a rule:
```json
{
"acls": [
{
"action": "accept",
"src": ["tag:personal-devices"],
"dst": ["tag:ai-host:11434"]
}
],
"tagOwners": {
"tag:personal-devices": ["autogroup:owner"],
"tag:ai-host": ["autogroup:owner"]
}
}
```
Tag your workstation as ai-host and your laptop/phone as personal-devices in the Machines view. This ensures only your approved client devices can reach port 11434 on your host — even if a guest device is added to your tailnet later.
Step 4: Connect From Your Client Machine
From your client machine, test the connection:
```bash
curl http://100.64.x.x:11434/api/tags
```
Replace 100.64.x.x with your host's Tailscale IP. You should see a JSON list of your installed models. If you get a timeout, verify that Ollama is running on the host (ollama serve) and that your firewall is not blocking port 11434.
Using the Ollama CLI remotely:
```bash
OLLAMA_HOST=http://100.64.x.x:11434 ollama run llama4:scout "Summarize the key differences between WireGuard and OpenVPN"
```
Your prompts go to your home machine over the encrypted Tailscale tunnel. Nothing touches OpenAI's servers. The model output comes back to your terminal through the same tunnel.
Connecting Open WebUI:
If you run Open WebUI on your client machine, point it at your host's Tailscale IP during setup:
```
OLLAMA_BASE_URL=http://100.64.x.x:11434
```
You now have a full browser-based AI interface on your laptop, powered by your home workstation, with no cloud in the loop.
Step 5: Add Proton VPN for Untrusted Networks
Tailscale's encryption is strong. But when you are on an airport Wi-Fi or hotel network, traffic metadata — which servers your device is connecting to, connection timing — can still leak to a network observer even when payload is encrypted.
Layering Proton VPN over Tailscale adds a second hop through Proton's servers, masking your Tailscale traffic from the local network observer. Your traffic pattern looks like any other VPN connection rather than revealing you are accessing a home network.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
The setup is straightforward: install the Proton VPN app on your client machine, connect to a server in your country, and then bring up Tailscale. The Tailscale connection runs inside the VPN tunnel. On macOS and Linux this works without additional configuration; on Windows you may need to enable the "Split Tunneling" or "LAN Allow" option in Proton VPN settings to keep the Tailscale virtual adapter accessible.
Proton VPN has a free tier with bandwidth limits and a paid tier at $4–$10/month with access to their full server network and dedicated servers in privacy-focused jurisdictions. The paid plan includes the "NetShield" DNS filter which blocks ad and tracking domains at the network level — useful when your AI-generated research includes clicking through to source links.
Storing Research Outputs Securely
The Tailscale setup keeps your inference private, but what happens to your research outputs?
If you export conversations, save AI-generated summaries, or store system prompt libraries, those files sitting in iCloud Drive or Google Drive undermine the privacy of the inference layer. The whole point of private AI is that your prompts and responses stay yours.
Tresorit solves this. It is a zero-knowledge encrypted cloud storage service: your files are encrypted on your device before upload, and Tresorit holds no key to decrypt them. This means your exported Ollama conversations, research notes, and custom system prompts are as private in the cloud as they are on your local machine.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
The practical workflow:
- Export your session or save your research output locally
- Save to a Tresorit sync folder
- On your client machine, the file appears in your Tresorit folder — encrypted in transit and at rest
For teams, Tresorit's shared workspaces let multiple people access the same encrypted folder without any of them — or Tresorit — being able to read it. This is the right answer for engineering teams who share prompt libraries, model configs, or AI-generated technical documentation.
When Tailscale Isn't the Right Tool
This setup works best when you have a device running Ollama that you control. If you are on your phone and need a quick lookup, launching Tailscale, waiting for connection, and running a mobile browser against your home machine is friction most people will not tolerate in a pinch.
For mobile research tasks and quick lookups that do not involve proprietary data, Perplexity Pro is the practical complement. It does not train on Pro subscriber queries, and its AI-search format means you are mostly asking questions rather than pasting sensitive content. The 90-day affiliate cookie on sign-ups makes it worth mentioning to your team if you recommend it.
Affiliate Disclosure: This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. We only recommend products we genuinely believe in. This helps support our work and allows us to continue providing free content.
Think of the stack this way:
- Proprietary code, client data, internal documents: local Ollama via Tailscale
- General research, public information, quick lookups: Perplexity Pro
- Document sync between machines: Tresorit
The goal is not to avoid cloud services entirely — it is to route the right workloads to the right tier of trust.
Troubleshooting Common Issues
"Connection refused" from client machine:
- Confirm Ollama is running on the host:
curl http://localhost:11434/api/tags - Confirm
OLLAMA_HOSTis set to0.0.0.0:11434and Ollama was restarted after the change - Check the host's firewall is not blocking port 11434:
sudo ufw allow 11434/tcpon Ubuntu
Tailscale connection drops after sleep:
- Tailscale reconnects automatically on wake, but there is usually a 5–15 second window. Add a retry to any script that hits the Ollama API.
Model responses are slow over Tailscale:
- Tailscale adds minimal latency (typically under 5ms on a home connection). If you are seeing slow responses, the bottleneck is model inference speed on the host, not the network.
Open WebUI shows "cannot connect to Ollama":
- Open WebUI remembers its last configured base URL. Navigate to Settings → Connections in Open WebUI and update the Ollama URL to
http://100.64.x.x:11434.
The Setup in Three Sentences
Install Tailscale on your host and client machines. Set OLLAMA_HOST=0.0.0.0:11434 on the host. Point your Ollama client or Open WebUI at the host's Tailscale IP.
Everything else in this guide — ACLs, Proton VPN, Tresorit — is belt-and-suspenders for higher-sensitivity workloads. The core setup takes under ten minutes.
Keep Learning
This guide pairs with our complete local LLM setup guide and our secure Ollama network hardening guide for deeper coverage of host-side security. If you use Ollama in VS Code or Python scripts, see how to connect your local AI to your development environment.
Want a weekly digest of private AI tools, setup guides, and privacy news — without the newsletter tracking pixels?
Join the PrivateAI list. Plain text. Unsubscribe any time.
Stay Updated
Join our newsletter for the latest updates.