---
title: "Deploy Citia"
description: "Citia icon webapplication"
category: "Other"
url: https://railway.com/deploy/citia
---

# Deploy Citia

Citia icon webapplication

**[Deploy Citia on Railway](https://railway.com/template/citia)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/citia/manifest.json

- **Creator:** omarenri29's Projects
- **Category:** Other

## Template content

### citia-db

- **Source:** https://github.com/agendaliaorg/agendalia-db

### citia-whatsapp-bot

- **Source:** https://github.com/agendaliaorg/agendalia-whatsapp-bot
- **Health check:** /health
- **Public domain:** Yes

### citia-db-postgres https://devicons.railway.app/i/postgresql.svg

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

### citia-reminder

- **Source:** https://github.com/agendaliaorg/agendalia-reminder
- **Health check:** /h
- **Public domain:** Yes

### citia-web

- **Source:** https://github.com/citiaorg/citia-web
- **Health check:** /health
- **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"`

## Buckets

- **citia-media**

## Documentation

# 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

- [Railway Postgres plugin](https://docs.railway.com/databases/postgresql) — provision a managed Postgres instance and inject `DATABASE_URL` automatically
- [Railway Redis plugin](https://docs.railway.com/databases/redis) — provision Redis and inject `REDIS_URL`
- [Prisma Migrate](https://www.prisma.io/docs/concepts/components/prisma-migrate) — migrations run automatically at deploy time via `npx prisma migrate deploy`
- [Next.js deployment docs](https://nextjs.org/docs/deployment)
- [Sentry for Next.js](https://docs.sentry.io/platforms/javascript/guides/nextjs/) — optional error monitoring (set `SENTRY_DSN`)

### Implementation Details

**`railway.json` for `citia-web`**

```json
{
  "$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)**

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

**Required environment variables**

| Variable | Description |
|---|---|
| `DATABASE_URL` | PostgreSQL connection string — injected automatically by the Railway Postgres plugin |
| `REDIS_URL` | Redis connection string — injected automatically by the Railway Redis plugin |
| `AUTH_SECRET` | Secret for signing JWTs (minimum 32 characters) |
| `GOOGLE_CLIENT_ID` | Google OAuth client ID (server-side) |
| `GOOGLE_CLIENT_SECRET` | Google OAuth client secret |
| `NEXT_PUBLIC_GOOGLE_CLIENT_ID` | Google OAuth client ID (exposed to the browser) |
| `AWS_ACCESS_KEY_ID` | S3-compatible storage access key |
| `AWS_SECRET_ACCESS_KEY` | S3-compatible storage secret |
| `AWS_REGION` | Storage bucket region (e.g. `us-east-1`) |
| `AWS_S3_BUCKET` | Bucket 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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — 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/citia
