New Tool Radar

Local AI

How to Install LocalAI with Docker Compose and Start Its First Model

Download LocalAI's Docker Compose file, start it, and install a first model from the gallery in the web interface.

Schematic diagram with three steps: download the LocalAI docker-compose.yaml file, run docker compose up, and open localhost 8080 to install a model.

LocalAI is a self-hosted inference server that speaks the OpenAI API shape from your own machine. The documented container route is two commands: download the project’s Compose file, then start it. The Compose file runs the CPU image and keeps models, backends, settings and data in named volumes, so they survive a container restart.

Start the container

curl -fsSL https://localai.io/install/docker-compose.yaml -o docker-compose.yaml
docker compose up -d

Then open http://localhost:8080 in a browser. The install guide says an Intel Mac, a server, or a GPU image are the cases for the container route — on Linux or an Apple Silicon Mac you can also use the install script (curl -sSL https://localai.io/install.sh | sh), which installs the local-ai program without starting it.

Install a first model

In the web interface, open Models, then Explore, search for a small model, and choose Install. The model-setup docs give the same step from the command line:

local-ai models list
local-ai models install llama-3.2-1b-instruct:q4_k_m

Wait for the download to finish before you send a chat: a model that is still downloading will not answer. To stop LocalAI, run docker compose down — the volumes stay, so your models remain. Adding -v deletes the volumes with all models and data, so never use it unless you mean to start over.

Check What you should see If you do not see it
Container runs docker compose ps shows the LocalAI container up Docker is not running, or the port 8080 is already in use
Web UI opens http://localhost:8080 loads The container is still starting — wait and retry
Model installed The model appears under Installed models The download is still running — check the Models page

Expected result. We checked the LocalAI install docs for the Compose download and start commands, the named volumes, and the script alternative, and the model-setup docs for the gallery install and CLI install. We did not run Docker or LocalAI, so the steps above are UNTESTED on this machine.

Limits

The Compose file starts the CPU image; a GPU needs a different image tag, covered in the separate GPU guide. The first model download needs internet and disk space. LocalAI’s web interface is on your machine only unless you expose it — do not publish the port before setting an API key.

Sources

Sources checked 2026-11-28.

See all