Home / use case

A homelab llama-server on Fedora that runs as a systemd service and swaps models on demand

At a glance
Models & engines
Fedora VM with llama.cpp built from source, relocated to /opt/llama.cpp/build/bin
GGUF models in /home/ai/models, for example Gemma 3 4B Instruct at Q4_K_M
A systemd user unit for llama-server, with loginctl enable-linger for that user
Key gotcha
The server wasn't reachable from another machine at first because Fedora's firewalld was blocking the port; disabling it fixed that.

What they built

mr-tinkerer runs a dedicated local AI virtual machine on Fedora in their homelab and documents how they turned llama.cpp's llama-server from a manual command into a persistent service.

Instead of hard-coding one model per server start, the server points at a whole folder of downloaded models, so the model can be chosen at request time, including vision-capable ones.

Open WebUI serves as the chat front end, and an Nginx reverse proxy gives access by name on the home network.

Setup

  • Fedora VM with llama.cpp built from source, relocated to /opt/llama.cpp/build/bin
  • GGUF models in /home/ai/models, for example Gemma 3 4B Instruct at Q4_K_M
  • A systemd user unit for llama-server, with loginctl enable-linger for that user
  • Open WebUI as the front end and Nginx as a reverse proxy

How it works

  1. They first ran the server by hand with --host 0.0.0.0, 4 threads, a 28762-token context and a single Gemma 3 4B model to check the configuration.
  2. Passing --models-dir instead of a single model file lets llama-server's model picker switch between any downloaded model.
  3. The service binds to the fixed LAN IP 10.10.0.5 on port 9931 with --no-webui, since Open WebUI took over the interface.
  4. Restart=on-failure with RestartSec=1 gives a fast restart loop, and enabling linger keeps the user service running with nobody logged in.

Results & numbers

  • llama-server now stays up persistently, restarts on failure, and serves any model in the folder to Open WebUI over the LAN.

Gotchas

  • The server wasn't reachable from another machine at first because Fedora's firewalld was blocking the port; disabling it fixed that.
  • They moved off the old default port 8080 to 9931 because llama.cpp's default is changing in a future release.
  • As a user unit, the [Install] target is default.target rather than multi-user.target, and without linger the service would stop at logout.

Do it yourself

  1. Build or install llama.cpp and put your GGUF models in one folder.
  2. Test by hand: `llama-server --host 0.0.0.0 -c 28762 -m ~/models/<model>.gguf`, and open the firewall port if other machines can't connect.
  3. Write a systemd user unit whose ExecStart runs llama-server with --host <LAN IP>, --port 9931, --no-webui and --models-dir <folder>.
  4. Set Restart=on-failure and RestartSec=1, use WantedBy=default.target, and run `loginctl enable-linger <user>`.
  5. Point Open WebUI at the server's OpenAI-compatible endpoint.
ExecStart=llama-server --host 10.10.0.5 --port 9931 --no-webui -t 4 -c 28762 --models-dir /home/ai/models/
Source: mr-tinkerer (homelab notes) · Published 2026-11-03 · Added 2026-11-04. This write-up summarizes the original source; see it for full details.

Similar setups

A private OpenAI-compatible LLM API on an AMD GPU with llama.cpp

A Vietnamese developer's notes on building llama.cpp for AMD cards, choosing between Vulkan and ROCm, and running llama-server as a locked-down systemd service that existing OpenAI SDK code can call.

DEV Community (EME GUG) · 2026-11-27

Switching two local GGUF models on a home server from Telegram

A personal assistant on a VPS uses a home server's RTX 3060 through llama.cpp, and its owner added a second local model and a Telegram /model switch, fixing OOM builds, GPU numbering and 64k context on the way.

DEV Community (metis atelier) · 2026-11-24

NixNet: a Tailscale-only private AI box with Ollama, Open WebUI, Whisper and Piper on a 128 GB Minisforum

NixFred runs Ollama on ROCm (80 GB cap), Open WebUI 0.13.0, Whisper, Piper, SearXNG and ComfyUI on a Minisforum MS-S1 MAX under Proxmox, sharing chat and media with friends only over Tailscale.

X · 2026-11-06

A one-script Ubuntu install that stands up Ollama and Open WebUI as a private ChatGPT in the browser

HendGrow’s guide 50 ships a Bash installer that detects NVIDIA GPU or CPU, deploys pinned Ollama and Open WebUI with Docker Compose on Ubuntu 24.04, pulls a small starter model, and opens the UI on port 3000.

HendGrow · 2026-11-05