---
title: "Deploy Bifrost + PostgreSQL"
description: "Deploy Bifrost AI Gateway with PostgreSQL — production-ready in one click."
category: "AI/ML"
url: https://railway.com/deploy/blue-dark
---

# Deploy Bifrost + PostgreSQL

Deploy Bifrost AI Gateway with PostgreSQL — production-ready in one click.

**[Deploy Bifrost + PostgreSQL on Railway](https://railway.com/template/blue-dark)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/blue-dark/manifest.json

- **Creator:** Maxim AI's Projects
- **Category:** AI/ML
- **Total deploys:** 7

## Template content

### maximhq/bifrost:latest https://framerusercontent.com/images/k49dViw06yckDjJt5uERdfTSjU.png

- **Image:** maximhq/bifrost:latest
- **Health check:** /health
- **Public domain:** Yes

### railwayapp-templates/postgres-ssl:18 https://wiki.postgresql.org/images/a/a4/PostgreSQL_logo.3colors.svg

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

## Documentation

# Deploy and Host Bifrost AI Gateway on Railway

Bifrost is an open-source, high-performance AI gateway written in Go that unifies 20+ LLM providers — OpenAI, Anthropic, AWS Bedrock, Google Vertex, Azure, and more — through a single OpenAI-compatible API. Deploy in seconds with automatic failover, load balancing, virtual keys, and enterprise governance. Adds only 11µs overhead at 5,000 RPS.

## About Hosting Bifrost

This template deploys Bifrost backed by PostgreSQL for persistent configuration and request log storage. On first boot, Bifrost automatically runs database migrations and launches a full web UI for visual provider setup, real-time monitoring, and analytics. All provider API keys, virtual keys, budgets, and governance settings persist in Postgres across restarts and redeploys. Connect any AI provider directly from the UI — no code changes required.

## Common Use Cases

- Multi-provider AI gateway with automatic failover across OpenAI, Anthropic, AWS Bedrock, and 17+ more providers
- Enterprise cost governance with virtual keys, hierarchical budgets, and rate limits per team or customer
- Drop-in replacement for OpenAI and Anthropic SDKs — change one base URL, gain failover and full observability
- MCP gateway for coding agents like Claude Code, Cursor, and Codex CLI
- High-throughput AI infrastructure handling 5,000+ RPS with semantic caching to cut token costs

## Dependencies for Bifrost Hosting

- PostgreSQL 16+ for persistent config store and request log storage

### Deployment Dependencies

- Bifrost Docs: https://docs.getbifrost.ai
- Docker Hub: https://hub.docker.com/r/maximhq/bifrost
- GitHub: https://github.com/maximhq/bifrost

### 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.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/blue-dark
