Deploy magpie
Deploy magpie with web UI on Railway.
magpie
Just deployed
/config
Deploy and Host magpie on Railway
magpie is a self-hosted AI gateway and management platform that provides a unified interface for interacting with multiple AI model providers. It supports OpenAI-compatible APIs, provider management, model routing, and a built-in Web UI for configuring and managing AI services. magpie helps developers run their own AI infrastructure while keeping control of their API keys and data.
About Hosting magpie
Hosting magpie on Railway provides a simple way to run your own AI gateway without managing servers or container infrastructure. This template deploys the official magpie Docker image, starts the Web UI/API service, and exposes it through Railway's public networking.
The deployment requires configuring persistent storage for magpie's configuration files and setting an authentication key to protect your publicly accessible instance. Railway volumes ensure that provider settings, profiles, and other application data persist across deployments and restarts.
Common Use Cases
- Run a private OpenAI-compatible API gateway for multiple AI model providers
- Manage and route requests between different AI providers from a single Web UI
- Provide a self-hosted AI backend for applications, agents, and developer tools
Dependencies for magpie Hosting
- A Railway Volume mounted at
/configfor persistent configuration storage - A
MAGPIE_WEB_KEYenvironment variable to secure Web UI access
Implementation Details
This template uses the official magpie Docker image:
ghcr.io/yetone/magpie:latest
The service starts magpie Web UI with:
/magpie web --lan --no-open
Required environment variable:
MAGPIE_WEB_KEY=
RAILWAY_RUN_UID=0
The configuration directory should be persisted using a Railway Volume:
Mount Path:
/config
The /config directory stores magpie configuration files such as provider settings and profiles.
Why Deploy magpie 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 magpie 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
MAGPIE_WEB_KEY
Password used to protect access to the magpie Web UI. Set a strong random value to prevent unauthorized access to the management interface.
RAILWAY_RUN_UID
Override used to run the service with the correct permissions when mounting a Railway Volume.
