LiteLLM on Railway
Open-source AI gateway: one OpenAI-compatible API for 100+ LLMs, with keys and spend tracking on Railway.
LiteLLM is an open-source AI gateway. It puts OpenAI, Anthropic, Gemini, Bedrock, Azure, OpenRouter and 100+ other model providers behind one OpenAI-compatible API, so applications can switch models without code changes.
Run as a proxy, it adds virtual API keys, teams, budgets, rate limits, load balancing and fallbacks, and records spend per key, user and team. It is a common way to give internal tools such as n8n, Open WebUI or coding assistants a single controlled endpoint.
LiteLLM is MIT licensed outside its enterprise/ directory, which has a separate enterprise licence.
What LiteLLM can do
- OpenAI-compatible API across 100+ providers
- Virtual keys with budgets and rate limits
- Spend tracking per key, user and team
- Admin UI at /ui
- Load balancing and failover across deployments
- Response cache and shared router state in Redis
What people use it for
- One internal LLM endpoint for several apps
- Per-team budgets and usage reporting
- Switching between model providers without code changes
- Failover across providers or API keys
Videos
Running LiteLLM on Railway
On Railway, the LiteLLM template deploys the official litellm-database image v1.104.2 as a public service, with Postgres 18 for models, keys, teams, budgets and spend logs and Redis 8.2 for the response cache and shared rate-limit state. The master key, salt key and Admin UI password are generated at deploy time. Cost follows the proxy's CPU and memory, plus Postgres and Redis; provider usage is billed separately by each provider.
LiteLLM templates on Railway
Tracklayer templates are listed first. Other LiteLLM templates follow, ordered by total deployments on Railway. How this works.
Deployment numbers as of 2026-11-20.
Questions about LiteLLM
How do I log in to the Admin UI?
Open https://your-domain/ui and sign in as admin with the generated UI_PASSWORD from the LiteLLM service variables. Keep LITELLM_MASTER_KEY for administration and create virtual keys for applications.
Do I need a provider API key?
Yes, at least one. Add it when creating a model in the Admin UI, or set an optional variable such as OPENAI_API_KEY or ANTHROPIC_API_KEY. Provider usage is billed by the provider.
Is the Redis cache used for every request?
No. By default caching is opt-in per request (LITELLM_CACHE_MODE=default_off). Set the variable to default_on to cache by default.
How do I upgrade or scale?
Change the version tag in services/litellm/Dockerfile and redeploy; migrations run on start. Raise NUM_WORKERS or add replicas for throughput. Never change LITELLM_SALT_KEY after adding models.
Which licence applies?
LiteLLM is MIT outside its enterprise/ directory, which has a separate enterprise licence. The template does not enable enterprise features.
Guides
Similar apps
Tracklayer maintains the templates marked as such; LiteLLM is a trademark of its owners and this site is not affiliated with them.