Deploy N8N
n8n on SQLite in a single service with a volume. Cheapest to run.
Just deployed
/home/node/.n8n
Deploy and Host N8N on Railway
This variant: n8n Lite, a single service on SQLite. The cheapest way to run n8n: one container and one volume, no database service to pay for. n8n is an open-source workflow automation platform with 400+ integrations, AI agent nodes and a visual editor: a self-hosted alternative to Zapier and Make with no per-execution fees.
About Hosting N8N
This template deploys one service, n8n, with a volume at /home/node/.n8n. Workflows, credentials and execution history live in a SQLite database on that volume, next to binary files and any community nodes you install. n8n is pinned to 2.40.7.
The first boot creates the database, which takes under a minute before the healthcheck on /healthz/readiness turns green. Then open the public URL and create the owner account right away: the first visitor to an unclaimed instance becomes its owner.
Common Use Cases
- Personal automations and side projects at the lowest monthly cost
- Trying n8n before committing to a Postgres or queue-mode setup
- Small internal tools: form handlers, notifications, scheduled reports
Dependencies for N8N Hosting
- Nothing to bring. The n8n encryption key is generated at deploy time.
- Optional: API keys for the services your workflows connect to, added later as n8n credentials.
Deployment Dependencies
- n8n: https://github.com/n8n-io/n8n
- Docker image: https://hub.docker.com/r/n8nio/n8n
- Database docs: https://docs.n8n.io/hosting/configuration/supported-databases-settings/
Implementation Details
- Other N8N variants. This creator also publishes n8n with Postgres, n8n in queue mode with workers, workers plus webhook processors, and a version with external task runners for Python Code nodes.
- When to move to Postgres. SQLite is fine for one instance, but n8n does not support queue mode on it. To move later, use n8n's
export:workflowandexport:credentialsCLI commands, then import into a Postgres deploy with the sameN8N_ENCRYPTION_KEY. - Back up
N8N_ENCRYPTION_KEYand the volume. The key encrypts every stored credential. - WAL mode.
DB_SQLITE_POOL_SIZE=2opens SQLite in WAL mode with two read connections, which n8n benchmarks at up to 10 times faster than the rollback journal. - Volume permissions. Railway mounts volumes owned by root, so the start command hands
/home/node/.n8nto thenodeuser and then starts n8n asnode, never as root. - Custom domain. After adding one, set
N8N_EDITOR_BASE_URLandN8N_WEBHOOK_URLtohttps://your-domain. - Upgrading. Change the image tag to a newer
n8nio/n8nversion and redeploy; migrations run on boot.
Why Deploy N8N on Railway?
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 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.
Template Content