---
title: "Deploy GritCMS"
description: "GritCMS — The Open-Source Creator Operating System"
category: "Other"
url: https://railway.com/deploy/gritcms
---

# Deploy GritCMS

GritCMS — The Open-Source Creator Operating System

**[Deploy GritCMS on Railway](https://railway.com/template/gritcms)**

- **Creator:** Byte Labs
- **Category:** Other
- **Total deploys:** 15

## Template content

### GritCMS Web https://gritframework.dev/grit_logo.png

- **Source:** MUKE-coder/gritcms
- **Public domain:** Yes

### GritCMS Admin https://gritframework.dev/grit_logo.png

- **Source:** MUKE-coder/gritcms
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### GritCMS Files https://gritframework.dev/grit_logo.png

- **Source:** timomeh/s3-public-presigner

### GritCMS API https://gritframework.dev/grit_logo.png

- **Source:** MUKE-coder/gritcms
- **Health check:** /api/health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Buckets

- **Bucket**

## Documentation

# Deploy and Host GritCMS on Railway

GritCMS is a free, open-source Creator Operating System built for course creators, coaches, and digital product sellers. It combines the tools you'd normally pay $700–1,500/month for courses, email, pages, funnels, and digital products into a single self-hosted platform.

## About Hosting GritCMS

GritCMS is a monorepo consisting of three services: a high-performance Go API backend, a Next.js admin dashboard, and a Next.js public-facing website. It requires PostgreSQL for data storage and Redis for caching. Media uploads are handled via Railway's built-in S3-compatible Storage Buckets, with public file serving provided by the S3 Public Presigner service. Outbound email is handled via Resend. All five services run together in a single Railway project with automatic private networking between them.

## Common Use Cases

- [Sell and deliver online courses with a built-in course platform]
- [Send transactional and marketing emails without a third-party ESP]
- [Build and publish landing pages, blog posts, and sales funnels]
- [Sell digital products and manage orders with Stripe payments]
- [Replace expensive SaaS tools like Kajabi with a self-hosted alternative]

## Dependencies for GritCMS Hosting

- [PostgreSQL — primary database, provisioned automatically via Railway]
- [Redis — cache and background job queue, provisioned automatically via Railway]
- [Railway Storage Bucket — S3-compatible object storage for media uploads]
- [S3 Public Presigner — serves private bucket files via public URLs]
- [Resend — transactional email provider (free tier: 3,000 emails/month)]
- [Stripe — payment processing for products and subscriptions (optional)]

### Deployment Dependencies

- [GritCMS GitHub Repository]
- [GritCMS Documentation]
- [Resend]
- [Stripe]
- [S3 Public Presigner]

### Implementation Details
 
**Monorepo Build Configuration**
 
GritCMS is a shared pnpm monorepo. All three services (API, Admin, Web) must build from the repo root — not a subdirectory — so Docker can access `packages/shared` and `pnpm-workspace.yaml`. Set the Root Directory to blank for all services and use `RAILWAY_DOCKERFILE_PATH` to point each service to its correct Dockerfile:
 
- API: `RAILWAY_DOCKERFILE_PATH=apps/api/Dockerfile`
- Admin: `RAILWAY_DOCKERFILE_PATH=apps/admin/Dockerfile`
- Web: `RAILWAY_DOCKERFILE_PATH=apps/web/Dockerfile`
**NEXT_PUBLIC_API_URL**
 
This variable must include the `https://` protocol prefix and be set before the Next.js build runs — it is baked in at build time, not runtime. A redeploy (not just a restart) is required after changing it:
 
```
NEXT_PUBLIC_API_URL=https://your-api-domain.up.railway.app
```
 
**CORS Configuration**
 
`CORS_ORIGINS` cannot be pre-populated in the template as the Web and Admin domains are not known until after first deploy. After deploying, set it in the API service with no trailing slashes and no spaces:
 
```
CORS_ORIGINS=https://your-admin-domain.up.railway.app,https://your-web-domain.up.railway.app
```
 
**Storage**
 
Railway Storage Buckets are used in place of Cloudflare R2. The S3 Public Presigner service makes private bucket files publicly accessible. The API uploads directly to the bucket using `Bucket.*` credentials, but `R2_ENDPOINT` points to the presigner service public domain so all media URLs are served publicly through it.
 
**Homepage**
 
Set a page's slug to `home` in the admin panel to make it the site homepage.
 
**First User**
 
The first user to register automatically becomes the platform owner. There is no default login or setup wizard — navigate directly to `/sign-up` on the admin domain to create the initial account.
 
**Password Reset**
 
Password reset email sending is not yet implemented in the current version of GritCMS (marked as Phase 4 in the codebase). The API accepts the request and returns a 200 response but no email is sent. Passwords can be reset directly via the Railway PostgreSQL database viewer as a workaround.

## Why Deploy GritCMS on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying GritCMS on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/gritcms
