Open Source
LLM Proxy & Gateway
Cost Control

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

Apps speak the OpenAI format. LiteLLM translates to Anthropic, Google, Bedrock, Ollama, and 100+ other providers transparently.

Virtual Keys & Budgets

Provider API keys live in LiteLLM. Hand out short-lived virtual keys with spend caps, model allow-lists, and rate limits per user or app.

Visibility & Control

Detailed logs of tokens, latency, and cost per request, per user, per model. Finally know what your AI bill is going to before it arrives.

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.

  1. 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.
  2. Connect via SSH

    Once your VPS is provisioned, connect via SSH using the IP and credentials emailed to you.
  3. 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 sh
  4. Configure 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_KEY
    Next 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:
  5. 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 -d
    Front 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

Recommended
Personal Proxy

Core VPS - Basic

$14/mo

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.

Team / Production

Supernova VPS - Blaze

$32/mo

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.

High-Volume Gateway

Supernova VPS - Flare

$58/mo

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

Provider keys live in one place — apps and users only ever hold short-lived virtual keys.

NVMe SSD Storage

Fast disk I/O for the Postgres database storing usage logs, keys, and budget state.

10Gbps Network

On Supernova VPS, premium connectivity keeps proxy latency near zero on top of provider response times.

24/7 Expert Support

Our team is here to help with server issues around the clock.

Ready to Deploy LiteLLM?

Centralize your AI keys, track spend per user, and route around provider outages — all from one self-hosted proxy.