railway-setup-n8n
Workspace
OTF
Created
2026-03-26
Updated
2026-03-26
Content
# Railway Setup: n8n
## Overview
- **Project:** otf-n8n (`d3f77fd6-fdda-4e51-9b40-7a6f50a99145`)
- **Template:** https://railway.com/deploy/n8n-with-workers
- **Domain:** auto.optimified.com
- **Port:** 5678
- **Version:** 2.13.3
- **Services:** Primary (`3585df0e`), Worker (`42c2a555`), Redis (`5980dade`), Postgres (`8ba359d5`)
## Key Env Vars
| Var | Value |
|---|---|
| `N8N_EDITOR_BASE_URL` | `https://auto.optimified.com` |
| `WEBHOOK_URL` | `https://auto.optimified.com` |
| `EXECUTIONS_MODE` | `queue` |
| `OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS` | `true` |
| `DB_TYPE` | `postgresdb` |
| `DB_POSTGRESDB_HOST` | `postgres.railway.internal` |
| `QUEUE_BULL_REDIS_HOST` | `redis.railway.internal` |
| `N8N_TRUST_PROXY` | `true` |
## Custom Domain
CNAME: `auto` → `primary-production-6878a.up.railway.app` (Cloudflare proxied)
**Important:** Two URL vars must both be updated when changing domain:
- `N8N_EDITOR_BASE_URL` — the editor UI URL
- `WEBHOOK_URL` — the webhook trigger URL
## Access Model
n8n community edition doesn't support workflow sharing between users. All team members use a **shared login** via Vaultwarden:
- **Email:** shared@optimified.com (alias to mike@optimified.com)
- **Credentials stored in:** Vaultwarden → Optimified org → appropriate collection
This is the standard pattern for all Optimified tools that need a shared login.
## SMTP
Configured for sending invite emails and workflow notifications:
| Var | Value |
|---|---|
| `N8N_EMAIL_MODE` | `smtp` |
| `N8N_SMTP_HOST` | `smtp.resend.com` |
| `N8N_SMTP_PORT` | `587` |
| `N8N_SMTP_USER` | `resend` |
| `N8N_SMTP_SENDER` | `noreply@alert.optimified.com` |
| `N8N_SMTP_SSL` | `false` |
## Worker Mode
This template uses the `n8n-with-workers` variant:
- **Primary:** Serves the editor UI and API
- **Worker:** Processes workflow executions via Redis queue
- **Benefit:** Long-running automations don't block the editor. Better for production workloads.
- `OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true` means even manually-triggered runs go to the worker.
## Post-Deploy Steps
1. Wait for migrations to complete (check logs for `Editor is now accessible via:`)
2. Access the editor and create admin account
3. Set `N8N_EDITOR_BASE_URL` and `WEBHOOK_URL` to custom domain
4. Add custom domain in Railway + Cloudflare CNAME
## Issues Encountered
- None. Clean deploy.