Deploy LiteLLM on CometVPS
One OpenAI-format proxy in front of 100+ LLM providers. Issue per-user virtual keys with budgets, track spend per request, and fail over between providers — all self-hosted on your own server.
What is LiteLLM?
LiteLLM is a self-hosted proxy that puts a unified OpenAI-compatible API in front of every major LLM provider. Apps talk to one endpoint; LiteLLM handles the provider-specific quirks, key management, fallbacks, rate limits, and per-user cost tracking.
One API, Every Model
Virtual Keys & Budgets
Visibility & Control
Key Features
Everything you need to run a production AI gateway on your own infrastructure
100+ LLM Providers
Unified OpenAI-format API across OpenAI, Anthropic, Google, Azure, Bedrock, Groq, OpenRouter, Ollama, vLLM, and 100+ others. One SDK, every model.
Virtual Keys & Budgets
Issue per-user or per-team virtual API keys with rate limits, monthly spend caps, and allowed-model lists. Revoke instantly without rotating provider keys.
Cost Tracking & Analytics
Track tokens, cost, and latency per request, per user, per model. Postgres-backed dashboards make AI spend finally visible across your org.
Fallbacks & Load Balancing
Round-robin, weighted, or latency-based routing across model deployments. Automatic fallback to a backup model when a provider rate-limits or fails.
Installation Guide
Get LiteLLM running on your CometVPS server in 5 simple steps
This guide gets LiteLLM running; keeping your server secure is up to you. LiteLLM changes over time, so if a step doesn't match, follow the official LiteLLM documentation, and read each command before you run it.
Order Your VPS
LiteLLM is light — a Core VPS Basic with 2 cores and 4GB RAM is plenty for a personal or small-team proxy. Size up to a Supernova plan for production gateways serving many users.Connect via SSH
Once your VPS is provisioned, connect via SSH using the IP and credentials emailed to you.Install Docker & Compose
LiteLLM ships an official Docker image and Compose file. Install Docker Engine and the Compose V2 plugin:curl -fsSL https://get.docker.com | sudo shConfigure config.yaml
In a new folder, such as ~/litellm, create a config.yaml that lists each model with its provider and API key. The os.environ/ prefix reads the key from the environment, so it never sits in the file. Add an entry per model, with optional rate limits such as rpm. The official docs include ready-to-paste examples for every provider.model_list: - model_name: gpt-5-mini litellm_params: model: openai/gpt-5-mini api_key: os.environ/OPENAI_API_KEYNext to it, save this docker-compose.yml. It's based on LiteLLM's official Compose file: the proxy loads your config.yaml, a Postgres database holds the spend tracker and virtual keys, and only the server itself can reach either of them.services: litellm: image: docker.litellm.ai/berriai/litellm:main-stable restart: unless-stopped ports: - "127.0.0.1:4000:4000" volumes: - ./config.yaml:/app/config.yaml command: - "--config=/app/config.yaml" environment: DATABASE_URL: "postgresql://llmproxy:${POSTGRES_PASSWORD}@db:5432/litellm" env_file: - .env depends_on: db: condition: service_healthy db: image: postgres:16 restart: unless-stopped environment: POSTGRES_DB: litellm POSTGRES_USER: llmproxy POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"] interval: 5s timeout: 5s retries: 10 volumes: postgres_data:Launch and Issue Virtual Keys
In the same folder, create a .env file with a master key, a database password and your provider keys (replace your-openai-key), make it readable only by you, then start the proxy. The first line writes .env only if it doesn't exist yet: Postgres keeps the password it was first set up with, so to change a key later, edit .env rather than re-creating it.[ -e .env ] || cat > .env <<EOF LITELLM_MASTER_KEY=sk-$(openssl rand -hex 32) POSTGRES_PASSWORD=$(openssl rand -hex 16) OPENAI_API_KEY=your-openai-key EOF chmod 600 .env docker compose up -dFront the proxy with HTTPS through Caddy or Nginx on the server, forwarding your domain to 127.0.0.1:4000. Then open /ui on your domain, sign in as admin with your master key as the password, and create virtual API keys for each user or app — each one with its own budget, rate limit, and model allow-list.
Security Tip
Always set a strong LITELLM_MASTER_KEY environment variable and never hand it out — it's the root key. Issue per-user virtual keys for everything else. Front the proxy with HTTPS, and store provider API keys in environment variables (not in config.yaml committed to git). Rotate keys regularly.
Recommended VPS Plans
LiteLLM is light on resources — pick a plan based on traffic volume
Core VPS - Basic
2 vCPU Cores, 4GB RAM, 60GB NVMe
LiteLLM is lightweight — a small VPS happily proxies thousands of requests per day for personal use and side projects.
Supernova VPS - Blaze
4 AMD Ryzen Cores, 8GB DDR5, 100GB NVMe
Faster Ryzen cores and DDR5 keep latency low under team load, with room for the Postgres database holding usage logs and virtual keys.
Supernova VPS - Flare
6 AMD Ryzen Cores, 16GB DDR5, 200GB NVMe
Plenty of capacity for a company-wide AI gateway routing across many providers, with detailed cost analytics in Postgres.
Why Deploy on CometVPS?
Get the best performance and reliability for your AI gateway
Centralized API Keys
NVMe SSD Storage
10Gbps Network
24/7 Expert Support
Ready to Deploy LiteLLM?
Centralize your AI keys, track spend per user, and route around provider outages — all from one self-hosted proxy.