How to Set Up Your Own AI at Home
Running Ollama, OpenWebUI, and Stable Diffusion on a CPU-only homelab server — installation, configuration, and integration.
I wanted to know what my R720 could do with AI workloads before spending anything on a GPU. Dual 6-core Xeons, 192GB of RAM, no accelerator at all. Three pieces: Ollama for inference, Stable Diffusion for images, OpenWebUI in front of both.
It all works. It is also 0.46 tokens per second, which is the number that ended the experiment — the full measurement is at the bottom.
Ollama
Ubuntu 22.04 VM on Proxmox, 20 cores and 64GB allocated.
curl -fsSL https://ollama.com/install.sh | shollama pull llama3ollama run llama3That drops you straight into an interactive session. If it answers at all, the install is done.
Stable Diffusion
Setup follows the AUTOMATIC1111 WebUI repo. Dependencies first:
# Debian/Ubuntusudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
# Red Hatsudo dnf install wget git python3 gperftools-libs libglvnd-glx
# openSUSEsudo zypper install wget git python3 libtcmalloc4 libglvndwget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh./webui.shThe default arguments assume a CUDA device and the first run dies on the torch check. Four flags in webui-user.sh fix that:
export COMMANDLINE_ARGS="--lowvram --precision full --no-half --skip-torch-cuda-test"--lowvram reduces memory pressure, --precision full and --no-half avoid half-precision maths CPUs handle badly, and --skip-torch-cuda-test skips a check that would fail regardless.
It binds to localhost by default, which is fine until OpenWebUI needs to reach it:
./webui.sh --listenThat puts it on 0.0.0.0:7860.

OpenWebUI
The easiest part of the whole setup — a ChatGPT-style front end over both of the above.
# Ollama on the same hostdocker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway \ -v open-webui:/app/backend/data --name open-webui --restart always \ ghcr.io/open-webui/open-webui:main
# Ollama on a different serverdocker run -d -p 3000:8080 -e OLLAMA_BASE_URL=https://example.com \ -v open-webui:/app/backend/data --name open-webui --restart always \ ghcr.io/open-webui/open-webui:main
# With an Nvidia GPUdocker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway \ -v open-webui:/app/backend/data --name open-webui --restart always \ ghcr.io/open-webui/open-webui:cudaOllama connects at http://ip_server_openwebui:3000/admin/settings/ → Models → Manage Ollama Models. Stable Diffusion connects under Images → AUTOMATIC1111 Base URL; press refresh before saving, because the field accepts an unreachable URL without complaint and only fails later when you ask for an image.



What CPU-only actually costs
Llama3 on dual Xeon E5-2620 v2s, one question, 457 tokens of answer:
| Metric | Value |
|---|---|
| Response Token/s | 0.46 |
| Prompt Token/s | 1.99 |
| Total Duration | 1072376.46 ms (~17 min 52 sec) |
| Load Duration | 61347.1 ms |
| Prompt Eval Count | 33 |
| Prompt Eval Duration | 16571.72 ms |
| Eval Count | 457 |
| Eval Duration | 994411.07 ms |
Eighteen minutes for one answer. It’s a working setup, not a usable one — as a way to learn the stack it’s fine, and as something anyone would sit in front of it isn’t. If your plan is to use this daily, buy the GPU first and skip this post.
I put a Tesla P40 in the R720 afterwards. Getting it through to the VM is its own problem, covered in the Proxmox GPU passthrough guide.
References
- TechnoTim — AI setup tutorial
- Sean Zheng — Running Llama 3 with an NVIDIA GPU