---
title: "Deploy Mage AI"
description: "Mage AI 0.9.80 data pipelines: Postgres, persistent volume, login on"
category: "AI/ML"
url: https://railway.com/deploy/mage-ai-1
---

# Deploy Mage AI

Mage AI 0.9.80 data pipelines: Postgres, persistent volume, login on

**[Deploy Mage AI on Railway](https://railway.com/template/mage-ai-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/mage-ai-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### Mage AI https://cdn.jsdelivr.net/gh/mage-ai/mage-ai@0.9.80/docs/favicons/m1.svg

- **Source:** https://github.com/aalfath/mage-ai-railway-template
- **Health check:** /api/status
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

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

## Documentation

# Deploy and Host Mage AI on Railway

Mage AI is an open-source data pipeline tool and a modern alternative to Airflow. You build pipelines from Python, SQL and R blocks in a notebook-style editor, see each block's output as you go, and schedule, trigger and monitor the runs from the same web UI. It handles batch, streaming and data integration pipelines.

## About Hosting Mage AI

Hosting Mage AI means running its web server and scheduler, which come in one container, next to a database for its metadata: users, pipeline runs, schedules and triggers. The pipeline code and each block's output are files, so they need persistent storage that survives redeploys. Mage turns on login by default but falls back to the owner login admin / admin, so a public instance needs its own owner password and its own session-signing secret. This template runs Mage AI 0.9.80 from the official image, keeps the metadata in Railway Postgres and the project on a volume, generates the owner password and secrets, and serves the UI over HTTPS on a Railway domain.

## Common Use Cases

* Build and schedule ETL and ELT pipelines that load data from APIs, databases and files into a warehouse
* Sync data between SaaS tools and databases with Mage's data integration sources and destinations
* Run dbt models, Python transformations and data quality checks on a schedule or through an API trigger

## Dependencies for Mage AI Hosting

* Mage AI 0.9.80, built from the official `mageai/mageai` image
* PostgreSQL for Mage's metadata (Railway Postgres, included)

### Deployment Dependencies

* Mage AI on GitHub: https://github.com/mage-ai/mage-ai
* Mage AI 0.9.80 release: https://github.com/mage-ai/mage-ai/releases/tag/0.9.80
* Mage AI documentation: https://docs.mage.ai
* Template source: https://github.com/aalfath/mage-ai-railway-template

### Implementation Details

The template has two services. **Mage AI** builds from the template repo. It keeps the project in `/home/src/default_repo` and block output and logs in `/home/src/mage_data`, on a volume mounted at `/home/src`. **Postgres** stores the metadata.

The only value you enter is `DEFAULT_OWNER_EMAIL`. After the deploy, log in with that email and the generated `DEFAULT_OWNER_PASSWORD` from the Mage AI service's Variables tab, then change the password in Mage. The container refuses to start if the password is empty or `admin`.

To install extra Python packages, list them in `default_repo/requirements.txt` (from Mage's file browser) and redeploy: they are installed at each start. Single sign-on, LDAP and SMTP notifications are optional and described in the Mage docs.

The Dockerfile flattens the official image into one layer. Without that, files the upstream image deletes in later layers (numpy 2) reappeared on Railway and Mage failed to start. Template updates come from the repo's `main` branch. Back up the volume and the database before applying a new Mage version, because Mage migrates its database on start.

## Why Deploy Mage AI 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 Mage AI 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.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/mage-ai-1
