2/19/2024
n8n self-hosted — automations that replace Zapier for free
TL;DR: n8n is open-source Zapier. Docker Compose, port 5678, 400+ integrations. Fair-code license — self-hosted with no execution limits. If you already have a server (VPS, NAS, Raspberry Pi), n8n is up and running in 10 minutes.
Workflow automation is one of those investments that pays back many times over. The problem is that popular SaaS tools get expensive very quickly: as the number of tasks or integrations grows, prices jump to $50–100 per month. n8n solves this radically — you host it yourself and only pay for the server.
Why not Zapier/Make
Zapier Free is 5 Zaps and 100 tasks per month. Make (formerly Integromat) Free is 1,000 operations per month — sounds better, but every step in a workflow counts as a separate operation. A 5-step workflow running 200 times is already 1,000 operations. Exceed the limit and your workflow simply stops running.
n8n self-hosted has no execution limits. You can run a workflow 10,000 times a day — you only pay for electricity and server costs. The one downside is that you need to set up and maintain a server. For anyone who already has a QNAP, VPS, or Raspberry Pi, that’s no problem at all.
Docker Compose installation
The entire setup is a single docker-compose.yml file:
version: '3.8'
services:
n8n:
image: docker.n8n.io/n8nio/n8n:latest
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_HOST=n8n.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.yourdomain.com/
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=strongpassword123
- GENERIC_TIMEZONE=Europe/Warsaw
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=dbpassword
volumes:
- n8n_data:/home/node/.n8n
depends_on:
- postgres
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: n8n
POSTGRES_USER: n8n
POSTGRES_PASSWORD: dbpassword
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
n8n_data:
postgres_data:
After docker compose up -d, open http://localhost:5678 and configure the owner account.
Example workflow: email → Slack
A basic flow for customer support tickets looks like this. You start with an IMAP trigger — n8n checks the inbox every minute and runs the workflow for each new email. A Filter node then passes through only messages whose subject contains the word “order”. A HTTP Request node then POSTs to an internal CRM with the order data (parsed from the email body). Finally, a Slack node sends a message to the #sales channel with a summary: customer, amount, order number.
The entire workflow is built by dragging nodes in a graphical editor — no code required. Each node is configured through a form with fields. You run tests on live data with a single click.
Workflow with Claude API
n8n has an “HTTP Request” node that can call any external API. A workflow for automatic ticket analysis could look like this: a Schedule trigger runs hourly, a SQL node fetches new unprocessed tickets from the database, for each ticket an HTTP Request goes to https://api.anthropic.com/v1/messages with the appropriate headers and body, a Function node parses the JSON response and extracts the category, a SQL node saves the category back to the database, and finally — if 50+ tickets have been collected in a single “bug” category — an Email node sends a report to the manager.
Credentials (the Anthropic API key) are stored by n8n encrypted in the database. They never end up in code or logs.
Self-hosted pitfalls
n8n uses SQLite as its database by default. That’s fine for simple workflows, but under heavy use (dozens of parallel executions) SQLite locks up on concurrent writes. In the configuration above we used PostgreSQL — strongly recommended for production.
Webhooks in n8n require a public URL. If n8n is running locally behind NAT, external services (GitHub, Stripe, WooCommerce) can’t reach your endpoint. The solution: WEBHOOK_URL must point to a publicly accessible address. MikroTik NAT + nginx reverse proxy is the standard setup for home servers.
n8n updates come frequently — every 1–2 weeks. docker compose pull && docker compose up -d is sufficient, but always read the changelog before a major version upgrade.
Summary
n8n self-hosted is the best alternative to Zapier/Make for people who have their own server and don’t want to pay per-execution subscriptions. Docker Compose setup takes 10 minutes, the graphical interface is intuitive, and 400+ ready-made integrations cover most needs. The biggest advantage: no limits, your data stays on your server.