Backend
APIs, background workers, queues, cron jobs and webhooks.
Get started
3 guides, in order- Step 1Deploy RabbitMQ and Wire Up Producers and ConsumersRun RabbitMQ on Railway, expose the management UI, and connect producer and consumer services over private networking with Node.js and amqplib.
- Step 2Run an Embeddings Pipeline with an External API and pgvectorDeploy a batch worker on Railway that generates embeddings through an external API and stores them in Postgres with pgvector. Covers schema design, safe concurrent processing, and the psycopg2 vector adaptation gotcha.
- Step 3Deploy an LLM Gateway with LiteLLMDeploy LiteLLM Proxy on Railway as an LLM gateway for multiple providers. Covers model routing, cost tracking, API key management, caching with Redis, and private networking.
Build and deploy
6 guidesDeploy a Multi-Agent System on RailwayDeploy multiple AI agents as separate Railway services that communicate via Redis and Postgres. Includes working orchestrator and agent code, inter-service communication, and independent scaling.Deploy a Full-Stack Next.js App with Postgres, Background Jobs, and File UploadsDeploy a production Next.js application on Railway with a Postgres database, Redis-backed background workers, and file uploads via storage buckets. Covers multi-service architecture and production hardening.Deploy a SaaS Backend with Postgres, Workers, and WebhooksSet up a production SaaS backend on Railway with an API service, Postgres database, background worker, and cron job for webhook processing.Deploy an AI Agent with Async WorkersRun AI agent workflows on Railway with an API service, async workers via Redis queue, and Postgres for state persistence. Covers CPU-based agent patterns without GPU.Run Scheduled and Recurring Tasks with CronA detailed overview of how cron jobs work and how to run them effectively on Railway. Explains cron syntax, use cases, reliability patterns, resource management, and the execution model behind Railway’s scheduled services.Building a SaaS application on RailwayZero to one, building a SaaS application on Railway
Run in production
4 guidesReceive Webhooks at ScaleBuild a webhook receiver that verifies signatures, responds fast, and queues work for a background worker. Covers idempotency keys, retries, and how to run the pattern on Railway.Lock Down a Production Railway ProjectHarden a production Railway project with Under Attack Mode, private networking, scoped API tokens, sealed variables, and workspace-level access controls.Set Up Alerts for Crashes, Restarts, and Failed DeploysConfigure Railway webhooks and monitors to get notified in Slack, Discord, or your own service when a deployment fails, crashes, or a resource threshold is crossed.Scaling a SaaS application on RailwayTime to launch, scaling your SaaS on Railway
Compare and decide
3 guidesThe Best Backend Hosting for Node.js APIs, Postgres, and WorkersBackend hosting options compared for Node.js.Choose Between Cron Jobs, Background Workers, and QueuesWhen to use cron jobs, always-on workers, and message queues for background processing. Covers tradeoffs, failure modes, and how to run each pattern on Railway.Serverless functions vs containers: CI/CD, database connections, cron jobs, and long-running tasksComparing serverless and container deployments about auto-deploy workflows, secure database connections, scheduled jobs, rollbacks, and resource-intensive tasks. Each section explains both approaches honestly, with guidance on when serverless constraints matter and when containers make more sense.
More guides
6 guidesServe a Multi-Region API with FailoverRun one API service across multiple Railway regions with replicas, nearest-region routing, and automatic replica restarts. Covers routing behavior, health checks, and what failover Railway gives you.Schedule, Retry, and Dead-Letter Jobs with BullMQRun BullMQ on Railway with a Redis service and an always-on worker. Covers repeatable job schedules, retries with exponential backoff, and a dead-letter queue pattern.Implementing Feature Flags from ScratchLearn how to implement feature flags from scratchCron Jobs with Django and GitHub ActionsRun a cron job on Railway with the help of Django and GitHub ActionsQueues on RailwayIn this post, we take a look at a template allowing us to deploy a robust queue system on Railway using BullMQ and Redis.Cron Jobs on RailwayA brief guide on deploying and running cron jobs on Railway using JavaScript.