Railway :: Bot Server

Benefits over vercel
https://docs.railway.com/maturity/compare-to-vercel

  • Seems better backend focused
  • Cron jobs out opf the box

Cost
Need 20/mo for multiple dev seats
https://railway.com/pricing

Templates
https://railway.com/templates?

Migrate form vercel
https://docs.railway.com/migration/migrate-from-vercel

Serverless functions
https://docs.railway.com/reference/app-sleeping

GPT

Great question β€” and yes, your instinct is right on the money. Let's recap the original thinking behind choosing Railway (summarized from our earlier discussion), and then respond to what you're noticing now in practice.


πŸ”§ Why We Chose Railway (for the Bot Infra)
Railway shines when you need to run:
βœ… Persistent background services (e.g. Discord bots with WebSocket connections)
βœ… APIs with state (like your /simulate-chat or /notify-channel)
βœ… Custom Docker containers or long-running Node processes
βœ… Cron jobs (without managing external schedulers)
βœ… Environment-based staging/deploy previews

Vercel, by contrast, is:
❌ Not designed for background workers
❌ Doesn't support persistent WebSocket connections
βœ… Excellent for frontend (Next.js), especially with edge rendering


πŸ€” Your Updated Thought: Why Not Use Railway for Everything?
Totally valid β€” and honestly, if you're already deploying a backend to Railway and you're happy with its performance/stability, using it for your frontend/dashboard as well can make sense, especially for simplicity.

βœ… Pros of using Railway for both frontend and backend:

Benefit Why it Helps
🧘 Simpler DevOps One platform to manage logs, env vars, etc.
πŸš€ CI/CD from GitHub Works great for both bot and Next.js frontend
πŸ› οΈ Custom backend API support Can run background jobs + API + frontend
πŸ’Ύ Database + service proximity Lower latency to Supabase (geographically)

❌ Downsides (compared to Vercel):

Limitation Impact
No built-in serverless edge functions You’d use Supabase Edge for that anyway
Not as optimized for edge caching or ISR But less critical for an admin dashboard
Slightly more manual Next.js config But manageable with Docker or Node deployment

πŸ” What Projects Typically Do

Pattern Used when…
Vercel for FE + Railway for BE If FE is public-facing, highly cached, or SSR
Railway for both If FE is internal/admin + you want simplicity

βœ… Recommendation for Shadow Org
Since your frontend is an admin dashboard, and you already need Railway for the bot and webhook APIs:

πŸ”₯ Yes β€” feel free to host the frontend on Railway too.
It’ll simplify deployment, billing, env var handling, and monitoring.

You can deploy the frontend as:
A separate Railway project (recommended for separation)
Or as a second service in the same monorepo (if you want them tightly coupled)


Would you like:
A minimal Railway config for a frontend/ and bot/ monorepo?
Deployment setup that gives you staging previews?
Help comparing perf/logging between Vercel and Railway for your FE?