To Serve Admin

A practical cookbook for people who run servers

Linux · DevOps · Networking · Homelab · Cloud · Game Servers · AI Infra

§ 1.1 Guide

Running Local LLMs on Older Hardware: A Homelab Operator’s Guide

FIG. 1 — tsa-hero-157
Difficulty★☆☆☆☆
YieldYou will run a local LLM service on older hardware with managed resources and remote access.

The Operator Perspective: LLMs as Homelab Services

Treating a local Large Language Model (LLM) as a standard homelab service changes the operational focus. It is not an interactive chatbot; it is a stateful API endpoint that consumes significant memory, requires stable process management, and demands explicit network boundary decisions. The primary driver for this setup is privacy: keeping inference local ensures that prompts and generated responses do not transit through third-party cloud providers. However, this benefit comes with the operational burden of managing resource boundaries, process lifecycle, and network exposure yourself.

This guide approaches the deployment as a Linux service management task. The goal is to run a local API that can be queried by other homelab services (like a local search engine or automation script) or by a user via a web interface. The reference implementation uses Ollama, a tool designed to simplify the management of model artifacts and the inference engine. The test environment for this guide is a host equipped with two NVIDIA GeForce RTX 5060 Ti GPUs, each reporting 16,311 MiB of memory via nvidia-smi. This specific hardware configuration allows for running larger models than typical consumer CPUs, but the principles of resource management apply to older, CPU-only systems as well.

Hardware Constraints: RAM, CPU, and Storage Realities

Before installing software, you must audit the hardware. The three critical constraints are Random Access Memory (RAM), Central Processing Unit (CPU) core count, and storage space. These determine which models are viable and how fast they will run.

  • RAM Capacity: The model weights must fit in memory. If they do not fit in GPU memory, they spill to system RAM, which is significantly slower for inference. If they do not fit in system RAM either, the system will swap to disk, causing inference to become unusably slow. For a 27.3B parameter model, you need substantial memory headroom beyond just the model size to accommodate the context window and KV cache.
  • CPU Core Count: On systems without dedicated inference accelerators, the CPU performs the matrix multiplications. More cores generally mean faster token generation, but memory bandwidth is often the bottleneck. Older hardware with high core counts but low memory bandwidth will suffer from “memory-bound” performance.
  • Storage Space: Model artifacts are large. A 27.3B parameter model, depending on quantization, can range from 15 GB to 30 GB or more. You need enough disk space to store the model, the Ollama binary, and any logs. Ensure your storage device has sufficient I/O throughput; spinning disks will be a severe bottleneck during model loading.

Slow inference is the primary operational challenge on older systems. If your hardware cannot sustain a minimum token-per-second rate that is useful for your use case (e.g., >5 tokens/second for interactive use), the service is effectively down. You must choose a model size that fits your hardware constraints, not the other way around.

Installing Ollama and Managing Model Artifacts

Ollama simplifies the deployment by bundling the inference engine and model management. It is available locally on the test host and includes the qwen3.8-192k:latest model (27.3B parameters). This specific model is used here as a representative example of a mid-sized, high-capability model that pushes hardware limits.

Installation on Linux is straightforward. Ollama provides a single-binary installation script. Run the following to install the service:

curl -fsSL https://ollama.com/install.sh | sh

Once installed, Ollama runs as a systemd service. Verify the service status:

systemctl status ollama

Model artifacts are managed via the ollama CLI. To pull a model, specify the name and tag. In this case, the model is qwen3.8-192k:latest. Note that the tag latest is a mutable reference; for production stability, pin to a specific version if available, or be aware that updates may change behavior.

ollama pull qwen3.8-192k:latest

After pulling, list the local models to confirm the artifact is present:

ollama list

Model artifacts are stored in /usr/share/ollama/.ollama/models by default. Treat this directory as a critical data store. Back it up if you do not want to re-download multi-gigabyte files after a disk failure. The storage footprint is significant; monitor disk usage with du -sh /usr/share/ollama/.ollama/models.

Inference Performance and Resource Boundaries

Performance is not just about speed; it is about resource boundaries. When a request is made, Ollama allocates memory for the model weights and the context window. If the system is under memory pressure, the kernel may start swapping, which will degrade performance across the entire host, not just the LLM service.

Monitor resource usage during inference. On the test host with dual RTX 5060 Ti GPUs, the memory usage is distributed across the GPUs. Use nvidia-smi to observe GPU memory utilization:

nvidia-smi

On CPU-only or older hardware, use htop or top to monitor CPU and RAM usage. Look for high si/so (swap in/out) values, which indicate the model does not fit in RAM. If this occurs, the inference will be extremely slow. You have two options: reduce the context window size (if supported by the client) or choose a smaller model.

Set resource limits for the Ollama service to prevent it from starving other services. Edit the systemd unit file:

systemctl edit ollama

Add memory and CPU limits under the [Service] section. For example, to limit memory to 16 GB:

[Service]
MemoryLimit=16G
CPUQuota=100%

Restart the service to apply changes:

systemctl restart ollama

These limits are a safety net. They do not improve performance, but they prevent a runaway LLM process from crashing the host. If you are running other services on the same host, define clear boundaries. The LLM service is resource-intensive; isolate it if possible.

Network Exposure and Remote Access Decisions

By default, Ollama listens on 127.0.0.1:11434. This is a secure default: the service is only accessible from the local host. If you need remote access, you must explicitly expose the service. This is a critical decision point.

Option 1: Local Only. Keep the service bound to localhost. Use a reverse proxy (like Caddy or Nginx) on the same host to expose the API to your internal network. This allows you to apply authentication, TLS, and rate limiting at the proxy layer. This is the recommended approach for homelab environments.

Option 2: Direct Exposure. Change the Ollama bind address to 0.0.0.0. This exposes the service to all network interfaces. This is risky unless you have strict firewall rules and authentication. Ollama does not have built-in user authentication; it relies on network isolation or a reverse proxy for access control.

To change the bind address, set the OLLAMA_HOST environment variable. Edit the systemd service file:

systemctl edit ollama
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"

If you choose this path, ensure your firewall (e.g., ufw or iptables) restricts access to the port 11434 to only trusted IP ranges. Do not expose this port to the internet without a robust reverse proxy and authentication layer. The API is stateless and unauthenticated by default; anyone with network access can consume your compute resources.

Privacy, Web Interfaces, and Service Lifecycle

The primary benefit of this setup is privacy. Prompts and responses remain on your hardware. This is a significant advantage over cloud-based APIs, where data is transmitted to third-party servers. However, privacy is only maintained if the network exposure is controlled. A misconfigured reverse proxy or an open port can leak prompts to unauthorized parties.

Web interfaces are critical for usability. Ollama provides a REST API, but most users and scripts interact with it via a web interface. You can use the built-in web UI (if available in your version) or a third-party frontend like Open WebUI. These interfaces consume the local API, so they must be deployed on a host that can reach the Ollama service. If the Ollama service is bound to localhost, the web interface must run on the same host or be routed through a reverse proxy.

Service lifecycle management is ongoing. Models can be updated, and Ollama itself receives updates. Pin your model versions to avoid unexpected behavior changes. Monitor disk usage, as model artifacts accumulate. Periodically prune unused models with ollama rm to free up storage. Treat the LLM service like any other critical service: monitor it, back up your model artifacts, and define clear resource boundaries. The goal is a stable, private, and performant local API that integrates seamlessly into your homelab infrastructure.

For further reading on configuring reverse proxies for local services, see our guide on Caddy configuration for homelab APIs.

Source: Running a Local LLM on an Older Computer: A Simple Home Lab Guide

§ adj. Did this recipe work for you?

§ notes Reader notes

LEAVE A NOTE — field-tested feedback only, please

notes are reviewed before publication. No spam, no ads, no “first”-type nonsense.