Platform CLI Use cases
Learn
Developer docs User guide Quickstart CLI and AI agents Blog
Company
Services About Contact Links Get started

Deploy a .NET CMS on Railway in five minutes

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.

The Raytha CMS template on Railway: a raythahq/raytha service with a volume at /data next to a Postgres service
The template: Raytha from the raythahq/raytha image with a volume at /data, and PostgreSQL with its own volume.

Railway creates a project with:

  • a Raytha service from the raythahq/raytha Docker image, with a public Railway domain, a volume at /data and 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.

  1. Fill in your name, email and a password of at least 8 characters.
  2. Check Website URL. It must be the address visitors use, including https://. Raytha builds links in emails and absolute media URLs from it.
  3. 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_PASSWORD and SMTP_FROM_ADDRESS to 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_dump from 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:

  1. In the admin, open People, Admins, open your account and select Create API key. Copy the key; Raytha stores only a hash.
  2. 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
  3. 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.

Share Post LinkedIn

Try Raytha on your own site

Free, open source and ready to deploy in minutes.