Back to journal
Integrations & Tools

n8n Self-Hosting Guide for Cost-Conscious SMBs

Cut automation costs and keep your data private. This practical guide covers self-hosted n8n for small business automation on a VPS with Docker.

Tommy Rush
n8n Self-Hosting Guide for Cost-Conscious SMBs
Share

If your team is running dozens of automations across CRMs, support tools, and spreadsheets, you have probably already felt the sting of per-task pricing on platforms like Zapier or Make. Self-hosted n8n for small business automation is one of the most practical ways to escape that billing model while gaining flexibility and data control that cloud-only tools simply cannot match. This guide walks through what n8n is, how to evaluate whether self-hosting makes sense for your operation, and the concrete steps to get it running on a VPS.

What Makes n8n Different From Zapier and Make

n8n is an open-source workflow automation platform. You can run it on your own infrastructure, which means you own the runtime, the data passing through it, and the integration logic — not a SaaS vendor.

A few characteristics that set it apart:

  • Node-based visual editor. Workflows are built as a graph of connected nodes. Non-technical operators can build simple flows; developers can drop in JavaScript or Python for complex transformations.
  • Self-hosted or cloud. n8n offers a paid cloud version, but the self-hosted Community Edition is free to use for most commercial purposes (always verify the current license at n8n.io for your specific use case).
  • No per-task fees when self-hosted. Once your server is running, workflow executions do not trigger a usage bill. This is the central economic argument for self-hosting.
  • 400+ integrations. Airtable, Slack, HubSpot, Notion, OpenAI, PostgreSQL, and hundreds more ship as first-party nodes.

n8n vs Zapier: The Cost Comparison That Actually Matters

Cloud automation pricing is structured around task volume, and that model becomes expensive quickly. Consider a hypothetical professional services firm running order confirmations, CRM updates, and weekly reporting workflows. If those processes generate a meaningful volume of task executions per month, the monthly bill on a mid-tier cloud automation plan can reach several hundred dollars. The equivalent server capacity to self-host n8n for small business automation might run under forty dollars per month on a decent VPS.

The comparison is not purely about cost. Cloud platforms handle uptime, updates, and vendor support. Self-hosting adds operational responsibility. The question is whether your team is willing to own that responsibility in exchange for the economics and privacy advantages.

When Self-Hosting Makes Sense for an SMB

Self-hosting is worth considering when one or more of these conditions apply:

You process sensitive data. Healthcare, legal, and financial workflows often involve data that you would rather not route through third-party cloud systems. Self-hosting keeps the data on infrastructure you control.

Your task volume is growing fast. If you are regularly adding new automations and usage-based billing is scaling with them, the fixed cost of a server starts looking attractive.

You need custom integrations. n8n's custom node system lets developers build integrations for internal APIs or legacy systems that no SaaS platform supports. That code lives on your server.

You want to embed AI steps without surprise costs. Workflows that call OpenAI or Anthropic APIs already have their own token-based costs. Avoiding a second layer of per-execution fees from your automation platform reduces the total cost of AI-augmented workflows.

Self-Hosting n8n on a VPS: What You Actually Need

Server Requirements

A small n8n instance handling a moderate number of workflows runs comfortably on a virtual private server with:

  • 2 vCPUs
  • 4 GB RAM
  • 40 GB SSD storage
  • Ubuntu 22.04 LTS (or Debian 12)

Providers like DigitalOcean, Hetzner, Vultr, and Linode all offer machines in this range. Hetzner's European data centers, in particular, are popular with privacy-focused teams because of GDPR geography considerations.

As workflow volume grows, you can vertically scale the server or switch to a queue-based architecture with a separate worker process. Start simple and upgrade when metrics justify it.

DNS and HTTPS

n8n's webhook functionality — which is how external services like Stripe or Typeform send data to your workflows — requires a publicly accessible HTTPS endpoint. Before installing n8n, point a subdomain (for example, automation.yourcompany.com) at your server's IP address, and plan to issue a TLS certificate via Let's Encrypt.

n8n Docker Setup Guide: Step by Step

Docker is the recommended installation method for most SMB deployments. It handles dependency isolation and makes updates straightforward.

1. Install Docker and Docker Compose

On a fresh Ubuntu server:

apt update && apt upgrade -y
apt install -y docker.io docker-compose-plugin
systemctl enable docker

2. Create a Working Directory and Environment File

mkdir /opt/n8n && cd /opt/n8n

Create a .env file with your configuration:

N8N_HOST=automation.yourcompany.com
N8N_PORT=5678
N8N_PROTOCOL=https
WEBHOOK_URL=https://automation.yourcompany.com/
DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=n8n
DB_POSTGRESDB_HOST=postgres
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_USER=n8n
DB_POSTGRESDB_PASSWORD=your_strong_password_here
N8N_ENCRYPTION_KEY=your_random_32_char_key_here

Using PostgreSQL rather than the default SQLite database is strongly recommended for any production use. SQLite works for experimentation but does not handle concurrent workflow executions as reliably.

3. Write the Docker Compose File

version: "3.8"

services:
  postgres:
    image: postgres:15
    restart: always
    environment:
      POSTGRES_DB: ${DB_POSTGRESDB_DATABASE}
      POSTGRES_USER: ${DB_POSTGRESDB_USER}
      POSTGRES_PASSWORD: ${DB_POSTGRESDB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data

  n8n:
    image: n8nio/n8n:latest
    restart: always
    ports:
      - "5678:5678"
    env_file:
      - .env
    volumes:
      - n8n_data:/home/node/.n8n
    depends_on:
      - postgres

volumes:
  postgres_data:
  n8n_data:

4. Configure a Reverse Proxy with HTTPS

Nginx with Certbot is the standard choice. Install both, create an Nginx server block that proxies port 5678, and run certbot --nginx -d automation.yourcompany.com to issue and auto-renew the certificate. n8n's documentation covers the specific Nginx configuration in detail.

5. Start the Stack

docker compose up -d

Navigate to https://automation.yourcompany.com in a browser. You will be prompted to create an owner account on first load.

Operational Practices Worth Establishing Early

Backups

Your automation logic lives in the PostgreSQL database. Schedule a daily pg_dump that writes to an off-server location — an S3-compatible bucket, for example. The n8n data volume stores credentials and binary data; include it in your backup rotation as well.

Updates

n8n releases frequently. To update, pull the new image and restart the service:

docker compose pull && docker compose up -d

Review the n8n changelog before major version jumps. Breaking changes to node behavior do occasionally appear between minor versions.

User Access

n8n's Community Edition supports multiple user accounts as of recent versions. Create individual accounts for each team member rather than sharing credentials. This gives you an audit trail of who created or modified which workflows.

Monitoring

A self-hosted service needs basic uptime monitoring. A lightweight external check — something as simple as a UptimeRobot free-tier monitor pinging your n8n URL — will alert you if the service goes down unexpectedly.

Common Pitfalls and How to Avoid Them

Skipping the PostgreSQL setup. SQLite will work during development but will cause problems in production. Start with Postgres and avoid a painful migration later.

Not setting an encryption key. The N8N_ENCRYPTION_KEY environment variable encrypts stored credentials. If it is not set, n8n generates one at runtime — and if you recreate the container without persisting it, all stored credentials become unreadable. Set it explicitly in your .env file and back it up.

Exposing port 5678 directly. Always put n8n behind a reverse proxy. Running it directly on a public port without TLS is a security risk, and many webhook-sending services require HTTPS endpoints anyway.

Forgetting to test webhooks. After setup, create a simple test workflow with a Webhook trigger node and verify that an external HTTP POST reaches it successfully. Catching proxy or DNS misconfiguration early saves significant debugging time later.

Open-Source Workflow Automation: Realistic Expectations

Self-hosted open-source workflow automation gives SMBs genuine advantages: no per-task pricing, full control over data routing, and the ability to build integrations that cloud platforms do not support. The trade-off is operational ownership — you are responsible for uptime, updates, and backups.

For teams without in-house technical staff, that trade-off may not be favorable. A managed cloud plan or a hybrid approach — using n8n Cloud for some workflows and a self-hosted instance for sensitive or high-volume ones — can make sense depending on your situation.

The economics shift meaningfully once your monthly cloud automation bill exceeds what a small VPS costs. At that point, the technical overhead of self-hosting becomes worth evaluating seriously.

How Intuitional Can Help

Setting up n8n is one part of the equation. Designing workflows that are maintainable, documented, and actually solve the right problems is another. At Intuitional, we help SMBs evaluate whether self-hosted n8n for small business automation fits their workflow profile, architect the integration layer, and build the automations that eliminate manual repetition from their operations. If you are ready to move beyond duct-tape automations and build something durable, schedule a conversation about your workflow to talk through your use case.

Explore this topic further

Jump into the journal with one of the themes from this article.

If this article maps to a real workflow problem, let’s build the fix.

Intuitional works with teams that need better systems, cleaner handoffs, and AI or automation used with discipline.

Run the workflow ROI calculator