# How to share a local LLM over the internet securely (no open ports)

Sharing the model on your GPU with a colleague, a hosted app or a few friends sounds simple until you think about who else can reach it. This guide covers how to share a local LLM over the internet securely, the checklist a safe setup must pass, and an outbound-only way to do it with no open ports.

Published 2026-11-15 · https://inpherio.co.uk/blog/share-a-local-llm-over-the-internet-securely

Key points:
- A safe shared endpoint needs authentication, rate limits, TLS and no inbound port on your network.
- Outbound-only connections mean there's nothing on your machine for scanners to find.
- The connector talks only to engines on localhost, never to other devices on your network, and never runs code from requests.
- Ten text engines, four embedding engines and several speech servers are supported, from Ollama and vLLM to Piper and whisper.cpp.

The moment a local model is useful, someone else wants to use it: a teammate, a staging server, a Discord bot, your own phone. Every local engine can listen on a network address, but none of them were designed to sit on the public internet. Here's how to share a local LLM over the internet securely, and what "securely" actually has to mean.

## The checklist a shared endpoint must pass

Whatever you build, check it against this list:

1. **Authentication on every request.** A key or token, checked before the request reaches the engine. Ollama and llama.cpp's server don't do this by default.
2. **TLS.** Prompts and replies shouldn't cross the internet in plain text.
3. **Rate limits.** One runaway script shouldn't be able to queue a thousand requests on your GPU.
4. **No inbound port if you can avoid it.** An open port is something to find, scan and attack. Outbound-only connections have nothing to find.
5. **Containment.** Whatever answers the internet shouldn't be able to reach the rest of your network, read your files or run code.
6. **Updates.** Whatever you expose must be patched, and the update channel itself must be trustworthy.

## Option A: reverse proxy plus auth

Nginx or Caddy in front of the engine, with TLS from Let's Encrypt and a bearer-token check, ticks boxes 1 to 3. You still forward a port (box 4), you own the patching (box 6), and the engine runs with whatever access your user has (box 5). It's a good choice if you're comfortable running a public server and want full control.

## Option B: outbound-only, with keys handled for you

The alternative is to never accept inbound connections at all. The [connector](/connector) runs next to your engine and dials out over one encrypted WebSocket (`wss://`). Requests arrive over that link, go to your engine on `127.0.0.1`, and the answers stream back. The public side, with API keys, rate limits, TLS and metering, is handled by the platform.

How it does against the checklist:

| Check | How it's met |
|---|---|
| Authentication | API keys on every request; node-scoped keys for your own use |
| TLS | HTTPS for callers, and an encrypted `wss://` link to your machine |
| Rate limits | Per key (60 a minute on chat for normal keys; 600 a minute per node for self-serve and rental keys) |
| No inbound port | Outbound only: nothing listens, no ports are opened, your router isn't touched |
| Containment | Talks only to engines on localhost, never to other devices on your network; requests carry data, never code; doesn't read your files |
| Updates | Updates itself only with releases signed by a key that isn't kept on the platform's servers, and rolls back a bad update itself |

On Linux it runs as a hardened systemd service under its own unprivileged user; on Windows as a service under its own restricted account. If a caller disconnects, it stops the engine straight away.

## Who can use your model

You choose:

- **Just you and your apps:** [self-serve](/self-serve) gives your node its own API key that only ever reaches your machine, at £0.
- **Your team or one customer:** a rental key locked to one node gives someone that machine for a fixed term. See [rentals](/rentals).
- **Anyone who'll pay:** list models on the [marketplace](/marketplace) at your prices and earn per request.



## Supported engines

Whatever you run today is probably supported:

- **Text and chat:** [Ollama](/engines/ollama), [vLLM](/engines/vllm), [llama.cpp](/engines/llama-cpp), [MLX](/engines/mlx), [LM Studio](/engines/lm-studio), text-generation-webui, KoboldCpp, Aphrodite, Hugging Face TGI and SGLang, plus Jan and GPT4All.
- **Embeddings:** Ollama, vLLM, Infinity and TEI.
- **Speech:** Speaches, Piper, Coqui XTTS and AllTalk for text-to-speech; Speaches and whisper.cpp for transcription.

The connector reads each engine's models and their real context windows, then benchmarks every model on your hardware before it can serve anything. If you're deciding which engine to run, our [vLLM install guide](/blog/how-to-install-vllm-pip-docker-or-wsl2-and-a-vllm-serve-that-works) and [LM Studio vs Ollama](/blog/lm-studio-vs-ollama-which-one-should-you-actually-install) are good places to start.

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

## Common mistakes when sharing a local model

- **`OLLAMA_HOST=0.0.0.0` on a laptop.** That exposes Ollama to every network the laptop joins: café Wi-Fi, conference networks, hotel rooms. If you must listen on all interfaces, do it on a fixed home server behind a firewall.
- **Docker publishing to all interfaces.** `-p 11434:11434` binds to `0.0.0.0` by default. Use `-p 127.0.0.1:11434:11434` unless you really mean to share it.
- **A shared key in a public repo.** If you hand out one bearer token and it leaks, everyone has it. Use one key per person or app, so you can switch off one without breaking the rest.
- **No rate limits.** One user's script can starve everyone else. Limit per key.
- **Forgetting the model store.** Ollama's API can pull and delete models. A leaked endpoint can fill your disk with 40 GB downloads.

## Setting it up with the connector

1. Sign in and open Nodes, then Add node. Name the machine and copy the one-line command; it carries a single-use install token that's valid for 2 hours, so your password never touches the machine.
2. Run it. The installer checks the clock, disk space and that the machine can reach the platform, finds your engine (or installs Ollama and a small starter model), downloads the connector and checks its size, SHA-256 and signature, registers the node and starts it as a background service.
3. Your models are benchmarked on your hardware and appear in your dashboard.
4. Choose how to share: a self-serve key for yourself, a rental for a team, or a marketplace listing.

Re-running a new install command on the same machine keeps its node, prices and benchmarks rather than creating a duplicate, so upgrades and reinstalls are safe.

## The honest limit

Outbound-only protects your machine. It doesn't make the prompts secret from you: whoever runs the hardware processes prompts in plaintext, which is true of every self-hosted model. If you're on the other side, sending sensitive data to someone else's GPU, read the [security page](/security) first. For your own data on your own machine, an outbound connector with keys is about as tight as sharing gets without running your own public server.

## FAQ

**Can I just put Ollama behind Nginx?** Yes, if you add bearer-token checks, TLS, rate limits and keep it patched. It still needs an open inbound port, which is what an outbound-only connection avoids.
**Does the connector open any ports?** No. It opens one encrypted WebSocket out to the platform. Nothing listens on your machine and your router isn't touched.
**Can people on the API reach other devices on my network?** No. The connector only talks to inference engines on the machine itself (localhost) and never to other devices on your network.
**Which engines does it support?** For text: Ollama, vLLM, llama.cpp, MLX, LM Studio, text-generation-webui, KoboldCpp, Aphrodite, Hugging Face TGI and SGLang, plus Jan and GPT4All. Infinity and TEI for embeddings; Speaches, Piper, Coqui and AllTalk for speech.
