Deploy Ferro Labs AI - PostgreSQL storage
Railway

Deploy Ferro Labs AI - PostgreSQL storage

Unified AI Gateway - All your traffic. One gateway - PostgreSQL storage.

Deploy Ferro Labs AI - PostgreSQL storage

/var/lib/postgresql/data

Ferro Labs AI Gateway

ferro-labs/ai-gateway

Just deployed

Deploy and Host Ferro Labs AI - PostgreSQL storage on Railway

Ferro Labs AI - PostgreSQL storage is a high-performance, OpenAI-compatible AI gateway written in Go. It routes requests across multiple LLM providers through one API while persisting admin keys, config history, and request logs in PostgreSQL, making it a strong Railway template for durable multi-service deployments.

About Hosting Ferro Labs AI - PostgreSQL storage

Hosting Ferro Labs AI - PostgreSQL storage on Railway gives you a production-ready AI gateway backed by a managed Postgres database. Railway builds and runs the gateway service from the repository, while a Railway Postgres service stores API keys, runtime configuration, and request logs. You only need a MASTER_KEY, at least one provider API key such as OPENAI_API_KEY, and Postgres-backed store environment variables. This template is ideal when you want persistent state without managing SQLite volumes, and when you want a cleaner path from initial deployment to a larger production setup.

Common Use Cases

  • Route requests across one or more LLM providers through a single OpenAI-compatible endpoint
  • Run a shared internal AI gateway with durable API keys, config state, and request logs in PostgreSQL
  • Start with a Railway-native production deployment that can scale beyond a single-container SQLite setup

Dependencies for Ferro Labs AI - PostgreSQL storage Hosting

  • At least one LLM provider API key, such as OpenAI, Anthropic, Gemini, or Groq
  • A Railway Postgres service connected to the gateway through DATABASE_URL

Deployment Dependencies

Implementation Details

PORT=8080
MASTER_KEY=fgw_your-master-key
OPENAI_API_KEY=sk-your-openai-key

API_KEY_STORE_BACKEND=postgres
API_KEY_STORE_DSN=${{Postgres.DATABASE_URL}}
CONFIG_STORE_BACKEND=postgres
CONFIG_STORE_DSN=${{Postgres.DATABASE_URL}}
REQUEST_LOG_STORE_BACKEND=postgres
REQUEST_LOG_STORE_DSN=${{Postgres.DATABASE_URL}}

Create the three *_STORE_DSN values as Railway reference variables in the UI so they resolve to the Postgres service DATABASE_URL. If your Postgres service has a different name, replace Postgres with the exact Railway service name.

Why Deploy Ferro Labs AI - PostgreSQL storage 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 Ferro Labs AI - PostgreSQL storage 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

Ferro Labs AI Gateway

ferro-labs/ai-gateway

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
View Template
EchoDeck
Generate a mp4 from powerpoint with TTS

Fixed Scope
View Template
openui
Deploy OpenUI: AI-powered UI generation with GitHub OAuth and OpenAI API.

zexd