Skip to content

Deploy your Astro Site with Railway

Railway is a deployment platform built to simplify your infrastructure stack from servers to observability with a single, scalable platform.

This guide is for deploying an Astro static site to Railway using either the web interface or Railway CLI tool.

Railway’s default build system, Railpack, automatically builds your Astro project as a static site.

  1. Create a Railway account and sign in.

  2. From the Railway dashboard, create a new project.

  3. Select the option to deploy from a GitHub repository, and select your Astro project.

  4. Generate or add a custom domain from your project’s network settings.

  1. Install the Railway CLI tool.

  2. Login with the command railway login.

  3. From within your Astro project, run railway init and choose a workspace and project name.

  4. Run railway up to deploy your project on Railway.

  5. Run railway domain to generate a Railway provided service domain.

Railway guide to deploying an Astro app

How to host an Astro site on Railway

More Deployment Guides

Contribute Community Sponsor