Get up and running with Llama 3.3, DeepSeek-R1, Phi-4, Gemma 3, and other large language models. .
LocalAI
MIT Docker Ready ★ 50,599 Stars Active · 2026-11-28Run your AI models locally and generate images and audio (alternative to OpenAI and Claude). , Clients).
- Tech Stack / Runtime
- Docker/K8S · Go
- Open-Source License
- MIT
- GitHub Health
- ★ 50,599 · 4,658 forks
Quick Docker Compose Reference for LocalAI
# LocalAI with Docker Compose.
#
# curl -fsSL https://localai.io/install/docker-compose.yaml -o docker-compose.yaml
# docker compose up -d
#
# Then open http://localhost:8080 and install a model from the gallery.
#
# Models, backends, settings and application data are kept in four named
# volumes, so they survive `docker compose down`, image upgrades and
# container recreation. `docker compose down -v` deletes them.
#
# Upgrade: docker compose pull && docker compose up -d
#
# GPU: change the image tag and uncomment the block for your GPU below.
# Documentation: https://localai.io/docs/start/install/containers/
#
# This file is also served at https://localai.io/install/docker-compose.yaml.
# Keep the two copies identical (CI checks it). To build LocalAI from source,
# use docker-compose.dev.yaml in the repository.
services:
localai:
# CPU image. For a GPU, use one of these tags instead:
# localai/localai:latest-gpu-nvidia-cuda-12 NVIDIA, CUDA 12 drivers
# localai/localai:latest-gpu-nvidia-cuda-13 NVIDIA, CUDA 13 drivers
# localai/localai:latest-gpu-hipblas AMD (ROCm)
# localai/localai:latest-gpu-intel Intel (oneAPI/SYCL)
# localai/localai:latest-gpu-vulkan any GPU with a Vulkan driver
# Podman needs the registry in the name: docker.io/localai/localai:latest
image: localai/localai:latest
init: true
restart: unless-stopped
ports:
- "8080:8080"
# environment:
# # Require an API key on every request.
# LOCALAI_API_KEY: "change-me"
# # More log output: error, warn, info, debug or trace.
# LOCALAI_LOG_LEVEL: debug
volumes:
- models:/models
- backends:/backends
- data:/data
- configuration:/configuration
# Bind mounts instead of named volumes: create the folders first as your
# own user (mkdir -p models backends data configuration), then replace
# the four lines above with these. See "Container user and permissions"
# in the documentation for who owns the files.
# - ./models:/models
# - ./backends:/backends
# - ./data:/data
# - ./configuration:/configuration
# --- NVIDIA (latest-gpu-nvidia-cuda-12 or -cuda-13) ---
# Needs the NVIDIA Container Toolkit on the host.
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
# --- AMD (latest-gpu-hipblas) ---
# devices:
# - /dev/kfd
# - /dev/dri
# --- Intel (latest-gpu-intel) or Vulkan (latest-gpu-vulkan) ---
# devices:
# - /dev/dri
# The container starts as root, then runs LocalAI as uid 10001, or as the
# owner of bind-mounted ./data and ./models, with the groups of the GPU
# devices above. See "Container user and permissions" in the docs.
## PostgreSQL for the knowledge base (collections). Uncomment this service,
## the postgres_data volume below, and these lines in `environment`:
## LOCALAI_COLLECTIONS_VECTOR_ENGINE: postgres
## LOCALAI_COLLECTIONS_DATABASE_URL: postgresql://localrecall:localrecall@postgres:5432/localrecall?sslmode=disable
# postgres:
# image: quay.io/mudler/localrecall:v0.5.2-postgresql
# restart: unless-stopped
# environment:
# POSTGRES_DB: localrecall
# ... (see full file in official GitHub repository) LocalAI System Requirements & Self-Hosting Guide
Deploy LocalAI (4 GB+ RAM) →Recommended VPS
4 GB+ RAM
2 – 4 vCPU · $6 – $12/mo VPS
Deployment Method
Intermediate
Docker / Docker Compose (Recommended)
Commercial Use (MIT)
Yes — free for personal, internal company, and commercial use with attribution.
Maintenance Status
Active
Last commit: 2026-11-28
Frequently Asked Questions about LocalAI
Is LocalAI free to self-host for commercial use?
LocalAI is released under the MIT license. Yes — free for personal, internal company, and commercial use with attribution. It has 50,599 GitHub stars and was last updated on 2026-11-28.
What VPS specifications do I need to self-host LocalAI?
Based on its Docker/K8S runtime and Generative Artificial Intelligence (GenAI) workload, we recommend at least 4 GB+ RAM and 2 – 4 vCPU (typically $6 – $12/mo VPS).
Does LocalAI support Docker deployment?
Yes — LocalAI supports Docker / Docker Compose (Recommended), making it intermediate to spin up on any Linux VPS.
Deploy LocalAI on your own VPS
Run LocalAI privately with full data control. Recommended starting footprint: 4 GB+ RAM ($6 – $12/mo VPS).
Best Value · 1-Click Docker
1 vCPU · 4 GB RAM · 50 GB NVMe
Includes built-in Docker & Coolify templates — ideal for beginners.
Lowest Cost / Performance
2 vCPU · 4 GB RAM · 40 GB NVMe
Unbeatable EU/US cloud pricing for high-traffic self-hosted stacks.
$200 Free Credit
1 vCPU · 1 GB RAM · 25 GB SSD
Clean developer UX with 1-click Marketplace Docker droplets.
More Open-Source Generative Artificial Intelligence (GenAI)
View all →User-friendly AI Interface, supports Ollama, OpenAI API. .
All-in-one desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more. .
Enhanced ChatGPT-compatible AI chat interface supporting multiple AI providers, with multi-user auth, message search, and plugin support. , Source Code.
Your AI second brain. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI. , Source Code.