Self-host LocalAI
AI Chat InterfacesDrop-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.
Key facts
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, not a chat app: pair it with a UI, or call it from your own code. If you only ever run text models and want the leanest setup, Ollama is simpler.
What you need
- Any VPS with at least 4096 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- Under an hour if you've used Docker before
Install with Docker Compose
Save this as compose.yml and run docker compose up -d:
# LocalAI — official CPU-only container
docker run -p 8080:8080 --name local-ai -ti localai/localai:latest-cpu # → http://SERVER_IP:8080What you take on
LocalAI's OpenAI-compatibility is genuinely useful, but "runs without a GPU" comes with the usual asterisks: