Deploy Citia
Citia icon webapplication
citia-db
Just deployed
citia-whatsapp-bot
Just deployed
citia-db-postgres
Just deployed
/var/lib/postgresql/data
citia-reminder
Just deployed
citia-web
Just deployed
Redis
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
- Railway Postgres plugin — provision a managed Postgres instance and inject
DATABASE_URLautomatically - Railway Redis plugin — provision Redis and inject
REDIS_URL - Prisma Migrate — migrations run automatically at deploy time via
npx prisma migrate deploy - Next.js deployment docs
- Sentry for Next.js — optional error monitoring (set
SENTRY_DSN)
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
| 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.
Template Content
citia-db
agendaliaorg/agendalia-dbSEED_MODE
Seed mode
DATABASE_URL
database url
citia-whatsapp-bot
agendaliaorg/agendalia-whatsapp-botPORT
port
NODE_ENV
node env
DATABASE_URL
database url
GITHUB_TOKEN
github token
MAX_RETRY_ATTEMPTS
max retry attempts
WHATSAPP_APP_SECRET
whatsapp app secret
WHATSAPP_API_VERSION
whatsapp api version
WHATSAPP_ACCESS_TOKEN
Whatsapp access token
WHATSAPP_VERIFY_TOKEN
Whatsapp verify token
SESSION_TIMEOUT_MINUTES
Session timeout minutes
WHATSAPP_VERIFY_SIGNATURE
Whatsapp verify signature
WHATSAPP_BUSINESS_ACCOUNT_ID
Whatsapp business account id
citia-db-postgres
ghcr.io/railwayapp-templates/postgres-ssl:18PGDATA
pgdata
PGPORT
pgport
POSTGRES_DB
postgres db
POSTGRES_USER
postgres user
SSL_CERT_DAYS
ssl cert days
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
railway deployment draining seconds
citia-reminder
agendaliaorg/agendalia-reminderPORT
Port
DATABASE_URL
Database URL
GITHUB_TOKEN
github token
CITIA_WEB_URL
citia web url
RESEND_API_KEY
resend api key
RUN_ON_STARTUP
run on startup
RESEND_FROM_EMAIL
resend from email
WHATSAPP_API_VERSION
Whatsapp api version
WHATSAPP_ACCESS_TOKEN
Whatsapp access token
REMINDER_ADVANCE_HOURS
reminder advance horus
CONFIRMATION_WINDOW_HOURS
confirmation window hours
REMINDER_EMAIL_ACTION_PATH
Reminder email action path
REMINDER_EMAIL_ACTION_SECRET
Reminder email action secret
citia-web
citiaorg/citia-webSENTRY_DSN
sentry dsn
SENTRY_ORG
sentry org
AUTH_SECRET
auth secret
DATABASE_URL
database url
GITHUB_TOKEN
github token
RESEND_API_KEY
resend api key
SENTRY_PROJECT
sentry project
GOOGLE_CLIENT_ID
google client id
RESEND_FROM_EMAIL
resend from email
SENTRY_AUTH_TOKEN
sentry atuh token
STRIPE_SECRET_KEY
stripe secret key
NEXT_PUBLIC_APP_URL
next public app url
GOOGLE_CLIENT_SECRET
google client secret
RAILPACK_INSTALL_CMD
reaipack install cmd
GOOGLE_PLACES_API_KEY
google places api key
STRIPE_WEBHOOK_SECRET
stripe webhook secret
NEXT_PUBLIC_SENTRY_DSN
Next Public sentry dsn
MERCADOPAGO_ACCESS_TOKEN
Mercadopago access token
MERCADOPAGO_WEBHOOK_SECRET
Mercadopago webhook secret
NEXT_PUBLIC_ALLOW_INDEXING
next public allow indexing
NEXT_PUBLIC_GOOGLE_CLIENT_ID
Next public google client id
REMINDER_EMAIL_ACTION_SECRET
Reminder email action secret
NEXT_PUBLIC_MERCADOPAGO_PUBLIC_KEY
next public mercadopago public key
Redis
redis:8.2.1REDISPORT
redis port
REDISUSER
redis user
citia-media
Bucket
