You want one endpoint on your own box that speaks the OpenAI API for chat, embeddings, speech and transcription. That way the apps you already wrote against /v1/chat/completions keep working when you point them at your homelab. That is what LocalAI does, and it is why people install LocalAI instead of stitching together four separate servers. The catch is that the November 5.0 release moved a lot of furniture: agent routes return 404, environment variables were renamed and parts of the web UI became add-ons.
This guide walks through both install routes we ran: the single binary from install.sh wired into systemd with an API key, and the Docker image. We load five small models, call each endpoint, then upgrade a running 4.x container to see exactly what breaks and how to fix it. I ran all of it on an 8 vCPU Ubuntu 24.04 VM in November 2026 with LocalAI v5.0.1, upgrading from v4.12.1, and it works end to end on CPU. The CUDA 13 image and the binary then went onto a rented RTX 4090 for the GPU numbers.
What changed in LocalAI 5.0 before you install
If you are starting fresh, nothing below blocks you, and the OpenAI-compatible routes such as /v1/chat/completions, /v1/embeddings and /v1/audio/* behave the same as before. If you already run LocalAI, the 5.0 line breaks scripts that touch agents or conversations, so read this list before you pull the new image:
/api/agentsand/api/agents/skillsnow return 404; agents live under/api/chats/agents- Most
LOCALAI_AGENT_POOL_*variables becomeLOCALAI_COLLECTIONS_* LOCALAI_DISABLE_AGENTSsplits intoLOCALAI_DISABLE_CHATSandLOCALAI_DISABLE_COLLECTIONS- The
local-ai agentsubcommand is gone - Studio and Talk are add-ons you install from the Add-ons page
- A new
/v1/forecastendpoint serves time series models
The full list sits in the LocalAI release notes, and Step 7 shows what each of these looked like on a real upgrade, including an old agent that did not survive the conversion. Chat completions, embeddings and audio calls carried over without a single change in our lab, so an app that only uses the OpenAI routes can upgrade without touching its code.
Prerequisites and sizing
LocalAI itself is light. The binary is about 200 MB and the server idled at 202 MB of RAM in our lab. What you size for is the models and the backends they pull in, because every backend runs as its own process. Our test box was a floor, not a recommendation:
- Ubuntu 24.04 LTS, x86_64 with AVX2
- 8 vCPU, 31 GiB RAM, no GPU for Steps 1 to 5; Step 6 used an RTX 4090 with 24 GB VRAM
- 96 GB disk; five small models plus backends used 2.9 GB
- Port 8080 for the API and web UI, bound to localhost
- A sudo user, plus
curlandjq(sudo apt-get install -y curl jq)
With all five models loaded at once, the box used 4.4 GiB of RAM: the chat model took 1.7 GB, the embeddings model 1.6 GB and the Kokoro voice backend 1.2 GB. Model size drives everything from there. The model browser in the web UI does the maths for you against your RAM or VRAM, and on our 31 GB box it rated a 3.1 GB Gemma 4 E2B as the best fit at about 4.7 GB in use, while a 12 GB 24B model still fit with 17 GB to spare. For anything above 8B parameters on more than one user, plan on a GPU; our guides to used datacenter GPUs for local AI and mini PCs that run 8B to 120B models cover the hardware side.
Step 1: Install the LocalAI binary with install.sh
The install script detects your platform, downloads the matching release binary, checks its sha256 and drops it into /usr/local/bin. It does nothing else: no service, no GPU drivers, no models. That is a good thing, because it means you decide how the server runs.
curl -sSL https://localai.io/install.sh | sh
On our VM the script reported the platform, the release it picked and a passing checksum before it suggested starting the server. Nothing else on the system changed at that point.
LocalAI installer
platform linux/amd64
release v5.0.1
install to /usr/local/bin (via sudo)
downloading local-ai-v5.0.1-linux-amd64
checksum ok
installed /usr/local/bin/local-ai
Next steps
Start the server:
local-ai
Then open http://localhost:8080 and install a model from there.
To run a model directly, name it, for example:
local-ai run gemma-4-e2b-it-qat-q4_0
Backends download themselves the first time a model asks for one.
Documentation: https://localai.io/docs/
Confirm the binary and the version it reports before going further. Both commands work as a normal user, since the binary is world-executable.
ls -l /usr/local/bin/local-ai
local-ai --version
You should see a single binary of roughly 200 MB and the release tag the script printed.

The script accepts a few environment variables when the defaults do not suit you. LOCALAI_VERSION pins a release, INSTALL_DIR changes the target directory, and LOCALAI_NO_SUDO=1 installs into ~/.local/bin without sudo, in which case adjust ExecStart in the Step 2 unit to match.
Running local-ai in the foreground would work now, and that is exactly the problem. We started it once with no flags and no key on a test VM, then called it on the VM’s LAN address instead of localhost:

The socket is *:8080, and /v1/models answered 200 to a request carrying no key at all. The log says the same thing in its own words: “no-auth single-user mode”, plus a warning that anyone who can reach the port can confirm add-on proposals. On a private LAN address the 5.0 binary starts like this without complaint; it refuses to start without a key only when the bind is a public IP, or a wildcard on a host with a public interface, unless you pass --allow-insecure-public-bind. That guard is worth keeping, but it does not protect a cloud VM behind 1:1 NAT. The interface there is private, so the guard stays quiet while the security group decides who reaches the port. Stop that foreground process with Ctrl+C before moving on, because Step 2 closes both holes.
Step 2: Run LocalAI as a systemd service with an API key
A dedicated system user keeps models and backends out of root’s home and gives the service a predictable data directory. We create the user with /var/lib/localai as its home, plus a config directory that only that group can read. Why not run it as your own user in a tmux session? Because a reboot or a closed SSH session would take the API down with it.
sudo useradd --system --create-home --home-dir /var/lib/localai --shell /usr/sbin/nologin localai
sudo install -d -m 750 -o root -g localai /etc/localai
Next, generate a random API key and keep it in your shell, since every curl call in this guide sends it. Print it once so you can paste it into the environment file.
export LOCALAI_API_KEY=$(openssl rand -hex 32)
echo $LOCALAI_API_KEY
Now create the environment file the service reads. systemd loads it before starting the process, so the key never appears in the unit file itself.
sudo vim /etc/localai/localai.env
Add these lines, replacing the key with the value you just printed. LOCALAI_ADDRESS is the important one: the default is :8080 on all interfaces, and pinning it to 127.0.0.1 means only a reverse proxy or an SSH tunnel can reach the server.
LOCALAI_ADDRESS=127.0.0.1:8080
LOCALAI_API_KEY=paste-your-generated-key-here
LOCALAI_MODELS_PATH=/var/lib/localai/models
LOCALAI_BACKENDS_PATH=/var/lib/localai/backends
LOCALAI_DATA_PATH=/var/lib/localai/data
The file holds a secret, so tighten its ownership and mode before anything else reads it. Mode 640 lets the localai group read it and keeps every other user out.
sudo chown root:localai /etc/localai/localai.env
sudo chmod 640 /etc/localai/localai.env
Then open a new unit file for the service. It runs LocalAI as the localai user and restarts it if the process dies.
sudo vim /etc/systemd/system/localai.service
Paste this unit. Note the run subcommand on ExecStart: the installer tells you to start plain local-ai, which does the same thing interactively, but naming the subcommand makes the unit explicit about what it starts.
[Unit]
Description=LocalAI
After=network-online.target
Wants=network-online.target
[Service]
User=localai
Group=localai
EnvironmentFile=/etc/localai/localai.env
WorkingDirectory=/var/lib/localai
ExecStart=/usr/local/bin/local-ai run
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Reload systemd, enable the service and check that it came up on the loopback address only.
sudo systemctl daemon-reload
sudo systemctl enable --now localai
systemctl status localai --no-pager
ss -tlnp | grep 8080
A healthy start shows active (running), a log line saying the server is running on 127.0.0.1:8080, and a listener on that address alone.

Two lines in that journal deserve a second look. Default capability (no GPU detected) means LocalAI will fetch CPU builds of every backend; the GPU images skip detection and pin their capability through /run/localai/capability instead (nvidia-cuda-13 on the tag we ran in Step 6). The ffmpeg is not available warning is real and will break transcription later, so install it now with sudo apt-get update && sudo apt-get install -y ffmpeg rather than hitting the error we describe under What broke.
Before loading anything, prove the key works. A request without it should be refused, a request with it should succeed, and the health probes should stay open for your monitoring.
curl -s -w "\n%{http_code}\n" http://127.0.0.1:8080/v1/models
curl -s -w "\n%{http_code}\n" -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/v1/models
curl -s -w "\n%{http_code}\n" http://127.0.0.1:8080/readyz
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/version
We got a 401 without the key, an empty model list with it, a 200 from /readyz and the version string from /version.

Only /readyz and /healthz skip the key; /version does not, so do not point an unauthenticated uptime check at it. Besides the Authorization: Bearer header, LocalAI also accepts the key as x-api-key or xi-api-key, which helps with clients written for other vendors. LOCALAI_API_KEY takes a comma-separated list if you want one key per app.
Step 3: Install models through the API or the web UI
LocalAI installs models from its gallery by name, and each model’s config names the backend it needs, which LocalAI then downloads during the model install if it is not already present. You can do this from the web UI or from the API; the API is easier to script, so we start there with a small Qwen3 chat model.
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/models/apply \
-H "Content-Type: application/json" -d '{"id":"qwen3-0.6b"}'
The call returns at once with a job ID and a status URL, because the download runs in the background.
{"uuid":"c0085b0a-e53b-11f1-be20-42010a840fe8","status":"http://127.0.0.1:8080/models/jobs/c0085b0a-e53b-11f1-be20-42010a840fe8"}
Poll that URL with your own job ID until processed turns true. While it runs, the message names the file being fetched, first the 461.8 MiB GGUF and then the 50.4 MiB CPU llama.cpp backend image.
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/models/jobs/c0085b0a-e53b-11f1-be20-42010a840fe8 | jq -c "{processed,progress,message,error}"
A finished job reads like this. On our VM the chat model and its backend took well under a minute to arrive.
{"processed":true,"progress":100,"message":"completed","error":null}
We repeated the same call for an embeddings model, a text to speech voice, a speech to text model and a forecasting model, so every endpoint in Step 4 has something to answer with. Wait for each job to finish before moving on, since a model that is still downloading answers with an error.
for m in qwen3-embedding-0.6b kokoro whisper-tiny timestral-5m; do
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/models/apply \
-H "Content-Type: application/json" -d "{\"id\":\"$m\"}"; echo
done
The loop only starts the jobs. Poll each job URL it printed, or simply repeat the model listing below every minute or so until all five models appear, then check how much disk the backends took.
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/v1/models | jq -r ".data[].id"
sudo ls /var/lib/localai/backends
sudo du -sh /var/lib/localai/backends /var/lib/localai/models
All five models showed up, along with four CPU backends that LocalAI pulled on its own.

Look at the ratio there: 1.2 GB of models needed 1.7 GB of backends. Each model type brings its own runtime (llama.cpp, whisper.cpp, a Python venv for Kokoro, timestral-cpp), and that is the price of one server answering every modality. If disk is tight, stick to one or two model families. Each model also gets a YAML file in the models directory that you can edit; the chat model’s file set context_size: 8192 and backend: llama-cpp, which matters for the web UI problem below.
Use the web UI instead
Because the service listens on localhost, reach the web UI through an SSH tunnel from your workstation with ssh -L 8080:127.0.0.1:8080 [email protected], then open http://localhost:8080. With a key set, the UI asks for it before showing anything:

- 1API key field
- 2Sign In
Paste the same key into the API key field and click Sign In. Then open Models from the sidebar. The Explore tab searches the whole gallery, and the Fits in memory toggle hides anything your RAM or VRAM cannot hold, which saves you from downloading a 12 GB file that will never load:

- 1Search models
- 2Fits in memory
- 3Install
Type a name in Search models, switch on Fits in memory, then click Install on the row you want. The note above the table, “No GPU found. Fit is measured against 31.3 GB of memory”, is the same detection you saw in the journal, and on a GPU host the fit column is measured against VRAM instead. The Installed tab lists what you already have, including models added through the API.
Step 4: Call the OpenAI-compatible endpoints
Every call below uses the same paths and request bodies as the OpenAI API, so any SDK works once you set its base URL to http://127.0.0.1:8080/v1 and its key to yours. We used plain curl to keep the output honest.
Chat completions
We sent the same one-line question three times and timed each response, keeping only the token counts and the answer from the JSON.
for i in 1 2 3; do ( time curl -s http://127.0.0.1:8080/v1/chat/completions -H "Authorization: Bearer $LOCALAI_API_KEY" -H "Content-Type: application/json" -d "{\"model\":\"qwen3-0.6b\",\"messages\":[{\"role\":\"user\",\"content\":\"In one sentence, what does a reverse proxy do?\"}]}" | jq -c "{c:.usage.completion_tokens, t:.usage.total_tokens, a:.choices[0].message.content}" ) 2>&1 | grep -v "^$\|user\|sys"; done
Each answer came back in two to four seconds. The token counts vary between runs because the model’s thinking pass is not the same length every time.

That works out to roughly 58 to 62 tokens per second on 8 CPU cores, which is fine for a 0.6B model and tells you little about larger ones. Most of those tokens are not in the answer: Qwen3 thinks first, and LocalAI returns that thinking in a separate reasoning field next to content, so 208 completion tokens bought a 24-word sentence. Clients that only read content never see the reasoning, but you still wait for it. During generation the llama.cpp process ran at 380% CPU, so expect one chat to saturate about four cores.
Embeddings
The embeddings route is what a RAG pipeline or a vector database calls. We asked for one vector and printed its length plus the first five values.
curl -s http://127.0.0.1:8080/v1/embeddings -H "Authorization: Bearer $LOCALAI_API_KEY" -H "Content-Type: application/json" -d '{"model":"qwen3-embedding-0.6b","input":"LocalAI runs models on your own hardware"}' | jq "{model, dims: (.data[0].embedding|length), first5: .data[0].embedding[0:5], usage}"
The model returns 1024 dimensions, which is the size to declare when you create the collection in your vector store:
{
"model": "qwen3-embedding-0.6b",
"dims": 1024,
"first5": [
-0.028645825,
0.008883603,
-0.009196473,
-0.09238843,
0.0151665425
],
"usage": null
}
Note "usage": null. OpenAI returns token counts here, and a client that bills or rate-limits on usage.prompt_tokens will choke on a null, so guard for it in your code.
Text to speech and speech to text
A round trip is the quickest way to test both audio models at once: Kokoro writes a WAV file, then Whisper reads it back:
curl -s -o speech.wav -w "%{http_code}\n" http://127.0.0.1:8080/v1/audio/speech -H "Authorization: Bearer $LOCALAI_API_KEY" -H "Content-Type: application/json" -d '{"model":"kokoro","input":"LocalAI runs models on your own hardware.","voice":"af_heart"}'
time curl -s http://127.0.0.1:8080/v1/audio/transcriptions -H "Authorization: Bearer $LOCALAI_API_KEY" -F file=@speech.wav -F model=whisper-tiny | jq -r .text
Kokoro produced a 24 kHz mono WAV and Whisper transcribed it in under a second.

Whisper heard “Localake” instead of “LocalAI”. That is the tiny model, not a LocalAI bug: it is 75 MB and trades accuracy for speed. For anything a person reads afterwards, install whisper-base or larger from the same gallery. If this call fails with an ffmpeg error instead, jump to the first entry under What broke.
Forecasting with /v1/forecast
The forecast endpoint is new in the 5.0 line and takes a numeric series instead of text. We fed it 24 points of requests per minute and asked for the next six. Create the request file first:
vim /tmp/forecast.json
Add this request body. prediction_length is how many future points you want back:
{"model":"timestral-5m","prediction_length":6,"series":[{"id":"req-per-min","target":[41,38,35,33,36,44,58,72,85,91,94,96,93,90,88,92,97,89,78,66,57,50,46,42]}]}
Post it and print the quantile levels followed by one row of predictions per quantile.
curl -s http://127.0.0.1:8080/v1/forecast -H "Authorization: Bearer $LOCALAI_API_KEY" -H "Content-Type: application/json" -d @/tmp/forecast.json | jq -c ".quantile_levels, .data[0].variates[0].values[]"
The answer took about two seconds and came back as three rows, the 10th, 50th and 90th percentile for each of the six future points:
[0.1,0.5,0.9]
[35.972473,29.992245,25.974283,23.303108,23.505842,24.827087]
[38.466785,35.40883,34.106224,34.468674,36.767166,42.147987]
[41.02319,42.035717,44.669777,50.213646,55.600876,65.503456]
Read the middle row as the forecast and the outer rows as the band around it. The median dips to 34 and climbs back to 42, which follows the falling tail of our series, while the band widens from about 5 to about 40 requests by the sixth step. That widening is the useful part for capacity alerts: alert on the 90th percentile row, not the median. The LocalAI documentation covers the other request fields, including multivariate series.
Step 5: Run LocalAI in Docker instead
The container route suits you if Docker already runs your homelab services or you want upgrades to be a tag change. Stop the systemd service first if you followed Steps 1 and 2 on the same box, since both want port 8080.
sudo systemctl disable --now localai
If Docker is not installed yet, the convenience script from get.docker.com set up the current Docker Engine on our VM in one command. Adding your user to the docker group lets the commands below run without sudo, and newgrp applies it to the current shell so you do not have to log out.
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker
The container needs the API key in your shell. If you skipped Step 2, generate one now and keep it somewhere safe. If you followed Step 2, read it back from the environment file instead, since a new SSH session will not have the variable. Either way, the last line should print 64, because an empty variable would start the container with no authentication at all.
export LOCALAI_API_KEY=$(sudo grep ^LOCALAI_API_KEY= /etc/localai/localai.env | cut -d= -f2)
[ -n "$LOCALAI_API_KEY" ] || export LOCALAI_API_KEY=$(openssl rand -hex 32)
echo ${#LOCALAI_API_KEY}
Many older guides use latest-cpu and latest-aio-* tags. Those still pull from Docker Hub, and that is the trap. We pulled :latest and :latest-cpu side by side and asked each container for its version:

:latest carries the same digest as the newest release tag and reports the same version, so it does track releases. latest-cpu is a 5.23 GB image built 17 months ago that still reports a 3.x release, and Docker Hub showed the latest-aio-cpu and latest-aio-gpu-nvidia-cuda-12 tags last pushed in February 2026. Pull either and you quietly run a release that predates the 5.0 changes. :latest works, but a moving tag still upgrades you on the next pull without asking, so look up the newest release tag and keep it in a variable the GPU and upgrade steps reuse:
LOCALAI_TAG=$(curl -s https://api.github.com/repos/mudler/LocalAI/releases/latest | jq -r .tag_name)
echo $LOCALAI_TAG
The GitHub release can appear a few hours before its image: the current release was published on GitHub at 17:03 UTC and its tag was pushed to Docker Hub at 21:18 UTC the same day, so a “manifest unknown” error right after a release means wait and pull again. Run the container with four named volumes, so models, backends, chat data and configuration all survive an image upgrade. The -p 127.0.0.1:8080:8080 mapping keeps it off the LAN the same way LOCALAI_ADDRESS did for the binary:
docker run -d --name localai --restart unless-stopped -p 127.0.0.1:8080:8080 \
-e LOCALAI_API_KEY=$LOCALAI_API_KEY \
-v localai-models:/models -v localai-backends:/backends \
-v localai-data:/data -v localai-config:/configuration \
localai/localai:${LOCALAI_TAG}
Give it about 30 seconds, then check that the container reports healthy, that the API answers with your key, and who owns the files in the model volume.
docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
curl -s -H "Authorization: Bearer $LOCALAI_API_KEY" http://127.0.0.1:8080/v1/models | jq -r ".data[].id"
docker exec localai ls -ln /models | head -4
Our container reused volumes from the upgrade test in Step 7, which is why qwen3-0.6b is already listed. On fresh volumes the model list comes back empty until you install models with the same /models/apply calls from Step 3.

The ls -ln at the end shows something new in the 5.0 images: files in /models belong to uid 10001. The container now runs as an unprivileged user and hands the volumes over to it on first start, logging “Handing /models over to uid 10001”. If you bind-mount host directories instead of named volumes, make sure uid 10001 can write to them; the docs also describe LOCALAI_UID and LOCALAI_GID for changing that user. Every API call from Step 4 works the same against the container.
Step 6: Use the NVIDIA GPU image
We ran this step on a rented RTX 4090 whose driver reports CUDA 13 in the header of nvidia-smi, so the matching image is the release tag with the -gpu-nvidia-cuda-13 suffix. We used the same qwen3-0.6b model and prompt as the CPU run, plus qwen3-8b, which is too slow to be useful on 8 vCPU. The LocalAI container documentation lists the GPU builds as separate tags with the CUDA major version in the name, so read the “CUDA Version” your driver prints and pick the tag with that major number:
| Hardware | Image tag suffix |
|---|---|
| NVIDIA, CUDA 12 driver | -gpu-nvidia-cuda-12 |
| NVIDIA, CUDA 13 driver | -gpu-nvidia-cuda-13 |
| AMD ROCm | -gpu-hipblas |
| Intel GPU | -gpu-intel |
| Any Vulkan GPU | -gpu-vulkan |
The host needs the NVIDIA driver and the NVIDIA Container Toolkit; the docs recommend the CDI setup on toolkit 1.14 and later, though the plain --gpus all flag below works with a standard toolkit install. With those in place, the run command is the Step 5 command plus a device flag, the GPU tag and two new volumes. The first line removes the Step 5 container if it is on the same host. The data and config volumes carry over, but the models and backends volumes are new on purpose. Why not reuse them? LocalAI resolves llama-cpp to a concrete build when it installs a model, so volumes you filled on CPU would likely keep the CPU build. Both of our GPU runs started with empty volumes and installed the models again with the Step 3 /models/apply calls, which is the path we can vouch for:
docker stop localai && docker rm localai
docker run -d --name localai --restart unless-stopped -p 127.0.0.1:8080:8080 \
--gpus all -e LOCALAI_API_KEY=$LOCALAI_API_KEY \
-v localai-models-gpu:/models -v localai-backends-gpu:/backends \
-v localai-data:/data -v localai-config:/configuration \
localai/localai:${LOCALAI_TAG}-gpu-nvidia-cuda-13
Be clear about what we ran here. vast.ai rents containers, not Docker hosts, and its launcher replaces the image entrypoint with its own, so the docker run --gpus all line above was not executed on a native Docker host. We ran the same cuda-13 image and started LocalAI inside it with the image’s own /entrypoint.sh, an API key and LOCALAI_ADDRESS=127.0.0.1:8080, then installed both models through /models/apply as in Step 3. Everything below comes from that run. On your own host, check the capability line with docker logs localai 2>&1 | grep -i capability, then see which backend LocalAI pulled when the first model was installed:

The log reports capability="nvidia-cuda-13", read from a file baked into the image, and that decides everything after it: while installing the first model, LocalAI downloaded cuda13-llama-cpp, 2.2 GB on disk, where the CPU build was a 50 MB download. That pull is part of the model install job, which is partly why qwen3-0.6b took 430 seconds to install against 370 for the far larger qwen3-8b. It logs “installing OCI backend without signature verification” while pulling from the official backend gallery on quay.io, so mirror and pin that image if your hosts must not trust a moving tag.
Warm, qwen3-0.6b generated 388 and 425 tokens per second, against about 60 on the 8 vCPU VM, so roughly seven times faster. The model that matters is qwen3-8b, which settled at 139 to 141 tokens per second; that is fast enough for an IDE assistant or an agent loop that makes many calls. The first call of each model was much slower (68 and 58 tokens per second) because it paid the load, so send one warm-up request after a restart. Each loaded model runs as its own backend process: qwen3-0.6b held 1744 MiB and qwen3-8b 6162 MiB, 7921 MiB of the card’s 24564 MiB in total, which leaves room for a third model of the 8B class.
An earlier rental on an older driver branch ran the cuda-12 tag of the same release without trouble and landed within about ten percent: 432 and 447 tokens per second warm for qwen3-0.6b, about 148 for qwen3-8b. A newer driver runs the older CUDA image, so the tag is about compatibility rather than speed.
The binary on the same GPU
The binary has no GPU tag to pick, so we tested whether it finds the card on its own. On the same RTX 4090 we ran install.sh from Step 1 (it installed the current release with “checksum ok”) and started local-ai run with the exact env file from Step 2: loopback address, API key, and models, backends and data under /var/lib/localai. The rented container has no systemd, so it ran under nohup rather than the unit. We also moved the image’s /run/localai/capability file aside first, so the binary saw the card the way it would on a plain host:

Unlike the CPU journal, which printed “Default capability (no GPU detected)”, the binary logged no capability line at all on the GPU host. It still picked the right build: the first model install pulled cuda13-llama-cpp (2.2 GB on disk) from the same quay.io gallery, and the backend processes in nvidia-smi run from /var/lib/localai/backends/cuda13-llama-cpp. Speed matched the container: 379 and 403 tokens per second warm for qwen3-0.6b, 146 and 144 for qwen3-8b, with the same 1744 and 6162 MiB per model. That run was root under nohup, not the localai user under systemd, so we expect the Step 2 unit to need no GPU changes beyond a working NVIDIA driver, as long as that user can open the /dev/nvidia* device nodes, which ls -l /dev/nvidia* shows. Confirm the pick with du -sh /var/lib/localai/backends/* after the first model install. If you have no card at home, a short rental on vast.ai is the cheapest way to try the GPU image, and our local AI workstation build covers buying one.
Step 7: Upgrade a 4.x install to 5.0
To see the breaking changes on a real install, we ran the last 4.x image with agents enabled, created an agent called helper through POST /api/agents, and then swapped the image while keeping the same volumes and the same old environment variables. This was the 4.x baseline, started with the old variable names. The lab run published port 8080 on all interfaces; the commands in this guide bind 127.0.0.1, which changes nothing about the routes:
docker run -d --name localai -p 8080:8080 -e LOCALAI_API_KEY=$LOCALAI_API_KEY \
-e LOCALAI_DISABLE_AGENTS=false -e LOCALAI_AGENT_POOL_DEFAULT_MODEL=qwen3-0.6b \
-v localai-models:/models -v localai-backends:/backends \
-v localai-data:/data -v localai-config:/configuration \
localai/localai:v4.12.1
With qwen3-0.6b installed, we created the agent on the 4.x API and checked which routes answered:
H="Authorization: Bearer $LOCALAI_API_KEY"
curl -s -w "\n%{http_code}\n" -H "$H" -X POST localhost:8080/api/agents -H "Content-Type: application/json" \
-d '{"name":"helper","model":"qwen3-0.6b","description":"Test agent","system_prompt":"You are a concise assistant."}'
for p in /api/agents /api/agents/skills /api/conversations /api/chats/agents; do
echo "$p -> $(curl -s -o /dev/null -w "%{http_code}" -H "$H" localhost:8080$p)"
done
On the last 4.x image the create call returned {"status":"ok"} with a 201. Our route check ran on the same server just before the create, and the codes do not depend on whether an agent exists:
/api/agents -> 200
/api/agents/skills -> 200
/api/conversations -> 404
/api/chats/agents -> 404
Keep that output in mind, because 5.0 flips it: the first two become 404 and /api/chats/agents starts answering. The upgrade itself is a pull, a remove and a run. If you came straight here to upgrade, run the key block and the LOCALAI_TAG lookup from Step 5 first, and back up your volumes and note the old tag, because 5.0 hands the volumes to uid 10001 and the agent conversion runs only once.
docker pull localai/localai:${LOCALAI_TAG}
docker stop localai && docker rm localai
Then start the new image with the 5.0 variable names. On 4.x we had LOCALAI_DISABLE_AGENTS=false and LOCALAI_AGENT_POOL_DEFAULT_MODEL; these are their replacements:
docker run -d --name localai --restart unless-stopped -p 127.0.0.1:8080:8080 \
-e LOCALAI_API_KEY=$LOCALAI_API_KEY \
-e LOCALAI_DISABLE_CHATS=false -e LOCALAI_DISABLE_COLLECTIONS=false \
-e LOCALAI_COLLECTIONS_DEFAULT_MODEL=qwen3-0.6b \
-v localai-models:/models -v localai-backends:/backends \
-v localai-data:/data -v localai-config:/configuration \
localai/localai:${LOCALAI_TAG}
On our first attempt we kept the old variable names to see what happens. The old routes returned 404, the new agents route answered, and the conversion report explained what happened to our agent:

Three things in that output matter. The agent was skipped, not converted, with the reason “the owner has no account”: the conversion attaches agents to a user, and with only an API key there is no user to own it, so recreate your agents under /api/chats/agents. The AGENT_POOL variable logged a clear deprecation warning naming its replacement. And the model volume carried over: the same qwen3-0.6b answered chat right after the upgrade without a new download.
Here is how the routes and variables map, as we saw them on the upgraded container:
| 4.x | 5.0 | What we saw |
|---|---|---|
/api/agents | /api/chats/agents | 200 on 4.x, 404 on 5.0; new path 200 |
/api/agents/skills | /api/chats/skills | Old path 200 on 4.x, 404 on 5.0; new path from the release notes, not called |
/api/conversations | /api/chats | Old path 404 on both our 4.x and 5.0 builds; new path from the release notes, not called |
LOCALAI_AGENT_POOL_DEFAULT_MODEL | LOCALAI_COLLECTIONS_DEFAULT_MODEL | Deprecation warning in the log |
LOCALAI_DISABLE_AGENTS | LOCALAI_DISABLE_CHATS and LOCALAI_DISABLE_COLLECTIONS | Release notes say the old name still works and logs a deprecation warning; we saw none at false, the default |
After restarting with the new names, the deprecation grep came back empty and chat still worked. Two more changes did not show up in the API and only matter if you used them: the liquid-audio backend was removed in favour of running lfm3-audio-2b on llama.cpp, and Studio and Talk now have to be installed from the Add-ons page, which failed for us on release day and worked once the catalog was published (see What broke in the lab).
Should you pick LocalAI or Ollama?
Pick by how many kinds of model you need behind one API, not by which tool is more popular. LocalAI earns its extra disk and processes when one app needs chat, embeddings and audio from the same base URL:
- Chat models only, one user: Ollama on Ubuntu is simpler to run and update.
- Chat, embeddings, TTS and STT from one OpenAI-style endpoint: LocalAI, as tested above.
- Many concurrent users on a GPU: a production vLLM server is built for throughput.
- Full control of one GGUF model: llama.cpp on its own, which is what LocalAI runs for chat anyway.
LocalAI wraps llama.cpp for GGUF chat models, so for a single chat model the raw speed difference against plain llama.cpp is small, and our Ollama vs vLLM vs llama.cpp benchmark shows where the engines really diverge. If you want a chat front end, any client that accepts an OpenAI base URL and key can point at LocalAI, and our Open WebUI setup shows one such front end with Ollama.
What broke in the lab
These are the errors we hit on the way through, each with the fix that worked on our VM.
rpc error: exec: “ffmpeg”: executable file not found in $PATH
Our first transcription call returned a 500 with this message, even though the speech to text model had installed cleanly. Whisper needs ffmpeg to convert the uploaded audio, the binary install does not bring it, and on a fresh cloud image the first apt-get install could not even find the package because the package lists were empty:

Run sudo apt-get update first and then install ffmpeg. The next transcription call worked without restarting LocalAI. The startup journal had warned about this from the first boot, which is why Step 2 tells you to install it early.
The model’s context window is too small for the tools of this agent
The chat on the web UI home page is an agent with tools, not a plain completion. With the gallery’s default 8192-token context, the tool schemas alone took about 11,000 tokens, so the first message failed before the model saw it. The server log said the same thing: “tool schemas use 11k of the 8k context window”. The UI offers a one-click fix:

Clicking Set the window to 32768 rewrote context_size in the model’s YAML, and the server reloaded the model with the larger context. On CPU, though, the agent then sat on “Thinking” for more than five minutes with 11,000 tokens of tool prompt to read on every turn, so we stopped it. A 0.6B model on CPU is fine for API calls and too small and too slow for the agent chat. Use a 4B or larger model on a GPU for the UI chat, or switch tools off in the composer.
The list of add-ons could not be read
After the upgrade we went looking for Studio and Talk, which used to be built in. The Add-ons page showed no add-ons and an error under Find add-ons, and the journal had logged “library refresh failed … the library answered HTTP 404” at every start:

This was the official add-on catalog returning 404 on November 20, on both the binary and the container, so nothing on our side could fix it. Release builds read the add-on index attached to their own GitHub release, and on that day our release had no addons-index.yaml asset yet. The GitHub API shows the project attached it the next day (asset created_at 2026-11-21T15:04:39Z), and the release notes include fixes for attaching the catalog and for following the release redirect when fetching it. You can check whether your tag carries the index with curl -s https://api.github.com/repos/mudler/LocalAI/releases/tags/$LOCALAI_TAG | jq -r '.assets[].name', after setting LOCALAI_TAG with the lookup from Step 5 (binary installs skip that step, so run the lookup first). Do not downgrade to the first 5.0 release to dodge it, because the redirect fix landed after it.
Four days later we ran install.sh again on a clean Ubuntu 24.04 VM, which fetched the same release, and started it with sign-in off. The start log had no refresh error this time, and the library sources endpoint confirms the catalog was read:
curl -s localhost:8080/api/library/sources | jq '.sources[] | select(.kind=="addon") | {id,refresh}'
Look at count and failed: the index was read with no failure (its 118 entries are index records, not the number of add-ons on offer), where the release-day server had nothing to read.
{
"id": "official",
"refresh": {
"checkedAt": "2026-11-24T01:23:16.921148491Z",
"lastSuccess": "2026-11-24T01:23:16.921148491Z",
"count": 118,
"failed": false
}
}
With the catalog readable, getting Studio back is a short walk through the page. Open Find add-ons, type the name into Search add-ons, and press Install on the card. The tab listed 24 add-ons in total, every one marked “Signed · official”:

- 1Find add-ons
- 2Search add-ons
- 3Install
The confirm dialog downloads the package and checks its signature before it lets you go on, so Install and turn on stays greyed out for a moment. It took 2 seconds for Studio and 20 for Talk on our VM. The dialog shows the package digest and that a signature is required, then you confirm:

We repeated it for Talk. The Installed tab then showed both add-ons running, and /api/addons/apps reported them enabled with their own pages at /app/addons/studio/studio and /app/addons/talk/talk:

Neither add-on asked for host access, so the warning that host grants are locked while sign-in is off did not get in the way. That lock is the safe default: an add-on that lists host operations needs sign-in on, or a grant in the policy file, before it can use them.
What I would change before production
The setup above is safe for one person on a homelab, mostly because it listens on localhost behind a single key. Before other people or other machines depend on it, we would change a handful of things:
- Nginx or Caddy in front with TLS, still proxying to 127.0.0.1:8080
- One API key per app, comma separated in
LOCALAI_API_KEY LOCALAI_AUTH=trueif several people share the web UI- Pinned image tags, upgraded on purpose after reading the release notes
/readyzin your uptime monitor, since it needs no key
The pinned tag matters more than it looks. A routine pull of the latest image would have moved our test server to 5.0 and dropped its agent without asking. Keep the previous tag written down and back up the volumes before an upgrade, because a 5.0 container changes their ownership and we did not test whether a 4.x image reads them cleanly afterwards. If you are still getting comfortable with the journalctl, ss and grep filters used throughout this guide, the Linux commands cheat sheet for files, grep, find and processes is a good companion to keep open.