# How to build a private AI server at home in 2026

Canonical: https://kextcache.com/build-privacy-first-local-ai-server-2026/
Published: 2026-01-09T00:29:32+05:30
Updated: 2026-01-09T00:29:32+05:30
Author: Sanjiv Shukla

A private AI server is a computer on your own network that runs open-weight language models, so your prompts are processed on your own hardware instead of by a cloud service. The usual build is a GPU with enough VRAM for the models you want, Ollama to download and run them, and Open WebUI for a ChatGPT-style chat page in the browser, all in Docker. Ollama's FAQ says: "Ollama runs locally. We don't see your prompts or data when you run locally." Its optional cloud models are the exception, and you can turn them off.

We have not run the NVIDIA commands on this page; they come from the official docs, checked on 18 Nov 2026. The Ollama and Open WebUI setup we did test, on an Intel home server and an AMD RX 5700 XT, is in our [self-hosting LLMs guide](/self-hosting-llms-privacy-cost-efficiency-guide/#Step-by-Step_Setup_Guide).

## Why run AI on your own server?

When you use a commercial AI service, your prompts and files go to someone else's servers. A local stack changes that:

- Your prompts stay on your network as long as you use local models. Ollama's cloud models are processed by Ollama, and its FAQ shows how to turn them off with `OLLAMA_NO_CLOUD=1`.
- You pick the model, so you decide how strict its guardrails are.
- Once a model is downloaded, it works without an internet connection.
- Open WebUI can answer questions from your own documents, so files you would not upload to a cloud service stay at home.

## Hardware: plan around VRAM

VRAM matters more than anything else in an AI server. CPU cores count for general self-hosting, but a language model runs fastest when all of it fits in the GPU's memory, and the layers that spill into system RAM run slower.

| **Component** | **Recommended spec** | **Why?** |
| --- | --- | --- |
| **GPU** | 24 GB of VRAM or more: NVIDIA RTX 4090 (24 GB) or RTX 5090 (32 GB) | CUDA is still the industry standard for local LLM inference. Ollama also runs on AMD cards through ROCm or Vulkan. |
| **RAM** | 64GB DDR5 | Holds the parts of larger models that don't fit in VRAM, though they run slower there. |
| **Storage** | 2TB NVMe Gen5 | Model files run to several gigabytes each (Mistral NeMo is 7.1 GB), and a fast drive loads them sooner. |
| **OS** | Ubuntu Server or Arch Linux | Minimal overhead. Ollama's Docker guide gives the NVIDIA Container Toolkit steps for apt (Ubuntu) and yum or dnf. |

A smaller card still works with smaller models. In the sizing table of our [self-hosting LLMs guide](/self-hosting-llms-privacy-cost-efficiency-guide/#Hardware_Requirements), 12 GB holds models up to about 12B to 14B parameters at 4-bit, and 24 to 32 GB holds 27B to 31B.

If the same machine will run other services, our list of [home server software for Linux](/best-home-server-software-for-linux-in-2025/) has ideas. On Proxmox, our guide to [AMD GPU passthrough into an LXC container](/proxmox-lxc-amd-gpu-passthrough/) shows how to hand an AMD card to a container.

## Software: Ollama, Open WebUI and LocalAI

Run everything in Docker containers, so the host OS stays clean and each part is easy to update or remove.

1. [Ollama](https://github.com/ollama/ollama) downloads, runs and manages models from a simple command line, and it handles quantized model files for you.
2. [Open WebUI](https://github.com/open-webui/open-webui) is a ChatGPT-like chat page in your browser that connects to your Ollama instance. It supports retrieval-augmented generation (RAG), so you can chat with your own PDF library. For a scripted take on RAG, see [automating RAG pipelines with Bash](/automate-rag-pipelines-with-bash-scripts/).
3. [LocalAI](https://github.com/mudler/LocalAI) serves models through the OpenAI API format, and its README also lists the Anthropic format and ElevenLabs-compatible speech. Apps that expect an OpenAI API key can point at your server instead.

## Step by step: run Ollama in Docker

*From the official docs: [Ollama's Docker guide](https://github.com/ollama/ollama/blob/main/docs/docker.mdx), checked on 18 Nov 2026. Not run by us on an NVIDIA card.*

### 1\. Install the NVIDIA Container Toolkit

Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installation), which Ollama's guide lists first for NVIDIA cards. On Ubuntu, add NVIDIA's apt repository as the guide shows, then install the toolkit and point Docker at it:

```bash
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
```

### 2\. Start Ollama with access to the GPU

This is the command from Ollama's guide with one change, `127.0.0.1:` in front of the port:

```bash
docker run -d --gpus=all -v ollama:/root/.ollama -p 127.0.0.1:11434:11434 --name ollama ollama/ollama
```

The guide publishes the port as `-p 11434:11434`, which opens it on every address of the machine. Docker's [port publishing docs](https://docs.docker.com/engine/network/port-publishing/) call that "insecure by default", and Ollama's local API "does not require authentication", so the `127.0.0.1:` prefix keeps the port reachable from the server itself only. On an AMD card, the guide uses the `ollama/ollama:rocm` image with `--device /dev/kfd --device /dev/dri` in place of `--gpus=all`.

### 3\. Download a model and chat with it

This runs the model and opens a chat with it in the terminal:

```bash
docker exec -it ollama ollama run mistral-nemo
```

Mistral NeMo is a 12B model built by Mistral AI with NVIDIA, and [Ollama's library](https://ollama.com/library/mistral-nemo) lists it as a 7.1 GB download (checked 18 Nov 2026). It is Mistral's own release, not an uncensored version. For those, see our [uncensored AI models guide](/uncensored-ai-models/).

### 4\. Add a chat page with Open WebUI

Our [self-hosting LLMs guide](/self-hosting-llms-privacy-cost-efficiency-guide/#Step-by-Step_Setup_Guide) has a Docker Compose file that runs Ollama and Open WebUI together, with both ports on 127.0.0.1. We tested it on 17 Nov 2026 with Ollama running on the CPU, so the file has no GPU settings.

### 5\. Set permissions and remote access

To run `docker` without `sudo`, add your user to the `docker` group with `sudo usermod -aG docker $USER`, then log out and back in. Docker's [post-install guide](https://docs.docker.com/engine/install/linux-postinstall/) warns that the group "grants root-level privileges to the user", so add only accounts you trust.

To reach the server from your phone or laptop, use a VPN instead of opening a port on your router. Our guide shows how to [set up a VPN to your home network](/set-up-vpn-to-home-network-guide/).

## Is a private AI server worth it?

It is if you work with prompts or documents you would not hand to a cloud service, or if you want to choose your own models and guardrails. A developer who wants a coding assistant that never sends code off the machine fits, and so does anyone keeping personal notes private. It can also share the box with the other [jobs a home server does](/server-uses-at-home-why-you-need-one-in-2025/).

For the software side and running costs, see our [guide to self-hosting LLMs for privacy and cost](/self-hosting-llms-privacy-cost-efficiency-guide/).
