Deploy Bifrost
Bifrost 2.2 fast AI gateway for 20+ LLM providers with virtual keys.
bifrost
Just deployed
/app/data
Deploy and Host Bifrost on Railway
Bifrost is a high-performance AI gateway written in Go. It exposes one OpenAI-compatible API in front of OpenAI, Anthropic, Google, AWS Bedrock, Azure, Mistral, Groq, Ollama and many more providers, with load balancing, fallbacks, semantic caching, budgets, rate limits, virtual keys, MCP tools and request logs.
About Hosting Bifrost
This template deploys Bifrost v2.2.2 from the official image with its config and logs stores in SQLite on a Railway volume. The start command writes a config.json that protects the dashboard and management API with an admin username and a generated password, and requires a virtual key for every inference request. Provider keys are encrypted with a generated key. Add providers and virtual keys in the dashboard, then point any OpenAI SDK at Bifrost. It is light and fits the Hobby plan. Requests from other Railway services can use the private URL.
Common Use Cases
- One OpenAI-compatible endpoint for many LLM providers with fallbacks
- Per-team virtual keys with budgets and rate limits
- Logging and cost tracking for AI requests across applications
Dependencies for Bifrost Hosting
maximhq/bifrost:v2.2.2(official image)- A Railway volume at
/app/datafor config and logs
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| bifrost | maximhq/bifrost:v2.2.2 | public domain on 8080; private IPv4/IPv6 | volume at /app/data |
from openai import OpenAI
client = OpenAI(base_url="https:///v1", api_key="")
client.chat.completions.create(model="openai/gpt-4o-mini", messages=[{"role": "user", "content": "hi"}])
| Variable | Default | Purpose |
|---|---|---|
BIFROST_ADMIN_USERNAME / BIFROST_ADMIN_PASSWORD | admin / generated | Dashboard and management API login |
BIFROST_ENCRYPTION_KEY | generated | Encrypts provider keys; never change it |
BIFROST_DISABLE_CONTENT_LOGGING | false | Set true to log metadata only |
BIFROST_LOG_RETENTION_DAYS | 30 | Request log retention |
Notes:
- Virtual keys need an allowed provider with
allowed_modelsandkey_ids(use*for all). - For providers on the Railway private network, such as Ollama, enable Allow private network on the provider.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Bifrost project or its maintainers.
Why Deploy Bifrost 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 Bifrost 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.
Template Content
bifrost
maximhq/bifrost:v2.2.2