Skip to main content

Quick Start with Docker

The fastest way to run LiteLLM Proxy in production.

Pull the Image

Run with Docker

Docker Compose Setup

For production deployments with PostgreSQL and Prometheus.

Create docker-compose.yml

docker-compose.yml

Create config.yaml

config.yaml

Create .env File

.env
Never commit .env files to version control. Add .env to your .gitignore.

Create prometheus.yml

prometheus.yml

Start the Stack

1

Start Services

2

Check Logs

Wait for the message:
3

Verify Health

4

Access UI

Open browser to http://localhost:4000/ui

Dockerfile Reference

The LiteLLM Dockerfile uses a multi-stage build process:
Dockerfile

Production Deployment

With Redis Cache

Add Redis to your docker-compose.yml:
docker-compose.yml
Update config.yaml:
config.yaml

Environment-Specific Configs

Kubernetes Deployment

litellm-deployment.yaml

Monitoring & Logs

View Logs

Access Prometheus

Open http://localhost:9090 to view Prometheus metrics. Useful queries:
  • litellm_requests_total - Total requests
  • litellm_request_duration_seconds - Request latency
  • litellm_spend_total - Total spend

Health Checks

Maintenance

Update to Latest Version

Backup Database

Restore Database

Scale Services

Troubleshooting

Container Won’t Start

Check logs:
Common issues:
  • Database not ready: Wait for DB health check
  • Port conflict: Change port mapping
  • Invalid config: Validate YAML syntax

High Memory Usage

Increase memory limits:

Database Connection Issues

Verify DATABASE_URL:
Test connection: