---
title: "Deploy Ferro Labs AI - SQLite storage"
description: "Unified AI Gateway - All your traffic. One gateway - SQLite storage."
category: "AI/ML"
url: https://railway.com/deploy/ferro-labs-ai-sqlite-storage
---

# Deploy Ferro Labs AI - SQLite storage

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

**[Deploy Ferro Labs AI - SQLite storage on Railway](https://railway.com/template/ferro-labs-ai-sqlite-storage)**

- **Creator:** Mitul Shah's Projects
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### Ferro Labs AI Gateway https://raw.githubusercontent.com/ferro-labs/ai-gateway/refs/heads/main/web/logo.png

- **Source:** ferro-labs/ai-gateway
- **Health check:** /health

## Documentation

# Deploy and Host Ferro Labs AI - SQLite storage on Railway

Ferro Labs AI - SQLite 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 embedded SQLite, making it a simple, self-contained deployment option for Railway.

## About Hosting Ferro Labs AI - SQLite storage

Hosting Ferro Labs AI - SQLite storage on Railway gives you a production-ready AI gateway with minimal setup. Railway builds and runs the service directly from the repository, while a mounted volume provides persistent SQLite storage for API keys, configuration state, and request logs. You only need a `MASTER_KEY`, at least one provider API key such as `OPENAI_API_KEY`, and the SQLite store environment variables. This template is ideal when you want a lightweight deployment without managing a separate database, while still keeping persistence across restarts and redeploys.

## Common Use Cases

- Route requests across one or more LLM providers through a single OpenAI-compatible endpoint
- Run a lightweight internal AI gateway with persistent admin keys, config state, and request logs
- Validate app integrations on Railway before upgrading to a larger Postgres-backed production setup

## Dependencies for Ferro Labs AI - SQLite storage Hosting

- At least one LLM provider API key, such as OpenAI, Anthropic, Gemini, or Groq
- A Railway Volume mounted at `/data` for persistent SQLite storage

### Deployment Dependencies

- Ferro Labs AI Gateway repository: https://github.com/ferro-labs/ai-gateway
- Configuration reference: https://github.com/ferro-labs/ai-gateway/blob/main/config.example.yaml
- Railway deployment guide: https://github.com/ferro-labs/ai-gateway/blob/main/docs/railway-template.md
- Provider environment variables: https://github.com/ferro-labs/ai-gateway#environment-variables

### Implementation Details

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

API_KEY_STORE_BACKEND=sqlite
API_KEY_STORE_DSN=/data/keys.db
CONFIG_STORE_BACKEND=sqlite
CONFIG_STORE_DSN=/data/config.db
REQUEST_LOG_STORE_BACKEND=sqlite
REQUEST_LOG_STORE_DSN=/data/logs.db

RAILWAY_RUN_UID=0
```

`RAILWAY_RUN_UID=0` is required when using a Railway Volume because the volume is mounted as `root`, while the container normally runs as a non-root user.

## Why Deploy Ferro Labs AI - SQLite 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 - SQLite 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.

## 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/ferro-labs-ai-sqlite-storage
