MyPrivateClaw logo
MyPrivateClaw
Private AI Directory
local-ai 12 minApr 13· Updated Apr 14, 2026✓ Verified 2026-04-14

How to Access Ollama Remotely Without Exposing It to the Internet

Secure remote access to your local Ollama server using NordVPN Dedicated IP or Tailscale — no port forwarding, no public exposure.

Ollama VPN NordVPN Tailscale Remote Access Privacy

Running Ollama on a home server or Mac Mini is one of the best ways to keep your AI inference private. But the moment you want to reach that server from your laptop at a coffee shop, your phone on the road, or a remote office machine, you hit a wall: Ollama binds to localhost by default, and opening it to the public internet is a serious security risk. This guide walks through two proven approaches to solving that problem — one paid and frictionless, one free and worth the extra setup time.

THE EDGE — WEEKLY DIGEST

Get more guides like this in your inbox

No spam. Unsubscribe anytime.

Why You Should Never Expose Ollama Directly

Ollama's API has no authentication layer by default. If you bind it to 0.0.0.0 and forward port 11434 through your router, anyone who discovers that address can query your models, enumerate what you have installed, and consume your compute without restriction. Even with a firewall rule, your home IP is dynamic — it changes whenever your ISP reassigns it, breaking any allowlist you set up and potentially exposing the port during the transition window.

The right solution is to never put Ollama on the public internet at all. Instead, you create a private encrypted tunnel between your devices, so remote access looks and behaves like a local connection, with no public exposure.

Before setting up remote access, it helps to know which models your hardware can actually run at a usable speed. The table below maps common GPU and RAM configurations to the best ollama pull models for each tier, using Q4_K_M quantization (the recommended sweet spot between quality and memory efficiency) at an 8k context window. All VRAM figures are benchmarked values, not theoretical maximums.

Hardware TierVRAM / RAMRecommended Modelsollama pull commandApprox. Speed
Entry GPU (e.g. GTX 1650, RX 6500)4 GB VRAMLlama 3.2 3B, Qwen3 4Bollama pull llama3.2:3b30–50 tok/s
Mid-range GPU (e.g. RTX 4060, RX 7600)8 GB VRAMLlama 3.1 8B, Qwen3 8Bollama pull llama3.1:8b40–55 tok/s
High-end GPU (e.g. RTX 3080, RX 7800 XT)10–12 GB VRAMGemma 3 12B, Qwen3 14B (Q3_K_M), Phi-4 14Bollama pull gemma3:12b35–50 tok/s
Enthusiast GPU (e.g. RTX 4090, RX 7900 XTX)16–24 GB VRAMQwen3 32B, Gemma 3 27B, DeepSeek-R1 32Bollama pull qwen3:32b25–40 tok/s
Apple Silicon (M2/M3/M4 Pro or Max)32–64 GB unifiedQwen3 32B, Llama 3.3 70B (Q3_K_M)ollama pull llama3.3:70b20–35 tok/s
Workstation / Multi-GPU48 GB+ VRAMLlama 3.3 70B, Qwen2.5 72Bollama pull qwen2.5:72b15–25 tok/s
CPU-only (no GPU)16–32 GB RAMLlama 3.2 3B, Phi-4 Miniollama pull phi4-mini5–12 tok/s
NOTE**Quantization note:** Q4_K_M is the default for most Ollama model tags and the best starting point. If a model barely fits your VRAM, try Q3_K_M (smaller, slightly lower quality). If you have headroom, Q5_K_M or Q6_K gives noticeably sharper output on coding and reasoning tasks.

The Two Remote Access Approaches at a Glance

NordVPN Dedicated IPTailscale Exit Node
Cost~$3–5/month (add-on)Free (personal plan)
Setup time~10 minutes~30–45 minutes
Works withAny device, any appAny device, any app
Static IPYes — fixed, yours aloneYes — stable 100.x.x.x Tailscale IP
Kill switchBuilt-inManual (requires tailscale set)
Key expiryNeverEvery 180 days (can disable)
Best forSimplicity, reliabilityZero ongoing cost, homelab users

Neither approach requires port forwarding, a static ISP IP, or any changes to how Ollama is configured.

NordVPN's Dedicated IP add-on assigns you a fixed IPv4 address that belongs exclusively to your account. Every device you connect through NordVPN using that dedicated IP will appear to the outside world as coming from that single, stable address. This is the simplest path to reliable remote Ollama access.

Step 1: Purchase a Dedicated IP

Add the Dedicated IP option to your NordVPN subscription from the NordVPN account dashboard. During checkout you select a country for your dedicated IP server. Choose the country closest to your home server for lowest latency. After purchase, the IP is assigned to your account within a few minutes and visible in your Nord Account under Dedicated IP.

Step 2: Install NordVPN on Your Home Server

On macOS (Mac Mini M4):

bash
# Download the NordVPN macOS app from nordvpn.com
# Or install via Homebrew:
brew install --cask nordvpn

Log in with your Nord account credentials, then connect to your dedicated IP server:

1. Open the NordVPN app and click All Locations. 2. Select Dedicated IP from the category list. 3. Click your dedicated IP server to connect.

Your Mac Mini's outbound traffic now exits through your fixed dedicated IP address.

Step 3: Configure Ollama to Listen on the VPN Interface

By default Ollama only listens on 127.0.0.1. You need it to also accept connections from the VPN interface. Set the OLLAMA_HOST environment variable:

bash
# For launchd (macOS persistent service):
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"

# Or set it in your shell profile and restart Ollama:
export OLLAMA_HOST="0.0.0.0:11434"
ollama serve
NOTE**Security note:** Setting `OLLAMA_HOST` to `0.0.0.0` makes Ollama listen on all interfaces, including your VPN interface. This is safe as long as your firewall blocks port 11434 from the public internet — which it should by default on macOS. You can verify with `sudo lsof -i :11434`.

Step 4: Connect Your Remote Device

On any remote device (laptop, phone, another Mac), install NordVPN and connect to the same dedicated IP server. Both devices are now on the same NordVPN server, and your Mac Mini is reachable at its local LAN IP or its VPN-assigned IP.

To find the VPN-assigned IP on the Mac Mini:

bash
ifconfig | grep "inet " | grep -v 127.0.0.1

From your remote device, test the connection:

bash
curl http://<mac-mini-vpn-ip>:11434/api/tags

If you see your model list, remote access is working.

Step 5: Enable the Kill Switch

In the NordVPN macOS app, go to Preferences → Kill Switch and enable it. This ensures that if the VPN connection drops, all internet traffic is blocked rather than falling back to your unprotected home IP. For a server running unattended, also enable Auto-connect so NordVPN reconnects automatically after a reboot.

Option 2: Tailscale Exit Node (Free — More Setup Required)

Tailscale creates a private mesh network (called a tailnet) between all your devices. Each device gets a stable 100.x.x.x IP address that never changes, regardless of what physical network it's on. You don't need a dedicated IP add-on — the Tailscale IP is your stable identifier.

The tradeoff is that the setup involves more steps, and you need to manage key expiry (device keys expire every 180 days by default, though you can disable this for server nodes).

Step 1: Create a Tailscale Account

Sign up at tailscale.com — the personal plan is free for up to 100 devices. No credit card required.

Step 2: Install Tailscale on Your Home Server

On macOS:

bash
brew install tailscale

Start and authenticate:

bash
sudo tailscaled &
tailscale up

This opens a browser window to authenticate the device with your Tailscale account. After authentication, the Mac Mini appears in your Tailscale admin console with a stable 100.x.x.x IP.

Step 3: Advertise the Mac Mini as an Exit Node

This step routes your remote device's traffic through the Mac Mini, giving you a consistent egress IP:

bash
tailscale set --advertise-exit-node

Then go to the Tailscale admin console, find your Mac Mini, click the menu, select Edit route settings, and enable Use as exit node.

Step 4: Disable Key Expiry on the Server Node

By default, Tailscale device keys expire every 180 days and require re-authentication. For a headless server, this is disruptive. In the admin console, find your Mac Mini, click ⋯ → Disable key expiry. This keeps the node permanently authenticated.

Step 5: Configure Ollama

Same as the NordVPN approach — set OLLAMA_HOST to listen on all interfaces:

bash
export OLLAMA_HOST="0.0.0.0:11434"
ollama serve

Step 6: Connect Your Remote Device

Install Tailscale on your remote device and log in with the same account. Your Mac Mini's Tailscale IP (e.g., 100.64.0.1) is now reachable from anywhere:

bash
curl http://100.64.0.1:11434/api/tags

To use the Mac Mini as an exit node on your remote device (so all traffic routes through it):

bash
tailscale set --exit-node=<mac-mini-tailscale-ip>

Or select it from the Tailscale system tray menu under Exit Node.

A Note on Tailscale's Complexity

The exit node approach requires approving the node in the admin console, managing key expiry, and understanding the difference between subnet routing and exit node routing. For most users, the NordVPN approach is significantly less error-prone. Tailscale is the right choice if you're already running a homelab, are comfortable with CLI tools, and want zero ongoing subscription cost.

Choosing the Right Approach

If you want something that works in under 10 minutes and stays working without maintenance, NordVPN Dedicated IP is the better choice. The ~$4/month is a small price for the reliability and simplicity, especially if you're running Ollama as part of a production pipeline or accessing it frequently from multiple devices.

If you're already a Tailscale user, or you're building a homelab and want to avoid any recurring costs, the exit node approach is excellent. The setup is more involved, but once it's running it's rock-solid — Tailscale's infrastructure is mature and the 100.x.x.x address space is stable across reboots and network changes.

Either way, the key principle is the same: keep Ollama off the public internet entirely, and use an encrypted private network to bridge the gap between your devices. Your models, your prompts, and your inference stay private — no cloud middleman, no exposed ports, no dynamic IP headaches.

References

[1] NordVPN Dedicated IP — https://nordvpn.com/features/dedicated-ip/

[2] How to connect to your NordVPN dedicated IP server on macOS — https://support.nordvpn.com/hc/en-us/articles/19678530026641

[3] Tailscale Exit Nodes documentation — https://tailscale.com/docs/features/exit-nodes

[4] Tailscale: Connect to external services with IP block lists — https://tailscale.com/docs/concepts/ip-blocklist-relays

[5] Ollama FAQ: How do I configure Ollama server? — https://github.com/ollama/ollama/blob/main/docs/faq.md

[6] Ollama VRAM Requirements: Complete 2026 Guide — https://localllm.in/blog/ollama-vram-requirements-for-local-llms

Read next

RELATED GUIDES