---
title: "Deploy LiteLLM (w/ spend tracking)"
description: "LiteLLM gateway with virtual keys, budgets, spend tracking and admin login."
category: "AI/ML"
url: https://railway.com/deploy/litellm-w-spend-tracking
---

# Deploy LiteLLM (w/ spend tracking)

LiteLLM gateway with virtual keys, budgets, spend tracking and admin login.

**[Deploy LiteLLM (w/ spend tracking) on Railway](https://railway.com/template/litellm-w-spend-tracking)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/litellm-w-spend-tracking/manifest.json

- **Creator:** AvgSoft
- **Category:** AI/ML

## Template content

### LiteLLM https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@0ecd7f580babe9d4cd72f46101518539d6eb3eca/service-icons/litellm.svg

- **Image:** ghcr.io/berriai/litellm:v1.106.6
- **Health check:** /health/readiness
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@6ab06146e7d9a658953ce107fdbb88d57799794d/service-icons/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host LiteLLM (w/ spend tracking) on Railway

LiteLLM puts one OpenAI-compatible API in front of 100+ LLM providers. This template saves virtual keys, budgets and spend in Postgres, and you sign in with the password you choose on the deploy form.

![LiteLLM: one API for 100+ LLMs, with spend tracking](https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@0ecd7f580babe9d4cd72f46101518539d6eb3eca/litellm/banner.png)

## About Hosting LiteLLM (w/ spend tracking)

You get LiteLLM 1.106.6 and a private Postgres, with the master key and encryption key generated per deploy. Open your LiteLLM URL at `/ui` and sign in as `admin`. Add a model with your provider key, then create a virtual key for each app.

## Common Use Cases

- One endpoint for coding agents
- Per-team keys with budgets
- Spend tracking across providers

## Dependencies for LiteLLM (w/ spend tracking) Hosting

- PostgreSQL

### Deployment Dependencies

- [LiteLLM proxy docs](https://docs.litellm.ai/docs/simple_proxy)
- [Supported providers](https://docs.litellm.ai/docs/providers)

### Implementation Details

![Architecture: apps and your team reach LiteLLM; Postgres stays on the private network; LiteLLM calls your LLM providers](https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@0ecd7f580babe9d4cd72f46101518539d6eb3eca/litellm/architecture.png)

Needs about 0.9 GB, so use Trial or a paid plan; the Free plan can't run LiteLLM. Back up Postgres, and never change `LITELLM_SALT_KEY`: it encrypts the provider keys saved there.

## Why Deploy LiteLLM (w/ spend tracking) on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying LiteLLM (w/ spend tracking) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


**Updated 2026-10-28:** first release, LiteLLM 1.106.6.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/litellm-w-spend-tracking
