Deploy n8n Webhook API
glue APIs with a webhook backend
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
Just deployed
/home/node/.n8n
n8n-worker
Just deployed
Deploy and Host self hosted n8n Webhook API (Open-Source Webhook Backend) on Railway
For a smaller instance without workers, use the cheapest n8n without queue mode.
Webhooks look simple until a partner sends a bad signature or a third-party API rate-limits during a traffic spike. This stack runs n8n in queue mode on Railway: an editor accepts inbound webhooks, Redis queues executions, and workers handle the heavy lifting. You get a resilient webhook backend without per-task SaaS pricing.
Self-host n8n Webhook API on Railway in queue mode with an n8n editor, dedicated worker, PostgreSQL, and Redis Bull so webhooks and long workflows stay off the UI-flat infrastructure cost instead of per-task SaaS billing.
Self-host n8n Webhook API on Railway in queue mode with an n8n editor, dedicated worker, PostgreSQL, and Redis Bull so webhooks and long workflows stay off the UI-flat infrastructure cost instead of per-task SaaS billing.
About Hosting n8n Webhook API open-source software on Railway (self hosted n8n template)
Queue mode splits n8n into two services from the same n8nio/n8n:2.36.8 image: an editor on port 5678 that serves the UI and accepts webhooks, and workers that pull jobs off a Redis Bull queue. That separation keeps slow API calls inside workflows from blocking the next inbound webhook. A crashed worker doesn't take down the editor.
The tradeoff: you now run Redis and PostgreSQL instead of SQLite. SQLite can't handle queue mode's concurrent writes, so DB_TYPE=postgresdb is mandatory. Set EXECUTIONS_MODE=queue on both editor and worker. And never lose N8N_ENCRYPTION_KEY-it encrypts all stored credentials. Rotate it and old API keys become unreadable.
Why Deploy n8n Webhook API, the Hookdeck alternative on Railway (Railway Free Trial)
Hookdeck is excellent at receiving, retrying, and replaying webhooks, but it only routes them. n8n runs the glue logic: verify a Stripe signature, update a CRM, ping Slack, write to Postgres-all in one workflow. Self-hosting n8n keeps payloads on your infrastructure, which matters for compliance and for teams tired of per-event fees. Hookdeck's paid plans scale by volume; n8n Community Edition costs only your Railway bill.
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 n8n Webhook API 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.
Railway vs Other Hosting Providers and VPS for n8n Webhook API self hosting
On a raw VPS you manage Docker Compose, Postgres, Redis, and systemd yourself. Railway maps the queue-mode topology to separate services with logs, health checks, and a $5 free trial on GitHub signup. Hetzner is cheaper on compute, but Railway wins on operational simplicity.
| Provider | Setup effort | Scaling model | Monthly cost | Webhook burst handling |
|---|---|---|---|---|
| DigitalOcean | Medium - Droplet + Docker | Manual, vertical | $12-$48+ | Single instance unless you build queue |
| AWS | High - ECS, RDS, ElastiCache, IAM | Auto but complex | $30-$100+ | Elastic, but config overhead is real |
| Hetzner | High - full VPS admin | Manual, vertical | $8-$30 | You own queue, proxy, and pager |
Common Use Cases for hosted n8n Webhook API
A payment processor sends payment.succeeded to your Railway URL. n8n verifies the signature, calls your internal API to mark the order paid, and retries with backoff if that API is down. No dropped events.
Queue mode shines when one webhook fans out: an order event triggers inventory checks, a fraud API call, and an email. Without a queue, the editor blocks on each. With workers, the webhook is acknowledged fast and heavy work happens off to the side. Third-party 429s get retried with delays; EXECUTIONS_DATA_PRUNE=true keeps execution history from bloating Postgres.
Dependencies for n8n Webhook API Docker hosted on Railway
Queue mode needs four services: editor, worker, Redis for Bull, and PostgreSQL for execution data and credentials. Each is a separate Railway service.
Deployment Dependencies for Managed n8n Webhook API Service (Webhook Automation)
Editor runs n8nio/n8n:2.36.8 default command, port 5678, env: EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, Postgres and Redis connection strings, N8N_ENCRYPTION_KEY, WEBHOOK_URL. Worker runs same image with command n8n worker, identical env vars. Redis holds queue jobs; use a persistent volume. Postgres stores workflows and credentials. Volume /home/node/.n8n persists local files.
Implementation Details for n8n Webhook API (Using n8n official docker image)
Set N8N_PROXY_HOPS=1 so n8n trusts Railway's forwarded headers. WEBHOOK_URL must match the public HTTPS URL, or signature checks that include the full URL will fail. EXECUTIONS_DATA_PRUNE=true keeps Postgres from growing unbounded. The official image runs as non-root and expects /home/node/.n8n.
How does n8n Webhook API compare against other Webhook and API glue platforms
The space splits into routers (Hookdeck) and automation engines (Pipedream, Zapier, Make). n8n is the latter, with a visual editor and no per-execution fee when self-hosted.
n8n Webhook API vs Hookdeck (Hookdeck Alternative)
Hookdeck wins on delivery observability and retry clarity. n8n wins when the webhook must trigger multi-step logic-enrich, call APIs, update DB, notify. You'd need Hookdeck plus another tool to match n8n. Self-hosted n8n flattens cost to your Railway bill.
n8n Webhook API vs Pipedream (Pipedream Alternative)
Pipedream is closest: visual workflows, code steps, HTTP triggers. Pipedream's hosted model removes infra work and has generous low-volume pricing, but runs code on their servers. n8n self-host keeps payloads in your network and has a mature self-host story. Pipedream wins on time-to-first-workflow.
n8n Webhook API vs Zapier Webhooks (Zapier Webhooks Alternative)
Zapier's webhook trigger is fine for low volume, but per-task pricing punishes multi-step workflows: a 5-step Zap counts as 5 tasks per webhook. Zapier limits retry control and signature verification. n8n self-host has no per-execution fee and arbitrary signature code. Zapier wins on prebuilt app breadth.
n8n Webhook API vs Make webhooks (Make webhooks Alternative)
Make's editor is polished, but operations-based pricing punishes many-module workflows. Make's self-host is enterprise-only and expensive. n8n Community Edition gives the full engine free on Railway. Make wins on managed hosting simplicity; n8n wins on cost at volume.
How to use n8n Webhook API (the OSS Webhook Automation)?
Create a workflow with a Webhook Trigger node, choose method and path. n8n generates a URL like https://your-app.up.railway.app/webhook/abc123. Add a Code node to verify signatures with Node's crypto-compute HMAC, compare to header, throw on mismatch. Chain HTTP Request nodes with retry settings. Use "Listen for test event" to debug with real payloads.
How to self host n8n Webhook API on other VPS Services (n8n Webhook API self hosting guide)
Any VPS with Docker works. Minimum 2 GB RAM.
Clone the Repository
You don't need the source repo; use the official Docker image. Create a docker-compose.yml with four services: n8n-editor, n8n-worker, redis, postgres.
Install Dependencies
Install Docker and Compose. Pull n8nio/n8n:2.36.8, redis:7, postgres:16. No Node.js on host.
Configure Environment Variables
Create .env with N8N_ENCRYPTION_KEY, Postgres credentials. Pass EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, WEBHOOK_URL, N8N_PROXY_HOPS=1, connection strings to editor and worker. Worker command: n8n worker.
Start the n8n Webhook API Application
Run docker compose up -d. Check logs. Open editor, create owner account, build a Webhook Trigger. Reverse proxy to port 5678, set WEBHOOK_URL to public HTTPS, test with curl.
Official Pricing of n8n Webhook API (n8n Webhook API pricing)
n8n Community Edition is free under fair-code. Self-host pays only your compute: Railway typically $10-$25/month for editor, worker, Redis, Postgres. n8n Cloud Starter is about $24/month for 2,500 executions. Enterprise features like SSO cost extra.
n8n Webhook API cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud removes infra work, but self-host flips economics at volume and keeps payloads in your network.
Monthly cost of self hosting n8n Webhook API on Railway
Realistic: $10-$25/month. Editor and worker each ~512 MB RAM, 0.5 vCPU. Redis and Postgres add a few dollars. Compare to n8n Cloud at $24/month for 2,500 executions-self-host wins above a few thousand executions or if you need queue mode.
System Requirements for Hosting n8n Webhook API on a VPS
Minimum: 2 GB RAM, 2 vCPUs, 20 GB SSD. For bursty workloads: 4 GB RAM, 3-4 vCPUs, multiple workers. Redis 256 MB is plenty; Postgres likes fast disk.
Frequently Asked Questions (FAQs)
Why does n8n return 429 errors on inbound webhooks?
Usually a downstream API inside your workflow rate-limits. Add retry logic to HTTP Request nodes with backoff, or route the call through a worker so it retries asynchronously.
What happens when a webhook signature doesn't match?
Return 401 immediately, log, don't retry. Check the provider signs the exact raw body and your WEBHOOK_URL matches what they see.
Can I run queue mode with SQLite?
No. Queue mode requires DB_TYPE=postgresdb. SQLite can't handle concurrent writes from workers.
How do I scale workers on Railway for a webhook spike?
Scale the worker service horizontally in Railway's dashboard.
What's the difference between this queue-mode template and the regular
Template Content
Redis
redis:8.2n8n-worker
n8nio/n8n:2.36.8