---
title: Railway Docs: Deploy AI Agents, Frontends, Backends, and Databases
description: Guides and reference for Railway: connect your coding agent, run AI agents, host frontends, deploy backends and databases, understand pricing, and migrate from other platforms.
---
# Railway Documentation

Railway is an all-in-one intelligent cloud provider that makes it easy to provision infrastructure, develop locally, and deploy to the cloud. Our docs are mapped by topic: getting started, connecting your agent, using AI on Railway, hosting frontends, deploying backends, databases, scaling and monitoring, pricing, security, and how Railway compares to and migrates from other platforms.

- [Quick Start](https://docs.railway.com/quick-start): Deploy in minutes. Jump into our quickstart guide to get your first app running.
- [AI](https://docs.railway.com/ai): Build with Railway using Agent Skills and the MCP server for AI-powered workflows.
- [CLI](https://docs.railway.com/cli): Develop locally and deploy from your terminal with the Railway CLI.
- [Templates](https://docs.railway.com/templates): One-click deployable applications and starters for common use cases.

## Set up your coding agent

One command installs the Railway CLI, MCP server, and agent skills for Claude Code, Codex, Cursor, and more. Already have the CLI? Run `railway setup agent`. See [Railway for Agents](https://docs.railway.com/agents).

```bash
curl -fsSL agents.railway.com | sh
```

## Docs by topic

### Get started

Set up your first project and learn how services, environments, and deployments fit together.

- [The basics](https://docs.railway.com/platform/the-basics): How projects, services, environments, and deployments fit together.
- [Quick start](https://docs.railway.com/quick-start): Get your first app running on Railway in a few minutes.
- [Services](https://docs.railway.com/services): What a service is and the ways to create one from a repo, image, or local code.
- [Environments](https://docs.railway.com/environments): Isolated copies of a project for production, staging, and PR previews.

### Connect your agent

Use Railway from Claude Code, Codex, and Cursor with the CLI, MCP server, and skills.

- [One-step setup](https://docs.railway.com/agents): Set up the CLI, MCP server, and agent skills for your coding agent in one step.
- [Railway MCP server](https://docs.railway.com/ai/mcp-server): Let AI coding agents manage your Railway projects.
- [Agent skills](https://docs.railway.com/ai/agent-skills): Teach your coding agent to deploy and manage Railway projects.
- [Plugins and connectors](https://docs.railway.com/ai/plugins-and-connectors): Railway plugins for Claude Code, Codex, Cursor, ChatGPT, and more.

### AI on Railway

Cloud machines and sandboxes for AI coding, plus an assistant in your dashboard.

- [Cloud agents](https://docs.railway.com/cloud-agents): Run coding agents like Claude Code and Codex in a persistent environment on Railway.
- [Sandboxes](https://docs.railway.com/sandboxes): Spin up isolated Linux environments to run code, then tear them down.
- [Railway Agent](https://docs.railway.com/ai/railway-agent): Chat with an agent in the dashboard to manage services, diagnose failures, and ship fixes.

### Host your frontend

Deploy Next.js, Vite, and static sites, and serve them fast with the CDN and custom domains.

- [Deploy a framework](https://docs.railway.com/languages-frameworks): Guides for Next.js, Nuxt, SvelteKit, Astro, Express, FastAPI, Django, Rails, and more.
- [Static sites](https://railway.com/guides/static-hosting): Deploy a static site with automatic builds, SSL, and custom domains.
- [Frontend environment variables](https://railway.com/guides/frontend-environment-variables): Build-time vs runtime variables in Vite, Next.js, Nuxt, SvelteKit, Astro, and Angular.
- [CDN](https://docs.railway.com/networking/cdn): Cache static assets and HTML at the edge.
- [Domains](https://docs.railway.com/networking/domains): Add a Railway domain or your own custom domain with automatic SSL.

### Build and deploy your backend

Ship APIs, workers, and cron jobs with Dockerfiles, variables, monorepos, and the CLI.

- [Build & deploy](https://docs.railway.com/build-deploy): How Railway turns your code into a running deployment.
- [Deployments](https://docs.railway.com/deployments): Start commands, healthchecks, restart policies, and rollbacks.
- [Deploying a monorepo](https://docs.railway.com/deployments/monorepo): Deploy several services from one repository.
- [Variables](https://docs.railway.com/variables): Set environment variables and reference values across services.
- [Deploying with the CLI](https://docs.railway.com/cli/deploying): Deploy from your terminal with railway up.
- [Cron jobs](https://docs.railway.com/cron-jobs): Run a service on a schedule.
- [Functions](https://docs.railway.com/functions): Write and deploy code from the Railway canvas without a git repository.

### Databases and storage

Add and connect PostgreSQL, MySQL, Redis, and MongoDB databases.

- [PostgreSQL](https://docs.railway.com/databases/postgresql): Add a PostgreSQL database to a project and connect to it.
- [Databases](https://docs.railway.com/databases): The databases Railway supports: PostgreSQL, MySQL, Redis, and MongoDB.
- [Databases reference](https://docs.railway.com/databases/reference): Technical reference for database services and their variables.

### Scale and monitor in production

Autoscale, choose regions, and monitor with logs, metrics, tracing, and alerts.

- [Scaling](https://docs.railway.com/deployments/scaling): Vertical autoscaling, horizontal replicas, and resource limits.
- [Regions](https://docs.railway.com/deployments/regions): Choose where in the world your services run.
- [Static outbound IPs](https://docs.railway.com/networking/static-outbound-ips): Give a service a fixed egress IP for allowlists.
- [Logs](https://docs.railway.com/observability/logs): View, filter, and search build, deploy, HTTP, and DNS logs.
- [Metrics](https://docs.railway.com/observability/metrics): CPU, memory, network, and disk usage for each service.
- [Tracing with the CLI](https://docs.railway.com/cli/trace): Turn on tracing and find slow or failing requests with railway trace.
- [Alerts for crashes and failed deploys](https://railway.com/guides/alerts-crashes-failed-deploys): Get notified in Slack, Discord, or by webhook when something breaks.

### Compare and migrate

Compare Railway with Render, Vercel, Fly.io, Heroku, and DigitalOcean, and move your app over.

- [Railway vs Render](https://docs.railway.com/platform/compare-to-render): How Railway and Render differ on deploys, pricing, and scaling.
- [Railway vs Vercel](https://docs.railway.com/platform/compare-to-vercel): How Railway and Vercel differ on runtime, databases, and pricing.
- [Railway vs Fly.io](https://docs.railway.com/platform/compare-to-fly): How Railway and Fly.io differ on deploys, regions, and pricing.
- [Railway vs Heroku](https://docs.railway.com/platform/compare-to-heroku): How Railway and Heroku differ on deploys, add-ons, and pricing.
- [Railway vs DigitalOcean](https://docs.railway.com/platform/compare-to-digitalocean): How Railway compares to DigitalOcean App Platform and Droplets.
- [Migrate from Vercel](https://docs.railway.com/platform/migrate-from-vercel): Move a Vercel project to Railway, step by step.
- [Migrate from Render](https://docs.railway.com/platform/migrate-from-render): Move Render services and databases to Railway.
- [Migrate from Fly](https://docs.railway.com/platform/migrate-from-fly): Move a Fly.io app to Railway.
- [Migrate from Heroku](https://docs.railway.com/platform/migrate-from-heroku): Move a Heroku app and its add-ons to Railway.

### Pricing

Understand plans, plan limits, usage-based pricing, and billing.

- [Plans](https://docs.railway.com/pricing/plans): What each plan includes, its limits, and how usage is billed.
- [Pricing](https://docs.railway.com/pricing): How Railway's usage-based pricing works.

### Security and compliance

Review how Railway secures your data and its SOC 2 and SOC 3 certifications.

- [Security](https://docs.railway.com/enterprise/security): How Railway secures infrastructure, data, and access.
- [Compliance](https://docs.railway.com/enterprise/compliance): Railway's compliance certifications and documentation.

## Deploy an app in minutes

[Redis](https://railway.com/deploy/redis) · [n8n](https://railway.com/deploy/n8n) · [LibreChat](https://railway.com/deploy/librechat-official) · [Metabase](https://railway.com/deploy/metabase) · [Cal.com](https://railway.com/deploy/calcom) · [Coder](https://railway.com/deploy/coder) · [PostHog](https://railway.com/deploy/posthog) · [Resend](https://railway.com/deploy/resend) · [All templates](https://railway.com/templates)
