LiteLLM 1.98.0 AI
Free credit available Limited time

LiteLLM hosting One endpoint for every model, on your own server.

LiteLLM hosting on Selfhost.dev puts the LiteLLM gateway and its own PostgreSQL 16 on a dedicated server we provision, secure and run. Your apps call one OpenAI-compatible endpoint with scoped keys. The gateway forwards each call to the provider with your own API key, so nobody takes a cut.

Two containers on one server. Requests are never metered; providers bill you directly.

One click. Two containers. The template deploys in about six minutes.

+$5.00 added at signup · deployment choice preserved · no card

What the one click sets up before your first API call.
In one line

What is LiteLLM hosting?

What it is

LiteLLM is an open source LLM gateway: one OpenAI-compatible endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and many more. LiteLLM hosting is the server, database and HTTPS that gateway needs to run for your team.

Who it is for

Teams calling several model providers who want one endpoint, per-app keys with budgets and a record of what each app spends.

When to use it

When your apps already use more than one provider or you need spend limits per team. If you would rather buy credits and get one bill, a hosted router fits better.

Containers

LiteLLM proxy in Docker, with Postgres

LiteLLM proxy guides still point at the 2024 liteLLM-proxy repository and python main.py. The proxy now ships as a container image. This template runs ghcr.io/berriai/litellm-database v1.98.0 beside PostgreSQL 16, which keeps your virtual keys, budgets, spend and model settings between restarts.

The stack, end to end

Callers

Your apps, agents and teammates

Edge

TLS and routing

Your project server
Container

LiteLLM v1.98.0

Container

PostgreSQL 16

Platform secret

Master key

Outside the server

Your model providers

Component manifest
ComponentImageWhat it does
LiteLLM ghcr.io/berriai/litellm-database:v1.98.0The gateway and its admin dashboard on port 4000
PostgreSQL postgres:16-alpineVirtual keys, budgets, spend and models, on major version 16
Volume pg-dataThe database files
The models run at your providers; the gateway only forwards and records. Deploy the stack
Setup

Your own LLM gateway, without the default key

An LLM gateway holds every provider key your company uses, so its master key matters. LiteLLM's older docs used sk-1234 and copied setups often keep it. Here the master key comes from your password and the dashboard login is set outright, both before LiteLLM first starts.

Running LiteLLM by handLiteLLM on Selfhost.dev
A master key left at sk-1234 from older docsLITELLM_MASTER_KEY built from your password before the first boot
A dashboard login that falls back to defaultsUI_USERNAME and UI_PASSWORD set outright
Edit config.yaml and restart for each new modelModels and provider keys added in the dashboard, no redeploy
Run Postgres and point DATABASE_URL at itPostgreSQL 16 in its own container; migrations run when LiteLLM starts
Put HTTPS in front of port 4000A certificate per hostname, renewed for you
Server

LiteLLM hosting requirements

LiteLLM hosting requirements are small because the gateway forwards calls instead of running models. One proxy worker and PostgreSQL 16 run on 4 GB, the smallest server we offer. Redis matters when several LiteLLM instances share rate limits; this template runs one worker, so it does without.

What it needs

LiteLLM
v1.98.0, pinned
Database
PostgreSQL 16 in its own container
Memory and CPU
4 GB, 2 cores; x86 or ARM
Workers
One proxy worker, no Redis
Models
None included; add providers and your own API keys
What a 4 GB server handles
LiteLLM plus up to four more light templates
Server size: 4 GB, enough for LiteLLM. Deploy on a 4 GB server
Quickstart

How to deploy LiteLLM in 3 steps

Two containers, one server, no config file to write.

  1. Choose LiteLLM and a 4 GB server

    Launch opens the LiteLLM template in the console. Pick a location and set the admin password; it also becomes your master key, prefixed sk-.

  2. Launch it

    The template deploys in about six minutes, database migrations included. Then sign in at /ui as admin with that password.

  3. Add a provider, then mint keys

    In the dashboard, add a model with your provider's API key. Then create a scoped virtual key for each app, so no app holds the master key.

Deploy LiteLLMStep 1 starts in the console.
Launch LiteLLM
Billing

What LiteLLM hosting costs

LiteLLM hosting here is the server and nothing else. The gateway is free, the template adds no fee and requests are never metered. A European 4 GB server runs it at $0.02/hr, about $15 to $16 a month, billed hourly against prepaid credits. Model usage goes on your own provider accounts.

$0.02
/hr, about $15 to $16 a month at 730 hours
European 4 GB server, $0.02/hr Deploy LiteLLM
What else you pay for
ItemCost
LiteLLM and PostgreSQL$0
Requests, tokens and virtual keys$0 at any volume
Bandwidth$0, traffic is included in the server price
Optional daily backups+20% of the server price
Model usageBilled by your providers to your own accounts
ServerRAM, cores, diskWhereRateAbout a month
cx23 (recommended)4 GB, 2 cores, 40 GBEurope$0.02/hr$15.18
cax11 (ARM)4 GB, 2 cores, 40 GBEurope$0.02/hr$16.35
cpx214 GB, 3 cores, 80 GBUS$0.12/hr$87.75
cpx224 GB, 2 cores, 80 GBSingapore$0.10/hr$72.56
cx33 (more room)8 GB, 4 cores, 80 GBEurope$0.03/hr$23.36

Monthly figures assume 730 hours.

If your balance reaches zero

A server with a card on file or a past top-up is powered off and held for 24 hours; calls to the gateway fail until then. A top-up in that window restarts it. Welcome-credit-only servers are deleted at zero.

Price another size or region in the calculator, no signup.

Options

LiteLLM pricing: Enterprise, a hosted router or your own gateway

LiteLLM pricing starts at zero: the open source gateway is free to self host, by LiteLLM's own pricing page. Enterprise adds governance and support, sized to your usage and never priced per token. A hosted router such as OpenRouter skips the server but adds a fee on the credits you buy.

OptionWhat you payWho holds the provider keys
LiteLLM open source, self hostedNothing for the softwareYou
LiteLLM EnterpriseSized to your usage, never per token; no public list priceYou
OpenRouter, a hosted routerModel cost plus a 5.5% platform fee (8% on Business)OpenRouter
LiteLLM on Selfhost.dev$0.02/hr for 4 GB in Europe, plus your provider billsYou

Figures from litellm.ai/pricing and openrouter.ai/pricing.

When a hosted router is the better choice

When your model spend is small or you want one bill across hundreds of models without opening provider accounts. A hosted router does that for its fee. Here you hold the keys, the budgets and the spend records.

Status

Five checks on every LiteLLM server

  • Every service is health-checked every 60 seconds.
  • A stalled deploy is retried automatically, not abandoned.
  • A deploy is never reported done until the URL answers.
  • Your LiteLLM version stays put. The image is an exact tag and Postgres follows major version 16; a restart or redeploy brings back the same build.
  • New models need no redeploy. They are stored in Postgres the moment you add them in the dashboard.
~6 min to deploy

The LiteLLM template deploys in about six minutes. That is the platform's own budget, not an estimate.

Notes

LiteLLM hosting limitations

  1. No models included. Add each provider and your own API key in the dashboard; nothing is preloaded or billed through us.
  2. One worker, no Redis. A single proxy worker on one server, with no shared cache across instances or a second replica to fail over to.
  3. The master key is full admin. It controls every key and budget, so give each app a scoped virtual key and keep the master key out of code.

Nothing here in your way? The template deploys in about six minutes.

Launch LiteLLM
Backups

LiteLLM backup and restore

LiteLLM backup and restore comes down to one database. Virtual keys, teams, budgets, spend and the models you added all live in PostgreSQL. The server can take an optional daily image of everything on it; for a portable pg_dump, ask us for container access over SSH.

MethodWhat it coversWhere it lives
Daily server backup (optional, +20%)LiteLLM, PostgreSQL and the config; the last 7 keptWith the server; deleted with it
pg_dump of the LiteLLM databaseKeys, teams, budgets, spend and model settingsYour storage, via container access over SSH, granted on request
Sizing

Not sure 4 GB carries your traffic?

Tell us how many apps call the gateway and roughly how many requests a day. We reply with a server size and its monthly cost.

Help

Frequently asked questions

Is LiteLLM free?

Yes. The open source LiteLLM gateway is free to self host, forever, by LiteLLM's own pricing page. Enterprise adds governance, security and support, sized to your usage and never priced per token. Here you pay for the server by the hour and your model providers directly. See pricing.

Does LiteLLM need Postgres?

For virtual keys, budgets and spend tracking, yes. LiteLLM can run from a config file alone, but key generation and spend limits need a database behind it. This template runs PostgreSQL 16 beside the gateway and applies LiteLLM's migrations each time it starts.

How do I connect my app to LiteLLM?

Point any OpenAI-compatible SDK at your LiteLLM address and use a virtual key from the dashboard as the API key. Ask for a model by the name you gave it in LiteLLM; the gateway calls the provider with your stored key and records the spend against that key.

Can I deploy LiteLLM with AI?

Yes. Our MCP server can create the project, deploy the LiteLLM template and manage its domain from Claude, Cursor or any MCP client. Adding providers and minting virtual keys then happens in LiteLLM's own dashboard, signed in as admin with your password.

Your keys, your budgets, your gateway. No cut on any call.

  • LiteLLM with PostgreSQL 16 for keys, budgets and spend
  • Your own master key and admin login before the first boot
  • A European 4 GB server, about $15 to $16 a month
Launch LiteLLM

About Selfhost.dev

Selfhost.dev is a managed self hosting platform for developers and small teams. Open source apps and databases on dedicated servers you control, billed by the hour, in six locations across three continents.

Best for: LiteLLM, AnythingLLM, n8n and managed PostgreSQL, MySQL, Redis, ClickHouse, OpenSearch and Kafka.