DEV Community

Peon Sh
Peon Sh

Posted on Originally published at peon.sh

Self-Host n8n: Unlimited Workflow Automation Without Zapier Pricing

Run n8n yourself on a VPS, and get rid of Zapier's per-task billing system and go with unlimited executions instead. Here's how it works, including setup, webhooks, and persistence.

The math behind the billing on Zapier, which brings people here
Zapier bills you per task, and every workflow does tasks like crazy – polling every 5 minutes will cost you roughly 8,600 executions before actually accomplishing something. Every single step is counted in Zapier's automation, and teams are finding themselves in $50 to $200/month plans with very little data moving around.

n8n allows unlimited executions of your workflows in exchange for the price of the VPS it's running on. It's comparable enough to Zapier's 400+ integration catalogue in terms of integrations needed, and beats Zapier easily when you need more technical features: code nodes (JavaScript/Python), loops, error handling, and plain HTTP/webhook nodes for all APIs.

Deployment essentials
Three environments distinguish the installation of a mere toy from a solid one:

Persistent volume for /home/node/.n8n: workflows, credentials and the encryption key live there; lose it and you lose everything

WEBHOOK_URL=https://n8n.example.com: without it, webhook trigger nodes register unreachable localhost URLs, the most common n8n-in-Docker complaint

HTTPS via the platform proxy, always: n8n stores OAuth tokens and API keys for your other services, treat it like a secrets vault

key environment variables

WEBHOOK_URL=https://n8n.example.com
N8N_HOST=n8n.example.com
N8N_PROTOCOL=https
GENERIC_TIMEZONE=Asia/Kolkata
Postgres for production
The out-of-the-box SQLite database will work for evaluation purposes; Postgres should be used (DB_TYPE=postgresdb plus connection variables) when it matters. There will be strong concurrency support for writes, the ability to see execution history, and a database which is part of your regular backup strategy. The smallest Postgres instance that you can manage from Peon will do nicely.

Operational tips from real deployments
Cleanup execution logs: EXECUTIONS_DATA_MAX_AGE=336 (14 days) to prevent database growth without bounds

Make backups of both the volume (encryption key is important!) and the database, because otherwise, credentials are useless

Set up an error workflow for notifications to Slack/Telegram when something breaks, because automation failure silently is costly

Queue mode with Redis and worker containers is made for huge-scale operations; use it only when you need hundreds of parallel executions

1 GB of RAM is sufficient for most tasks; nodes processing large volumes of data require more

What to build first
Some of the better firsts to demonstrate value within an hour or two: notifications enhanced with commit details for Slack, daily database health reports, form responses to your CRM and email, and alerts when uptime alerts occur. These would each be paid Zaps, multi-step processes on your n8n; it is free forever.

Top comments (0)