Railway

Deploy Citia

Citia icon webapplication

Deploy Citia

Just deployed

Just deployed

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

Just deployed

/data

citia-media

Bucket

Just deployed

Deploy and Host Citia on Railway

Citia is an appointment scheduling platform for service businesses. It lets customers discover establishments, book services, and receive reminders, while giving business owners a full management dashboard with staff, services, and analytics.

About Hosting Citia

Citia consists of a Next.js 16 web application (citia-web) backed by a PostgreSQL database managed through Prisma (citia-db). It uses Redis for caching and rate-limiting, S3-compatible object storage for photos and file uploads, and Google OAuth for authentication. Deploying on Railway means provisioning the web service alongside a Postgres database and a Redis instance, wiring them together through environment variables, and running database migrations on startup automatically.

Common Use Cases

  • Self-hosting Citia for a business that wants full control over its data and infrastructure
  • Staging / preview environments for development teams contributing to the Citia platform
  • White-label deployments of the scheduling platform for a specific region or vertical

Dependencies for Citia Hosting

  • PostgreSQL 16 — primary relational database (all business data, migrations via Prisma)
  • Redis — caching for geocoding/autocomplete responses, rate-limiting, and collaborator invite tokens
  • S3-compatible object storage (e.g. AWS S3, Cloudflare R2) — establishment photos and user-uploaded assets
  • Google OAuth app — authentication (Client ID + Secret required for both server and browser)

Deployment Dependencies

Implementation Details

railway.json for citia-web

{
  "$schema": "https://railway.com/railway.schema.json",
  "build": {
    "installCommand": "npm install --no-package-lock --legacy-peer-deps --include=optional"
  }
}

The postinstall script in package.json runs prisma generate automatically after install, so no extra build command is needed.

railway.json for citia-db (migration runner service)

{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "NIXPACKS",
    "buildCommand": "npx prisma generate && npm run build"
  },
  "deploy": {
    "startCommand": "npx prisma migrate deploy"
  }
}

Required environment variables

VariableDescription
DATABASE_URLPostgreSQL connection string — injected automatically by the Railway Postgres plugin
REDIS_URLRedis connection string — injected automatically by the Railway Redis plugin
AUTH_SECRETSecret for signing JWTs (minimum 32 characters)
GOOGLE_CLIENT_IDGoogle OAuth client ID (server-side)
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
NEXT_PUBLIC_GOOGLE_CLIENT_IDGoogle OAuth client ID (exposed to the browser)
AWS_ACCESS_KEY_IDS3-compatible storage access key
AWS_SECRET_ACCESS_KEYS3-compatible storage secret
AWS_REGIONStorage bucket region (e.g. us-east-1)
AWS_S3_BUCKETBucket name for file uploads
SENTRY_DSN(Optional) Sentry DSN for error monitoring

Why Deploy Citia 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 Citia 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.


Template Content

citia-media

Bucket

More templates in this category

View Template
Rocky Linux
[Jun'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta