Deploy a .NET CMS on Railway in five minutes
Raytha is an open source CMS for .NET 10 and PostgreSQL. The quickest way to get your own copy running is the Railway template: one project, two services, and a public HTTPS address. This post walks through the deploy, the first login, and the three settings worth checking before you add real content.
You need a Railway account. Raytha itself is free and MIT licensed; Railway bills you for the resources the two services use. The Railway page has a summary of their plans.
1. Deploy the template
Open the Raytha template on Railway and select Deploy Now. You can keep every default variable.

Railway creates a project with:
- a Raytha service from the
raythahq/raythaDocker image, with a public Railway domain, a volume at/dataand a health check on/healthz; - a PostgreSQL 17 service with its own volume and a generated password.
The connection string is wired between them for you, and uploads are stored at /data/user-uploads so they survive redeploys. Raytha applies its database migrations when it starts, so there is no separate migration step.
2. Create the first administrator
When both services show as active, open the public domain of the Raytha service. Until setup is complete, every page redirects to /raytha/setup.
- Fill in your name, email and a password of at least 8 characters.
- Check Website URL. It must be the address visitors use, including
https://. Raytha builds links in emails and absolute media URLs from it. - Select Create administrator. You land on the dashboard at
/raytha.
Setup also creates a posts content type with sample posts, a home page, an About page, a menu and the default theme, so the public site has something on it straight away.
3. Check three settings
- Email. Add
SMTP_HOST,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORDandSMTP_FROM_ADDRESSto the Raytha service's variables. Without them, password resets and sign-in links cannot be sent. See Sending emails. - Custom domain. Add it in the Raytha service's networking settings on Railway, then change the Website URL under Settings, Configuration in the Raytha admin. If Cloudflare proxies the domain, set
TRUSTED_PROXY_HOPS=2. - Backups. Open the Backups tab on both services and turn on a schedule. For a copy outside Railway, run
pg_dumpfrom your own machine.
The Deploy with Railway guide covers each of these in detail, including backups and upgrades.
4. Build something
From here, the Quickstart takes you through your first content type, a published item and a REST API call. If you would rather start from a finished site, every use case on raytha.com comes with a rebuild kit that loads its content model, theme, pages and sample content into a fresh Raytha:
- In the admin, open People, Admins, open your account and select Create API key. Copy the key; Raytha stores only a hash.
- Install the Raytha CLI and point it at your new site:
curl -fsSL https://raytha.com/cli/install.sh | sh export RAYTHA_URL=https://your-app.up.railway.app export RAYTHA_API_KEY=paste-your-key-here raytha doctor - Run a kit from raytha-examples. The scripts need
jq:git clone https://github.com/RaythaHQ/raytha-examples.git cd raytha-examples/help-center-orbitly DRY_RUN=1 bash build.sh # preview only bash build.sh
Use a fresh instance for this, since a kit activates its own theme and replaces the menus.
Moving off Railway later
Nothing here is specific to Railway. The same raythahq/raytha image runs anywhere Docker runs, and your data is a standard PostgreSQL database plus a folder of uploads. Back up on Railway, restore on your own server, and follow Deploy with Docker.
Deploy Raytha on Railway, or read more about what the template sets up.


