Blog, Security, November 20, 2026
How to Secure a Private LLM Server: A Practical Checklist
Self-hosting keeps your data in-house, but only if the server itself is locked down. Here is what to do, in order.
Running a model on your own hardware removes the biggest privacy risk of cloud AI: your prompts and documents no longer go to a third party. But a badly configured inference server can leak just as much. Ollama, vLLM and llama.cpp all expose an HTTP API, and by default most of them trust anyone who can reach that port.
This checklist covers the steps that matter most, in the order we would do them.
1. Never expose the model API to the internet
The single most common mistake is opening port 11434 (Ollama) or 8000 (vLLM) on the router “just to test from my phone”. Scanners find these within hours, and an open endpoint lets anyone run your GPUs, pull your models or read whatever your RAG pipeline can reach.
- Bind the inference server to
127.0.0.1or a private interface only. For Ollama setOLLAMA_HOST=127.0.0.1:11434. - Put a reverse proxy (Caddy or Nginx) in front of anything users touch, with TLS.
- For remote access, use a VPN such as WireGuard or Tailscale instead of port forwarding.
2. Put authentication in front of every interface
The raw model APIs have little or no authentication. Your users should only ever reach a front-end that does:
- Open WebUI supports local accounts, roles, and OIDC single sign-on (Google Workspace, Microsoft Entra, Authentik, Keycloak).
- If apps call the API directly, issue per-app API keys at the proxy and rotate them.
- Turn off open sign-up once your team is onboarded.
3. Isolate the server on the network
Treat the AI server like any other system that holds sensitive data.
- Put it on its own VLAN or subnet.
- Allow inbound traffic only from the proxy and admin hosts.
- Block outbound internet by default. The server only needs it to download models and updates; open it temporarily for those. This also stops a compromised tool or plugin from sending data out.
4. Lock down the host
- Use a supported LTS OS and enable automatic security updates.
- SSH with keys only; disable password and root login.
- Run inference services as unprivileged users or in containers with read-only model volumes.
- Keep GPU drivers and container runtimes patched. Driver vulnerabilities are published several times a year.
- Encrypt disks if the machine sits anywhere other than a locked room.
5. Control what the model can reach
Modern setups give models tools: web search, file access, code execution, database queries. This is where most real-world AI incidents happen.
- Prompt injection is unsolved. Assume any document, web page or email the model reads can contain instructions. Do not give a model both access to private data and a way to send data out (web requests, email) without human approval.
- Scope RAG document stores by user or team so the model cannot retrieve files the user should not see.
- Run code-execution tools in a sandbox with no network.
6. Log, but log carefully
You need audit logs to know who used the system and to investigate problems, but full prompt logs are themselves sensitive data.
- Log user, time, model and token counts by default.
- Store full prompts only if you need them, with a retention limit and restricted access.
- Send logs to a separate system so an attacker on the AI server cannot erase them.
7. Verify your models
Open-weight models are files you download from the internet. Prefer official publisher repositories on Hugging Face, check hashes, and prefer the safetensors or GGUF formats over Python pickle files, which can execute code when loaded.
8. Write down an update routine
Security is a habit, not a setup step. A monthly 30-minute routine is enough for most small teams: OS and driver updates, inference engine update, review of user accounts and API keys, and a quick look at the logs.
Our Security Hardening Checklist turns all of this into a printable, step-by-step list with exact config snippets for Ollama, vLLM, Open WebUI, Caddy and WireGuard.