Railway
Deploy Reqcore to Railway with managed PostgreSQL, S3-compatible storage, and automatic builds from GitHub.
Railway Deployment
Railway provides managed hosting for Reqcore with automatic builds from GitHub, managed PostgreSQL, and S3-compatible storage buckets.
Architecture on Railway
┌─────────────────────────────────────────────────────┐
│ Cloudflare CDN │
│ • DNS (CNAME → Railway domain) │
│ • DDoS protection, edge caching │
│ • AI bot blocking │
└─────────────────────┬───────────────────────────────┘
│ HTTPS
┌─────────────────────┼───────────────────────────────┐
│ Railway Project │
│ ┌──────────────────▼───────────────────────────┐ │
│ │ Nuxt Service (auto-built from GitHub) │ │
│ │ Build: npm run build │ │
│ │ Start: node .output/server/index.mjs │ │
│ └──────────┬───────────────────┬───────────────┘ │
│ │ │ │
│ ┌──────────▼──────┐ ┌───────▼────────────────┐ │
│ │ PostgreSQL │ │ Storage Bucket │ │
│ │ (Railway DB) │ │ (S3-compatible) │ │
│ └─────────────────┘ └────────────────────────┘ │
└─────────────────────────────────────────────────────┘
Setup Steps
1. Create a Railway Project
- Sign in to Railway
- Click New Project → Deploy from GitHub repo
- Select the
reqcore-inc/reqcorerepository (or your fork)
2. Add PostgreSQL
- In your Railway project, click New → Database → Add PostgreSQL
- Railway automatically provisions the database and sets
DATABASE_URL
3. Add Storage Bucket
- Click New → Add Storage Bucket
- Railway provisions S3-compatible object storage
4. Configure Environment Variables
In the Nuxt service settings, add these variables:
| Variable | Value |
|---|---|
DATABASE_URL | ${{Postgres.DATABASE_URL}} |
S3_ENDPOINT | ${{Bucket.ENDPOINT}} |
S3_ACCESS_KEY | ${{Bucket.ACCESS_KEY_ID}} |
S3_SECRET_KEY | ${{Bucket.SECRET_ACCESS_KEY}} |
S3_BUCKET | ${{Bucket.BUCKET}} |
S3_REGION | ${{Bucket.REGION}} |
S3_FORCE_PATH_STYLE | false |
BETTER_AUTH_SECRET | Generate a 32+ char random string |
BETTER_AUTH_URL | https://your-domain.com |
NUXT_PUBLIC_SITE_URL | https://your-domain.com |
Template variables like
${{Postgres.DATABASE_URL}}auto-resolve to the actual values from linked Railway services.
5. Deploy
Push to your main branch — Railway auto-builds and deploys:
git push origin main
Railway detects the Nuxt app via package.json, runs npm run build, and starts with node .output/server/index.mjs.
Custom Domain with Cloudflare
- In Railway, go to your service Settings → Networking → Custom Domain
- Add your domain (e.g.,
reqcore.com) - In Cloudflare, create a CNAME record pointing to the Railway-provided domain
- Enable Full (strict) SSL mode in Cloudflare
- Update
BETTER_AUTH_URLandNUXT_PUBLIC_SITE_URLto match your domain
Preview Deployments
Railway automatically creates preview deployments for pull requests. For PR environments:
- Set
BETTER_AUTH_URLtohttps://${{RAILWAY_PUBLIC_DOMAIN}}in your preview environment variables - Preview deployments get their own isolated database and storage
Monitoring
- Railway provides built-in logs, metrics, and deployment history
- Use
railway logsCLI command for real-time log streaming - Database metrics are available in the PostgreSQL service panel
Next Steps
- Environment Variables — Full reference of all configuration options
- Architecture Overview — Understand the system design