# How to access Ollama remotely without port forwarding (free)

You've got Ollama running on a good GPU at home and you want it on your laptop at work, your phone, or a script on a server. Here are the honest options for accessing Ollama remotely without port forwarding, and the free one that gives you a proper API key and base URL.

Published 2026-11-17 · https://inpherio.co.uk/blog/access-ollama-remotely-without-port-forwarding

Key points:
- Never forward port 11434 to the internet: Ollama has no authentication of its own.
- A VPN such as Tailscale or WireGuard is private and free, but every device that calls the model has to join it.
- A tunnel gives you a public URL, but you still have to add authentication and keep it running.
- Self-serve gives your own machine an OpenAI-compatible endpoint with a key, for £0, with nothing opened on your router.

Running a model at home is the easy part. Using it from somewhere else is where most people get stuck. Ollama listens on `127.0.0.1:11434`, LM Studio on `1234`, vLLM on `8000`, and none of them were built to face the internet. The tempting fix, forwarding the port on your router, is the one to avoid.

This guide walks through the three ways to access Ollama remotely without port forwarding, what each costs you in setup and risk, and when each one makes sense.

## Why port forwarding Ollama is a bad idea

Ollama's API has no authentication. If `11434` is reachable from the internet, anyone who scans for it (and people do, constantly) can run prompts on your GPU, pull 40 GB models onto your disk and delete the ones you have. The same is true of most local engines in their default setup.

So the rule is simple: keep the engine on localhost, and put something in front of it that decides who gets in. There are three good ways to do that.

## Option 1: a private VPN (Tailscale, WireGuard, ZeroTier)

A mesh VPN puts your devices on one private network. Install it on the GPU box and on your laptop, set `OLLAMA_HOST=0.0.0.0` so Ollama listens on the VPN interface, and call `http://<box's VPN address>:11434` from anywhere.

**Good:** free for personal use, private, fast, nothing exposed publicly.

**Not so good:** every device and every service that calls the model must join the VPN. That's fine for your own laptop; it's awkward for a cloud server, a colleague, a hosted app or a phone where you don't want a VPN running all day. You also still have no API keys, usage logs or rate limits.

## Option 2: a tunnel (Cloudflare Tunnel, ngrok)

A tunnel opens an outbound connection from your machine and gives you a public HTTPS address that forwards to the engine. No router changes are needed.

**Good:** a real URL that works from any device.

**Not so good:** the URL is public, so you must add authentication yourself (Cloudflare Access, an auth proxy, or a reverse proxy that checks a bearer token). Free tunnels change address or time out, and you are now running and patching one more service. If you set this up, put the token check in front of Ollama, never behind it.

## Option 3: a hosted OpenAI-compatible endpoint for your own machine

The third option is to let a service hold the public side for you. With [self-serve](/self-serve), a small program called the [connector](/connector) runs next to your engine and dials out over an encrypted WebSocket. Nothing listens on your machine and no ports are opened. You then call your own hardware through a normal OpenAI-compatible base URL with a key, from any device:

```python
from openai import OpenAI
client = OpenAI(base_url="https://inpherio.co.uk/v1", api_key="YOUR_SELF_SERVE_KEY")
r = client.chat.completions.create(model="qwen3:8b",
        messages=[{"role": "user", "content": "Hello from my phone"}])
print(r.choices[0].message.content)
```

What you get:

- **£0.** Requests with a self-serve key go only to your node and are billed at zero: no platform fee, no per-token charge, no credit needed.
- **Your home IP stays hidden.** Apps call the public endpoint; only the connector talks to your machine, outbound.
- **A real API key.** One key per node, shown once. Making a new one switches the old one off.
- **Up to 600 requests a minute** per node, which is far more than one GPU can answer.
- **No silent fallback.** If your PC is off, the request fails. It never goes to someone else's hardware.

It works with the engines people already run, including Ollama, vLLM, llama.cpp, LM Studio and MLX. If you are still choosing an engine, our [vLLM vs Ollama comparison](/blog/vllm-vs-ollama-which-inference-engine-should-you-actually-run) and [LM Studio vs Ollama](/blog/lm-studio-vs-ollama-which-one-should-you-actually-install) cover the trade-offs.

(Live on Inpherio: https://inpherio.co.uk/models/qwen3:8b)

## Setting up self-serve in five minutes

1. **Install the connector.** Sign up, open Nodes, then Add node, and copy the one-line command it gives you. Run it on the machine with the GPU. It finds your engine and models by itself (or installs Ollama and a small model if you have none) and benchmarks each model on your hardware.
2. **Turn on self-serve.** On the Self-serve page of the console, tick Enable self-serve for the node and mint its key.
3. **Point your apps at it.** Base URL `https://inpherio.co.uk/v1`, your key, and a model name from your machine. That's it: Open WebUI, coding assistants, scripts and phone apps all work. If you want a shared chat front end on top, see [Open WebUI on your home network](/blog/open-webui-on-your-home-network-one-chat-url-for-ollama-vllm-and-lm-st).

## The bonus: your GPU earns while you're not using it

Self-serve has one more trick. When you aren't using your node, it can serve other people's requests on the [marketplace](/marketplace) at the prices you set, and earn. When your own request arrives, it takes priority: the node is reserved for you, and stays reserved for 10 minutes after your last request (you can set anything from 1 minute to 6 hours). One reservation lasts at most 6 hours in a row, then the node rejoins the marketplace until you next call it.

You don't have to list anything to use self-serve, but if your GPU sits idle most of the day it's worth a look at [what hosting pays](/providers).



## Which option should you choose?

| You want | Best fit |
|---|---|
| Only your own laptop, fully private | VPN (Tailscale, WireGuard) |
| A public URL you manage yourself | Tunnel plus an auth proxy |
| An API key and base URL that work from any device, free | Self-serve |
| To earn from the GPU when idle as well | Self-serve plus listing |

For most people who just want "my home model, from anywhere, with a key", the hosted endpoint is the least work and the least risk. For a strictly private setup where no third party sees traffic at all, a VPN is the right answer. The [security page](/security) explains exactly what passes through the endpoint and what doesn't.

## FAQ

**Is it safe to port forward Ollama?** No. Ollama's API has no login, so anyone who finds the port can use your GPU, pull models and fill your disk. Keep it on localhost and reach it through a VPN or an authenticated tunnel.
**Can I use my home Ollama from my phone?** Yes. Any app that lets you set an OpenAI-compatible base URL and key can call it, through a VPN on the phone or through a hosted endpoint that forwards to your machine.
**Does self-serve cost anything?** No. Requests with a self-serve key go only to your own node and are billed at £0, with no platform fee. The limit is 600 requests a minute per node.
**What happens if my PC is off?** A self-serve key never falls back to anyone else's hardware, so the request fails until your machine is back online.
