New Tool Radar

Local AI

How to Reach Ollama on Another Device over Tailscale

Join your Ollama machine and your laptop to the same Tailscale network, then call the model over its private Tailscale address.

Schematic diagram with three steps: join both machines to the Tailnet with tailscale up, bind Ollama with OLLAMA_HOST 0.0.0.0:11434, then call it from the laptop at its Tailscale address.

Ollama on its own only answers on the machine it runs on, and it has no login: anyone who can reach port 11434 can use your models. Tailscale fixes the reach without opening anything to the internet. It “creates an encrypted mesh network between all your devices, based on WireGuard”, and each device gets a fixed IP address in its private network, called a Tailnet. Your laptop then talks to the home machine as if it were on the same network, from anywhere.

Three steps on the Ollama machine

The Tailscale guide’s own order is: install Tailscale, make Ollama listen beyond localhost, and let the firewall allow the port only on the Tailscale interface. The Ollama FAQ confirms the starting point: “Ollama binds 127.0.0.1 port 11434 by default.”

Step What to do
1. Install Tailscale Install the client on both machines and sign in; on Ubuntu, curl -fsSL https://tailscale.com/install.sh | sh then sudo tailscale up
2. Bind Ollama Set OLLAMA_HOST=0.0.0.0:11434 and restart Ollama
3. Open the firewall narrowly On Ubuntu with UFW: sudo ufw allow in on tailscale0 to any port 11434, so the port is open only on the Tailscale interface

Try it: check from the laptop

With both machines in the same Tailnet, the server has a Tailscale IP such as 100.64.0.1 in the guide’s example. Check the connection from the laptop before sending a real prompt.

tailscale status

curl http://100.64.0.1:11434/

Check What you should see
tailscale status Both devices listed with their Tailscale IPs and online status
ping 100.64.0.1 Replies, which means the mesh network is active
curl http://100.64.0.1:11434/ The request reaches Ollama instead of a connection error

If MagicDNS is enabled in the Tailscale admin console, you can use the device name instead of the IP, such as curl http://ollama-server:11434/.

Expected result. We checked the Tailscale guide for AI services and the Ollama FAQ. We did not install Tailscale or change OLLAMA_HOST on this machine.

Limits

Setting OLLAMA_HOST to 0.0.0.0 makes Ollama listen on every interface, not just Tailscale, so the firewall rule matters: the guide warns that a plain ufw allow 11434 opens the port on all interfaces, and you should allow it only on tailscale0. Do not forward port 11434 on your router instead: the whole point of the Tailscale route is that no port is exposed to the internet, and Ollama has no authentication by default. Tailscale’s free plan covers personal use with up to 100 devices, according to the guide. We did not test any of this ourselves.

Sources

See all