Deploy Raytha on Railway
The Raytha template on Railway sets up the CMS, a PostgreSQL database and a volume for your uploads in one project. Click deploy, open your new site and create the first administrator.
Two services, wired together
The template creates a Raytha service from the official Docker image and a PostgreSQL service next to it. Railway generates the database password and hands the connection string to Raytha, so there is nothing to copy and paste.
- Raytha from the raythahq/raytha Docker image, with a public Railway domain and HTTPS
- PostgreSQL 17 (Railway's postgres-ssl image) with its own volume
- A volume at /data on the Raytha service; uploads go to /data/user-uploads
- Database migrations applied automatically on every start
- A health check on /healthz
- Optional SMTP variables for password resets and sign-in emails
ConnectionStrings__DefaultConnection=<from the Postgres service>
APPLY_PENDING_MIGRATIONS=true
FILE_STORAGE_PROVIDER=Local
FILE_STORAGE_LOCAL_DIRECTORY=/data/user-uploads
FILE_STORAGE_MAX_FILE_SIZE=100000000
FILE_STORAGE_ALLOWED_MIMETYPES=text/*,image/*,video/*,audio/*,application/pdf
# optional
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_ADDRESS=
SMTP_FROM_NAME=
From click to a working site
You need a Railway account. Everything else comes with the template.
railway.com/deploy/raytha-cms
-> Deploy
-> raythahq/raytha ... Active
-> Postgres ... Active
https://<your-service>.up.railway.app/raytha/setup
GET /raytha/api/v1/ContentItems/posts
X-API-KEY: your-api-key
curl -fsSL https://raytha.com/cli/install.sh | sh
export RAYTHA_URL=https://<your-service>.up.railway.app
export RAYTHA_API_KEY=...
raytha doctor
git clone https://github.com/RaythaHQ/raytha-examples.git
cd raytha-examples/intranet-meridian-hub
bash build.sh
What it costs
Raytha is free and MIT licensed. You pay Railway for the resources the two services use, at Railway's usage rates. A summary of Railway's published pricing, as of October 2026:
| Railway plan | Price | Notes |
|---|---|---|
| Trial | $0 | A one-time $5 credit, usable for up to 30 days |
| Free | $0 / month | $1 of credit a month; 0.5 GB RAM per service and 0.5 GB volumes |
| Hobby | $5 / month | Includes $5 of resource usage a month; 5 GB volumes |
| Pro | $20 / month | Includes $20 of resource usage a month |
Usage above the included amount is billed per minute: RAM at $10 per GB per month, CPU at $20 per vCPU per month, volume storage at $0.15 per GB per month and egress at $0.05 per GB. Your bill depends on how much memory and CPU Raytha and PostgreSQL actually use, so watch the project's usage page for the first few days. Check railway.com/pricing and Railway's plan docs for the current numbers.
Railway deletes volumes created on a Trial account 30 days after the trial credit expires, so upgrade to a paid plan before then if you want to keep the site.
Real sites you can rebuild on your deploy
Each use case comes with a rebuild kit: one script that loads the content model, theme, pages and sample content into a fresh Raytha.
Company intranet
Directory, news, policies with acknowledgements and members-only pages behind Raytha login.
Meridian HubCity government
Services by task, meetings with agendas and minutes, public notices and an iCal feed.
City of Juniper FallsHelp center
A knowledge base with search as you type, a changelog with RSS and a status page.
Orbitly help centerDomains, backups and upgrades
- 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. See Running behind a proxy. - Backups. Both services keep their data on Railway volumes, and Railway can back up volumes on a daily, weekly or monthly schedule. Keep your own
pg_dumpas well. See Backups and upgrades on Railway. - Upgrades. The template tracks the
raythahq/raythaimage'slatesttag with automatic updates off, so nothing changes until you redeploy. Pin a version tag such asraythahq/raytha:2.0.1if you want to choose exactly when to move.
Raytha on Railway
Do I need a Railway account?
Yes. The template deploys into your own Railway account and project, and Railway bills you for what the services use. Raytha itself is free.
Can I move off Railway later?
Yes. Raytha is a standard Docker image and a PostgreSQL database. Take a pg_dump of the database, copy the uploads from the volume, and run the same Raytha version anywhere with Docker. See Backups and restores.
Which version of Raytha does the template run?
The template uses the raythahq/raytha image without a tag, which means latest, with Railway's automatic image updates turned off. A redeploy pulls whatever latest is at that moment. To stay on one version, set the service's image to a version tag such as raythahq/raytha:2.0.1.
Where are uploaded files stored?
On the Raytha service's volume, at /data/user-uploads, so they survive redeploys. You can switch to S3-compatible storage or Azure Blob with the variables in File storage.
Do I have to know .NET?
No. You work in the admin, in Liquid templates, and with the REST API or the CLI. .NET matters only if you want to change Raytha's own code.
Will email work?
Only after you add SMTP settings, either as the SMTP_* variables on the Raytha service or in the admin. Without them, password resets and sign-in emails cannot be sent. See Sending emails.
Is there a hosted Raytha service instead?
No. Raytha is self-hosted. Railway is the quickest way to run it; Docker and source builds work anywhere. For hands-on help, see services and support.
Next steps
Quickstart
Deploy, then your first content type, template and API call.
Open the quickstartRailway guide
Settings to check after the deploy, backups and upgrades.
Deploy with RailwayUse cases
Complete sites built on Raytha, each with a rebuild kit.
Browse use casesComparisons
How Raytha compares with Umbraco, Strapi, WordPress and others.
Read comparisonsRun Raytha on Railway
Raytha and PostgreSQL in one project. Open source, and yours to move whenever you want.