How to Self-Host n8n on Railway in Minutes

Starting at $5/month - no coding knowledge required!

If you've been meaning to self-host n8n but felt overwhelmed by DevOps or infrastructure setup, here's your step-by-step guide to getting it live on Railway — in minutes.

Step 1: Create Your Railway Account

Head over to Railway.app and sign up. Choose the right plan based on your needs:

  • Use the Hobby plan for personal or test workflows.

  • Upgrade to the Pro plan if you're running heavier workflows or using it in production.

Step 2: Start a New Project

Once you're logged in:

  • Click the New button > Deploy a Template 

Step 3: Add the n8n Template

  • Search for n8n.

  • Select n8n with workers from the list. This deploys a scalable setup including:

    • A primary n8n instance for the visual UI

    • A worker instance to run tasks in the background

    • PostgreSQL to store workflow and credential data

    • Redis (optional) for improved caching and speed

Step 4: Confirm It’s Working

Once deployed:

  • Click into the Primary service > Go to Settings

  • Visit the auto-generated Railway URL to make sure the n8n UI is live and accessible.

Step 5: Connect a Custom Domain (Optional)

Want to access n8n via your own domain?

Here’s how to set that up:

  • Buy a domain name if you don't already have one.

  • Set up DNS management through Cloudflare or your registrar.

  • In Railway, go to your Primary service > Settings > Custom Domains.

  • Add your desired domain (e.g., automation.yourdomain.com).

  • Railway will provide a CNAME record — copy it into your DNS settings.

  • Important: Make sure it's not proxied through Cloudflare so Railway can handle the SSL.

Wait a few minutes for the domain to verify, and you’ll be able to access your self-hosted n8n through your own URL.

Things to note

Railway is a solid option for hobbyists, freelancers, and even client projects that don’t need enterprise infrastructure.

If you're running a large-scale automation system with high concurrency, you may eventually outgrow it — but for most users, it’s more than enough.

Need Help?

If any point you get stuck, feel free to reply to this email or message me on Instagram.

Until next time,
The Agentic Marketer