Self-Host LocalAI with Docker Compose
LocalAI acts as a drop-in replacement REST API that is compatible with OpenAI API specifications for local inferencing without requiring GPU clusters.
Minimum Hardware Requirements
version: '3.8'
services:
localai:
image: localai/localai:latest
container_name: localai
restart: unless-stopped
ports:
- "8080:8080"
environment:
- NODE_ENV=production
- TZ=UTC
volumes:
- localai_data:/data
volumes:
localai_data:
driver: local
docker-compose.yml and run:
docker compose up -d
VPS RAM & Server Sizing Calculator
Planning to run LocalAI alone or alongside other self-hosted containers on one VPS? Toggle apps to calculate your exact RAM needs with a 25% safety buffer.
Matched Cloud VPS Tiers for Selected Workload:
Replaces OpenAI API
Commercial cloud solution with per-user monthly subscription fees.
More Ai Llms Apps View All →
Compare LocalAI
Benchmark specs head-to-head with other open-source alternatives
Compare LocalAI Side-by-Side
Select any open-source tool from the dropdown to run a hardware, memory, and popularity benchmark against LocalAI.