Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host LocalAI
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 (also on arm64) · how we test
We earn commissions when you shop through the links below. Full disclosure →
Drop-in, self-hosted OpenAI-compatible API server for running LLM, image, and voice models on consumer CPU hardware — no GPU required, with optional NVIDIA/AMD/Intel acceleration when available.
Pick LocalAI when you want a drop-in OpenAI-compatible API you can run without a GPU — it serves LLM, image, and voice models on ordinary CPU hardware, so existing OpenAI-SDK code points at your server with just a URL change. It's the most API-compatible backend here (4 GB). It's a runtime first: its built-in web UI covers basic chat, but you'll usually pair it with a fuller UI or call it from your own code. If you only ever run text models and want the leanest setup, Ollama is simpler.
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# LocalAI — official CPU-only container# LocalAI has no authentication by default, so set an API key before publishing the portKEY=$(openssl rand -hex 24); echo "LocalAI API key: $KEY"docker run -d --name local-ai --restart unless-stopped --init -p 8080:8080 \ -v localai-models:/models \ -v localai-backends:/backends \ -v localai-data:/data \ -v localai-configuration:/configuration \ -e LOCALAI_API_KEY="$KEY" \ localai/localai:v5.0.1# → http://SERVER_IP:8080
LocalAI's OpenAI-compatibility is genuinely useful, but "runs without a GPU" comes with the usual asterisks:
non-negotiableNo GPU means slow. CPU inference works and is the selling point, but larger models will crawl — add an NVIDIA/AMD/Intel GPU when responsiveness matters, the same as every local-inference tool here.
non-negotiableIt's a backend first. LocalAI exposes an API and ships a built-in web UI with basic chat, but for a polished multi-user chat front end pair it with Open WebUI or LibreChat, or drive it from code.
non-negotiableCompatibility isn't identity. It mirrors the OpenAI API surface, but output quality depends on the open models you load — don't expect GPT-4-class answers from a small local model just because the API shape matches.
LocalAI used 213 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.10.1 (first boot, measured Nov 2026). We list a minimum of 4096 MB.
Is the LocalAI install snippet verified?
The LocalAI install snippet is marked verified on Ubuntu 26.04 (Nov 2026).