---
title: "n8n Self-Hosted 2026: Docker Setup + Security Guide"
description: "Complete n8n self-hosted guide. Docker setup, security hardening, real workflow examples, and when to choose n8n Cloud instead. Step-by-step for 2026."
canonical: "https://achiya-automation.com/en/blog/n8n-self-hosted-guide/"
last-updated: "2026-09-01"
language: "he"
source: "https://achiya-automation.com"
---

# n8n Self-Hosted 2026: Docker Setup + Security Guide

> Complete n8n self-hosted guide. Docker setup, security hardening, real workflow examples, and when to choose n8n Cloud instead. Step-by-step for 2026.

מקור: https://achiya-automation.com/en/blog/n8n-self-hosted-guide/

---

[Home](https://achiya-automation.com/en/) [Blog](https://achiya-automation.com/en/blog/) n8n Self-Hosted 2026: Docker Setup + Security Guide

n8n

[By Achiya Cohen](https://achiya-automation.com/en/about/) March 30, 2026 18 min read
Last reviewed August 25, 2026

- [1 TL;DR](#tldr)
- [2 Why Self-Host?](#why-self-host)
- [3 Prerequisites](#prerequisites)
- [4 Step 1: Server Setup and Docker Installation](#step-1-server-setup-and-docker-installation)
- [5 Step 2: Docker Compose Configuration](#step-2-docker-compose-configuration)
- [6 Step 3: Reverse Proxy with Caddy (Automatic HTTPS)](#step-3-reverse-proxy-with-caddy-automatic-https)
- [7 Step 4: PostgreSQL for Production (Recommended)](#step-4-postgresql-for-production-recommended)
- [8 Step 5: Security Hardening](#step-5-security-hardening)
- [9 Step 6: Queue Mode for High-Volume Setups](#step-6-queue-mode-for-high-volume-setups)
- [10 Q2 2026 Update: What Changed for Self-Hosted Deployments](#q2-2026-update-what-changed-for-self-hosted-deployments)
- [11 Q3 2026 Update: Version 2.x and the licensing question](#q3-2026-update-version-2x-and-the-licensing-question)
- [12 Real-World Workflow Examples](#real-world-workflow-examples)
- [13 Common Configuration Tips](#common-configuration-tips)
- [14 When to Use the Managed Cloud Instead](#when-to-use-the-managed-cloud-instead)
- [15 Maintenance Checklist](#maintenance-checklist)
- [16 April 2026 Update: New Features Worth Knowing](#april-2026-update-new-features-worth-knowing)
- [17 Getting Started](#getting-started)

**Affiliate disclosure:** Some links on this page are affiliate links. If you purchase through them, I may earn a commission at no extra cost to you. Recommendations remain independent and based on practical fit.

**You can run n8n on a rented cloud server, but “self-hosted” does not mean cost-free or limitless. Hosting, backups, monitoring, external APIs, and staff time still cost money, and capacity depends on the server and workflow design. The Community Edition has its own licence terms, while Zapier and Make use different task-based plans. Self-hosting suits teams that can operate a server or have a clear data-residency reason. If nobody on the team wants that responsibility, compare the current n8n Cloud plan instead.**

[n8n (I may earn a commission)](https://n8n.partnerlinks.io/1navqraar6fh) is a tool for building automations, and its Community Edition can run on your own server under n8n’s licence terms. The platform does not use the same per-task billing model as Zapier, but you still pay for the server, backups, monitoring, maintenance, external APIs, and any commercial features you use. It connects to many apps and services, supports custom JavaScript, and gives the operator control over where workflow data is stored.

## TL;DR

- The software **is free** to run yourself — the only thing you pay for is the cloud computer it runs on (a VPS, $5-30/month)
- You can be up and running in **30-60 minutes** using Docker Compose
- It connects to **400+ apps** out of the box, and can talk to almost any other service on top of that
- Running it yourself means **your data stays yours** — none of it leaves your server
- Prefer to skip the server upkeep? Pay for **n8n Cloud** ($20+/month) and let them handle it
- Best for teams that want **lots of power and freedom** without paying for every single task

This guide walks you through the whole thing: from getting Docker installed at the start, to locking the setup down so it is safe, plus real automation examples you can copy and tweak for your own business.

🖥️ Rent a small VPS2 vCPU · 4GB RAM · Ubuntu 24.04

🐳 Install Docker + ComposeOne script · the engine that runs everything

**⚙️ Run n8n + Caddy (HTTPS)**docker-compose.yml · automatic padlock · Postgres for production

🔒 Harden itFirewall · secrets in.env · daily backups

✅ Self-hosted deploymentCapacity depends on the server · workflow data stays on the chosen infrastructure

“n8n is a fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.” — [n8n.io official site](https://n8n.io/)

The [n8n self-hosting documentation](https://docs.n8n.io/hosting/) explains how to run n8n on infrastructure you control. Practical execution capacity still depends on the server, workflow design, concurrency settings, and applicable licence terms.

## Why Self-Host?

“n8n is a fair-code licensed workflow automation tool that lets you self-host, modify, and deploy as you see fit.” — [n8n.io official documentation](https://docs.n8n.io/)

### Self-hosted n8n by the numbers

- Hetzner CX11 VPS: $5/month (2 vCPU, 4GB RAM)
- DigitalOcean droplet: $6/month (1 vCPU, 1GB RAM)
- AWS EC2 t3.small: $15/month (2 vCPU, 2GB RAM)
- n8n Cloud Starter equivalent: $20/month
- n8n Cloud Pro equivalent: $50/month
- Annual cost comparison: calculate from the current cloud plan, hosting, backups, and staff time
- Break-even point: depends on workflow volume, maintenance effort, and the services each workflow calls
- CPU usage at idle: measure on the chosen VPS because nodes, worker mode, and background services change the baseline
- CPU usage during workflow execution: varies by node type, concurrency, and payload size; measure it under your own load
- Memory usage at idle: approximately 200MB in this planning example; measure the actual deployment
- Memory usage with 10 active workflows: approximately 400-600MB in this planning example
- Disk space for one year of execution logs: approximately 5-10GB, depending on payloads and retention
- Backup size (daily compressed): about 100-500MB
- Docker image size: about 500MB

### The Cost Argument

Say your automations run 5,000 times a month. Here is what each option would cost you:

Platform Monthly Cost Annual Cost Zapier (Professional) $49-69 $588-828 Make (Pro) $16-35 $192-420 Managed Cloud (Starter) $20 $240 **Self-Hosted** **$5-20** (VPS only) **$60-240**

Once you are running 10,000+ times a month the gap gets even wider, simply because running it yourself never charges you by the task. Want to see the plans, run limits, and what each tool is best at, all lined up next to each other? Check the [n8n vs Make vs Zapier 2026 comparison](https://achiya-automation.com/en/blog/n8n-vs-make-vs-zapier/).

### The Data Control Argument

When you run it yourself, none of your data ever leaves your own equipment. Every time an automation runs, every password it uses to log into other apps, every bit of customer information — it all stays on your server and nowhere else. For businesses in healthcare, legal, or finance, or anyone who has to keep data private, that is not just a nice bonus — it is something you simply have to have.

### The Flexibility Argument

When you run it yourself, nobody puts limits on what you can do:

- Build as many automations as you want
- Run them as often as you want
- Add as many team members as you want
- Drop in your own JavaScript or Python code wherever you need it
- Pull in extra code libraries other people have built
- Reach straight into your database when you have to
- Let AI assistants use outside tools on their own, through something called MCP (a shared “language” that lets an AI safely operate other software). This is what powers AI-assistant automations — for example, [Safari MCP](https://achiya-automation.com/en/blog/safari-mcp-browser-automation/) lets an AI drive your web browser using logins you already have. One heads-up: most of these [browser tools quietly break on fancy text editors](https://achiya-automation.com/en/blog/mcp-browser-automation-rich-text-editors/) like LinkedIn and Notion unless you add a workaround made for that editor

## Prerequisites

Before you start, here is what you will need:

- **A rented cloud computer** (a VPS) — from Hetzner, DigitalOcean, Contabo, or any similar company

The least you can get away with: 2 processors, 2 GB memory, 20 GB disk (about $5-10/month)

- What we suggest: 2 processors, 4 GB memory, 40 GB disk (about $10-20/month)
- **A web address** (a domain) pointed at your server, so it can have a secure HTTPS connection
- **A little comfort with the command line** — you will be typing text commands into your server rather than clicking buttons
- **Docker and Docker Compose** already installed on the server (these are the tools that run everything)

## Step 1: Server Setup and Docker Installation

First, connect to your server from your own computer (that connection is called SSH) and install Docker on it. The commands below update the server, install Docker and its helper tool, and then confirm both are ready — you can copy them one block at a time:

👨‍💻 Show the code (for developers)

```
# Update system packages
sudo apt update && sudo apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com | sh

# Add your user to the docker group
sudo usermod -aG docker $USER

# Install Docker Compose plugin
sudo apt install docker-compose-plugin -y

# Verify installation
docker --version
docker compose version
```

## Step 2: Docker Compose Configuration

Make a folder to keep everything in, and move into it. This command creates that folder and then steps inside it:

👨‍💻 Show the code (for developers)

```
mkdir -p /opt/n8n && cd /opt/n8n
```

Now create a file called `docker-compose.yml`. Think of it as the instruction sheet that tells Docker exactly how to run n8n — which version to use, which door (port) to open, the login details, and so on:

👨‍💻 Show the code (for developers)

```
version: "3.8"

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      # Basic configuration
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.yourdomain.com/

      # Security
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=your-strong-password-here

      # Database (SQLite by default, PostgreSQL recommended for production)
      - DB_TYPE=sqlite

      # Timezone
      - GENERIC_TIMEZONE=UTC
      - TZ=UTC

      # Execution settings
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=168  # 7 days

    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
    driver: local
```

Now start it up. This one command tells Docker to read that instruction sheet and get n8n running quietly in the background:

👨‍💻 Show the code (for developers)

```
docker compose up -d
```

n8n is now up and running, listening on door number 5678. Before you actually open it in a browser, though, you need to add a secure connection (HTTPS) — that is the next step.

## Step 3: Reverse Proxy with Caddy (Automatic HTTPS)

To make n8n reachable safely over the web, you want a piece of software sitting in front of it that handles the secure connection for you. Caddy is the easiest choice: it acts as that front door and, on its own, sets up the padlock (HTTPS) using free security certificates — no cost, no manual steps. You can add it to your Docker setup or just install it on its own like this:

🌐 Visitor's browserhttps://n8n.yourdomain.com

**🔒 Caddy (the front door)**Terminates HTTPS · fetches + renews the certificate for you

🔁 Passes the request throughreverse_proxy to localhost:5678

⚙️ n8nPort 5678 · never exposed to the web directly

👨‍💻 Show the code (for developers)

```
sudo apt install -y caddy
```

Next, create or open the file `/etc/caddy/Caddyfile`. This short file simply tells Caddy: “when someone visits this web address, quietly pass them through to n8n”:

👨‍💻 Show the code (for developers)

```
n8n.yourdomain.com {
    reverse_proxy localhost:5678 {
        flush_interval -1
    }
}
```

Then restart Caddy so it picks up what you just wrote:

👨‍💻 Show the code (for developers)

```
sudo systemctl restart caddy
```

From here Caddy takes care of the padlock for you — it fetches the security certificate that makes HTTPS work, and renews it before it ever expires, so you never have to think about it. Your n8n is now live at `https://n8n.yourdomain.com`.

**Another option**: If you would rather use Nginx, it can do the same front-door job, paired with a free tool called certbot to handle the HTTPS padlock. For this particular setup, though, Caddy is the simpler road.

## Step 4: PostgreSQL for Production (Recommended)

n8n needs somewhere to store its records, and it comes with a small built-in filing system called SQLite. That is fine while you are just testing. But once this is doing real work for your business, you want something sturdier that can handle a lot more without buckling — a well-known database called PostgreSQL. The updated instruction sheet below adds PostgreSQL alongside n8n and tells n8n to use it instead:

👨‍💻 Show the code (for developers)

```
version: "3.8"

services:
  postgres:
    image: postgres:16
    container_name: n8n-postgres
    restart: unless-stopped
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=your-db-password-here
      - POSTGRES_DB=n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U n8n"]
      interval: 10s
      timeout: 5s
      retries: 5

  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    restart: unless-stopped
    depends_on:
      postgres:
        condition: service_healthy
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.yourdomain.com/

      # PostgreSQL
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=your-db-password-here

      # Security
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=your-strong-password-here

      # Timezone
      - GENERIC_TIMEZONE=UTC
      - TZ=UTC

      # Execution settings
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=168

    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
    driver: local
  postgres_data:
    driver: local
```

## Step 5: Security Hardening

When you run things yourself, keeping them safe is on you rather than on some company. Here are the basics you should not skip:

### Firewall

A firewall is like a bouncer for your server: it only lets in the kinds of traffic you approve and turns everyone else away. The commands below open just the three doors you actually need — one for you to log in (SSH) and two for web traffic — switch the bouncer on, and then specifically slam shut the door n8n runs on so nobody can reach it directly, only through your secure front door:

👨‍💻 Show the code (for developers)

```
# Allow only SSH, HTTP, and HTTPS
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

# Block direct access to n8n port (only via reverse proxy)
sudo ufw deny 5678/tcp
```

### Environment Variables Security

Do not write your real passwords directly into the `docker-compose.yml` instruction sheet on a live setup — it is too easy for them to leak that way. Instead, keep all your secrets in a separate, private file named `.env`, like this:

👨‍💻 Show the code (for developers)

```
# /opt/n8n/.env
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=your-very-strong-password
DB_POSTGRESDB_PASSWORD=your-db-password
N8N_ENCRYPTION_KEY=a-random-32-character-string
```

Then, in `docker-compose.yml`, point to those secrets by name instead of spelling them out. The `${...}` bits below just mean “grab this value from the private file”:

👨‍💻 Show the code (for developers)

```
environment:
  - N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
  - DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD}
  - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
```

### Automatic Backups

A backup is just a saved copy you can fall back on if something goes wrong. The short script below makes one automatically: it saves a copy of all your automations, saves a copy of your database, and then tidies up by deleting any copies older than a week so they do not pile up:

👨‍💻 Show the code (for developers)

```
#!/bin/bash
# /opt/n8n/backup.sh
BACKUP_DIR="/opt/n8n/backups"
DATE=$(date +%Y%m%d_%H%M%S)

mkdir -p $BACKUP_DIR

# Export n8n workflows
docker exec n8n n8n export:workflow --all --output="/home/node/.n8n/backups/workflows_${DATE}.json"

# Backup PostgreSQL
docker exec n8n-postgres pg_dump -U n8n n8n > "${BACKUP_DIR}/db_${DATE}.sql"

# Keep only last 7 days
find $BACKUP_DIR -type f -mtime +7 -delete

echo "Backup completed: ${DATE}"
```

You do not want to remember to run that by hand every day, so set it to run on its own. “cron” is your server’s built-in alarm clock for tasks — this line tells it to run the backup every night at 3 AM:

👨‍💻 Show the code (for developers)

```
# Run backup daily at 3 AM
0 3 * * * /opt/n8n/backup.sh
```

### Automatic Updates

Keeping n8n up to date is worth doing regularly. This little script grabs the newest version and restarts n8n so it starts using it — you can run it whenever you want the latest release:

👨‍💻 Show the code (for developers)

```
#!/bin/bash
# /opt/n8n/update.sh
cd /opt/n8n

# Pull latest image
docker compose pull

# Restart with new image
docker compose up -d

echo "n8n updated to latest version"
```

## Step 6: Queue Mode for High-Volume Setups

Once you are running a lot — say 100+ times a day — it helps to stop cramming all the work into one place. Queue Mode fixes that by lining jobs up in a to-do list and letting several helpers work through them side by side, which keeps things steady under load. A small tool called Redis holds that list. The instruction sheet below adds Redis, switches n8n into this mode, and adds one of those helpers (a “worker”):

👨‍💻 Show the code (for developers)

```
services:
  redis:
    image: redis:7-alpine
    container_name: n8n-redis
    restart: unless-stopped
    volumes:
      - redis_data:/data

  n8n:
    # ... (previous config)
    environment:
      # ... (previous env vars)
      - EXECUTIONS_MODE=queue
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379

  n8n-worker:
    image: n8nio/n8n:latest
    container_name: n8n-worker
    restart: unless-stopped
    command: worker
    environment:
      # Same DB and Redis config as main n8n
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD}
      - EXECUTIONS_MODE=queue
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  redis_data:
    driver: local
```

## Q2 2026 Update: What Changed for Self-Hosted Deployments

Three things changed in the second quarter of 2026 that matter if you run n8n yourself:

- **Version 1.115 added built-in memory options for AI agents** (April 2026). The AI Agent step can use supported memory backends instead of requiring every project to hand-write the storage layer. This can simplify bots that route people or keep context during support chats, but implementation time still depends on the workflow and data model. Source: [n8n release notes](https://docs.n8n.io/release-notes/).
- **The cost of using AI dropped 40-60%** (the “AI” here means the large language models — the brains behind smart bots) — [Claude Haiku 4.5](https://www.anthropic.com/pricing), [GPT-4o-mini](https://openai.com/api/pricing/), and Gemini Flash now cost just $0.001-$0.005 for every thousand words or so they handle. A setup running 200 AI bot conversations a day (roughly 800 calls to the AI) went from $400-1,200/month down to $80-200/month. Suddenly a bunch of automations that were “too pricey for a small business” just three months ago make sense again.
- **WhatsApp calling gained official building blocks** (March 2026). With the official WhatsApp connection, a workflow can collect details, hand off to an AI assistant, place a call, and book a calendar slot. The feature removes some custom integration work, but it does not establish a universal delivery timeline.

**Quick tip, May 2026:** if you run n8n yourself and you have *not* taken a fresh look at which of your automations use AI since February, you are probably wasting money. The price of the AI part has dropped far more than the price of the servers, so that is where the real savings are hiding right now.

## Q3 2026 Update: Version 2.x and the licensing question

*Checked against the n8n release feed and license documentation, August 2026.*

**n8n is on the 2.x line now.** The current release is **n8n@2.35.7, published August 21,
2026** ([n8n releases](https://github.com/n8n-io/n8n/releases)). If your `docker-compose.yml`
still pins `n8nio/n8n:1.x`, you are on a line that no longer receives feature work. Check
what you are actually running before you plan anything else:

```
docker exec -it n8n n8n --version     # what you run today
docker compose pull && docker compose up -d   # after you have taken a database backup
```

⚠️ **Do not jump a major version on a live instance without a backup and a staging pass.**
Take the Postgres dump from the maintenance checklist below first, restore it somewhere
disposable, upgrade *that*, and only then touch production.

### The licensing question nobody asks until it matters

The single most common misunderstanding about self-hosted n8n: people assume “open source”
means “I can run this for my clients and bill them for it.” It does not. n8n ships under
the **Sustainable Use License**, a fair-code license the company created in 2022, and it
carries three explicit limits:

“You may use or modify the software only for your own internal business purposes or for
non-commercial or personal use. You may distribute the software or provide it to others
only if you do so free of charge for non-commercial purposes. You may not alter, remove,
or obscure any licensing, copyright, or other notices of the licensor in the software.”
— [n8n Sustainable Use License](https://docs.n8n.io/sustainable-use-license/)

**What this means in practice.** Running n8n on your own server to automate your own
business is squarely allowed — that is what this whole guide is about. Standing up an n8n
instance and selling access to it as your product is not. The line sits at *“internal
business purposes”*: automating your company’s own work is internal; hosting it as a
service for paying customers is not.

Agencies and consultants sit in the grey area and should read the license themselves
rather than trust a blog post — including this one. If your model involves hosting n8n for
clients, n8n sells an embed licence for exactly that case, and asking them directly costs
nothing.

## Real-World Workflow Examples

### 1. Lead Capture to CRM + WhatsApp Notification

**What kicks it off**: Someone fills in the contact form on your website (the form quietly pings n8n the moment it is submitted)

**What happens next**:

- n8n grabs what they typed — name, email, phone, message
- It adds them as a new contact in your customer list (HubSpot / [Airtable (I may earn a commission)](https://airtable.partnerlinks.io/achiya-automation) / Pipedrive)
- It sends the person a WhatsApp message confirming you got their enquiry (our [WhatsApp bot for business guide](https://achiya-automation.com/en/blog/whatsapp-bot-for-business/) covers how to connect WhatsApp)
- It pings your sales team on Slack or WhatsApp so they know
- It drops the person into an automatic email follow-up sequence

That is 5-10 minutes of copy-pasting saved on every single lead — and no enquiry ever slips through the cracks.

### 2. Appointment Reminders

**What kicks it off**: A timer — this one runs itself once every hour

**What happens next**:

- It looks in your calendar or booking tool for any appointments coming up in the next 24 hours
- It sets aside the ones that have not been reminded yet
- It sends each of those customers a WhatsApp reminder
- It notes down that the reminder went out, so nobody gets pestered twice
- If a customer replies “cancel,” it updates the booking for you automatically

The result: far fewer no-shows, and you never lift a finger.

### 3. Invoice Automation

**What kicks it off**: You mark a deal as “Won” in your customer list

**What happens next**:

- It pulls the details of that deal
- It creates the invoice in your accounting software
- It emails the invoice to the customer
- If they have not paid after 7 days, it sends a polite reminder
- It updates the deal to show whether it has been paid

### 4. Customer Support Triage

**What kicks it off**: A new message lands from a customer, by WhatsApp or email

**What happens next**:

- It reads the customer’s message
- It uses AI (OpenAI/Claude) to work out what the message is actually about — a billing question, a technical problem, or a general enquiry — and sort it accordingly. That is the simple version; for bots that can go further and handle several steps by themselves, see [AI agents for business](https://achiya-automation.com/en/blog/ai-agents-for-business/)
- It checks your help articles to see if there is a ready answer
- If it is confident it found the right answer, it replies on its own
- If not, it hands the conversation to the right person on your team inside [Chatwoot (I may earn a commission)](https://www.chatwoot.com/?via=achiya-automation) (our [Chatwoot vs Intercom comparison](https://achiya-automation.com/en/blog/chatwoot-vs-intercom/) explains why we prefer Chatwoot; **5% off Cloud with code ACHIYAVS**)
- It keeps a record of the whole thing in your customer list

## Common Configuration Tips

### Settings Worth Turning On

These are a few optional tweaks you can add to your setup. Each line adjusts one thing — how long n8n waits on slow services, how much detail it writes to its logs, how big a file it will accept, where it keeps its files, and whether it sends anonymous usage stats back home. The `#` lines are just plain-English notes explaining each one:

👨‍💻 Show the code (for developers)

```
# Increase webhook timeout for slow APIs
N8N_DEFAULT_TIMEOUT=300

# Better error logging
N8N_LOG_LEVEL=info

# Allow larger payloads (for file processing)
N8N_PAYLOAD_SIZE_MAX=64

# Custom user folder (for multiple instances)
N8N_USER_FOLDER=/home/node/.n8n

# Disable usage telemetry (optional, privacy)
N8N_DIAGNOSTICS_ENABLED=false
```

### Handy Commands to Keep Around

Sometimes it is quicker to type a command than to click through the screens. These few let you save all your automations to a file, load them back in, reset the admin password if you get locked out, and check which version you are on:

👨‍💻 Show the code (for developers)

```
# Export all workflows
docker exec n8n n8n export:workflow --all --output=/home/node/.n8n/export.json

# Import workflows
docker exec n8n n8n import:workflow --input=/home/node/.n8n/export.json

# Reset admin password
docker exec n8n n8n user-management:reset

# Check n8n version
docker exec n8n n8n --version
```

## When to Use the Managed Cloud Instead

Running it yourself is not the right call for everyone. Go with [n8n Cloud (I may earn a commission)](https://n8n.partnerlinks.io/1navqraar6fh) instead when:

- **Nobody to run the server**: There is no one on your team who is comfortable looking after a Linux server
- **You need official paperwork**: You need a recognised security certification (like SOC 2) to satisfy clients or regulators, and Cloud comes with it
- **You want to start today**: You would rather be running in 5 minutes than spend an hour setting up
- **It can never go down**: Your business cannot afford even a short pause for maintenance
- **You want someone to call**: You want official support from the n8n team when something goes wrong

The Cloud version starts at $20/month and takes the hosting, updates, secure connection, and support off your plate. It is the exact same software with the exact same abilities — the only difference is that someone else looks after the machinery.

## Maintenance Checklist

Once it is up and running, a little regular attention keeps it healthy:

- **Every week**: Skim the logs for any automations that failed, and read through any error alerts
- **Every month**: Update to the newest version, and clear out automations you no longer use
- **Every few months**: Make sure your backups actually work by restoring one onto a test setup, give your server’s security a once-over, and renew the HTTPS padlock if it did not renew itself
- **Whenever needed**: Give your server more power if things start running slowly

## April 2026 Update: New Features Worth Knowing

Three things have changed since this guide first went up that make running it yourself nicer:

- **Version 1.70+ has a ready-made Gemini 3 building block** — before, you had to wire up a general-purpose connector by hand and format everything yourself. Now there is a purpose-built block that just handles it, including replies that stream in bit by bit and inputs that mix text with images.
- **Queue Mode got steadier in 1.70** — fewer automations getting “stuck” partway through long jobs. If you have found yourself restarting those helper processes now and then, updating should cut that down.
- **“Task Runners” are now stable and ready for real use** — these run any custom Python or JavaScript in a walled-off space of their own, which fixes a real safety worry: code from strangers running in the same place as everything else. Well worth using for any automation that is open to the public and takes input from users.

**Quick tip, April 2026:** try not to fall more than a couple of versions behind the latest release. The n8n team changes things gradually rather than all at once, so if you let it drift 6+ versions behind, catching up later becomes a real headache.

## Getting Started

Running [n8n (I may earn a commission)](https://n8n.partnerlinks.io/1navqraar6fh) yourself gives you a seriously capable automation engine for a tiny fraction of what the pay-monthly services charge. Getting it going takes 30-60 minutes, and after that it mostly looks after itself.

If you are comfortable enough to follow this guide, you can absolutely run the whole thing yourself. And if you would rather have someone else handle the setup and build your automations for you, that is exactly what we do.

**We set up and look after automation systems for businesses** — the server, the security, building the actual automations, and keeping everything running afterwards. You pay once for the setup, with no monthly software fees.

[Book an introductory call](https://achiya-automation.com/en/contact/) or [message us on WhatsApp](https://wa.me/972505377060?text=Hi%20Achiya%2C%20I%20came%20from%20the%20website) to talk through what you want to automate. Our [business automation service](https://achiya-automation.com/en/services/business-automation/) page and [pricing tiers](https://achiya-automation.com/en/pricing/) page have the details on how we deliver. Hiring from abroad? See [hire an n8n expert](https://achiya-automation.com/en/hire-n8n-expert/) for international pricing and how we work across time zones.

Losing leads because no one's answering?

A WhatsApp bot can run defined replies, appointment steps and lead capture outside office hours, subject to connected-system availability. Projects start from $1,000 one-time. Tell me about your business &rarr;
[Get a Custom Quote](https://achiya-automation.com/en/contact/#contact-form)

Prefer to chat? [WhatsApp me](https://wa.me/972505377060?text=Hi%20Achiya%2C%20I%20read%20your%20blog%20post%20(n8n%20Self-Hosted%202026%3A%20Docker%20Setup%20%2B%20Security%20Guide)%20and%20I'd%20like%20to%20talk) · [full pricing](https://achiya-automation.com/en/pricing/) · [our projects](https://achiya-automation.com/en/case-studies/)

### Achiya Cohen
Business Automation Expert · Building bots since 2023

Completed 50+ automation projects — WhatsApp bots, CRM integrations, and automated workflows. Specializing in n8n, Make, and WhatsApp Business API.
[Contact](https://achiya-automation.com/en/contact/) · [LinkedIn](https://www.linkedin.com/in/%D7%90%D7%97%D7%99%D7%94-%D7%9B%D7%94%D7%9F-1882302aa/)

## More articles you might like
[### Business Automation for Small Teams (2026 Guide)](https://achiya-automation.com/en/blog/business-automation-guide/)[### Chatwoot vs Intercom 2026: Pricing + Promo Code](https://achiya-automation.com/en/blog/chatwoot-vs-intercom/)[### n8n vs Make vs Zapier: Honest Comparison (2026)](https://achiya-automation.com/en/blog/n8n-vs-make-vs-zapier/)

[WhatsApp Bot Service](https://achiya-automation.com/en/services/whatsapp-bot/) [Business Automation](https://achiya-automation.com/en/services/business-automation/) [Pricing](https://achiya-automation.com/en/pricing/)

### Ready to automate your business?

50+ automation projects completed. Tell me about yours — I'll show you exactly what we can automate.

[Prefer WhatsApp? Message me &rarr;](https://wa.me/972505377060?text=Hi%20Achiya%2C%20I%20read%20your%20article%20(n8n%20Self-Hosted%202026%3A%20Docker%20Setup%20%2B%20Security%20Guide)%20and%20I%20have%20a%20business%20and%20want%20a%20quote.%20A%20bit%20about%20my%20business%20and%20what%20I%20need%3A%20)

I’ll reply as soon as I can · Project quote based on scope

[Back to Blog](https://achiya-automation.com/en/blog/)

- [1 TL;DR](#tldr)
- [2 Why Self-Host?](#why-self-host)
- [3 Prerequisites](#prerequisites)
- [4 Step 1: Server Setup and Docker Installation](#step-1-server-setup-and-docker-installation)
- [5 Step 2: Docker Compose Configuration](#step-2-docker-compose-configuration)
- [6 Step 3: Reverse Proxy with Caddy (Automatic HTTPS)](#step-3-reverse-proxy-with-caddy-automatic-https)
- [7 Step 4: PostgreSQL for Production (Recommended)](#step-4-postgresql-for-production-recommended)
- [8 Step 5: Security Hardening](#step-5-security-hardening)
- [9 Step 6: Queue Mode for High-Volume Setups](#step-6-queue-mode-for-high-volume-setups)
- [10 Q2 2026 Update: What Changed for Self-Hosted Deployments](#q2-2026-update-what-changed-for-self-hosted-deployments)
- [11 Q3 2026 Update: Version 2.x and the licensing question](#q3-2026-update-version-2x-and-the-licensing-question)
- [12 Real-World Workflow Examples](#real-world-workflow-examples)
- [13 Common Configuration Tips](#common-configuration-tips)
- [14 When to Use the Managed Cloud Instead](#when-to-use-the-managed-cloud-instead)
- [15 Maintenance Checklist](#maintenance-checklist)
- [16 April 2026 Update: New Features Worth Knowing](#april-2026-update-new-features-worth-knowing)
- [17 Getting Started](#getting-started)

Share [Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fachiya-automation.com%2Fen%2Fblog%2Fn8n-self-hosted-guide%2F) [X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fachiya-automation.com%2Fen%2Fblog%2Fn8n-self-hosted-guide%2F&text=n8n%20Self-Hosted%202026%3A%20Docker%20Setup%20%2B%20Security%20Guide) [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fachiya-automation.com%2Fen%2Fblog%2Fn8n-self-hosted-guide%2F) [WhatsApp](https://api.whatsapp.com/send?text=n8n%20Self-Hosted%202026%3A%20Docker%20Setup%20%2B%20Security%20Guide%20-%20https%3A%2F%2Fachiya-automation.com%2Fen%2Fblog%2Fn8n-self-hosted-guide%2F)

## Frequently Asked Questions
Is n8n really free? Yes. Anyone can download it and run it for free on their own server, and you never pay per task or per month for the software itself. Build as many automations as you like and run them as often as you like — it costs nothing extra. The one thing you do pay for is the server it runs on, which is usually $5-30/month for a small rented computer in the cloud (a VPS). If you would rather not deal with a server at all, there is also a paid version (from $20/month) where the company runs everything for you.

What server specs do I need for n8n self-hosted? If you are running a small or medium amount of work — say up to 50 automations and a few thousand runs a day — a modest server is plenty: 2 processors, 4 GB of memory, and 40 GB of disk space. That kind of server usually runs $10-20/month from companies like Hetzner, DigitalOcean, or Contabo. If you plan to run a lot more, step up to 4 processors and 8 GB of memory.

How does n8n compare to Zapier and Make? Running it yourself is free and there is no cap on how many times your automations can run. Zapier is the easiest of the three to pick up, but it bills you for every task and starts at $19.99+/month. Make sits in the middle on price ($10.59+/month) but puts a monthly limit on how many tasks you get. Doing it yourself gives you the most freedom and the lowest cost, but you do need to be comfortable with a bit of tech setup.

Is n8n secure for business data? Set up correctly, running it yourself is very safe — all your information lives on your own server and never travels through anyone else's systems. You decide how it is locked down, who is allowed in, and how it gets backed up. That is exactly why it suits businesses that have to keep customer data private. The catch is doing the setup right: a secure (HTTPS) web connection, strong passwords, a firewall to block unwanted traffic, and keeping everything up to date.

Can I use n8n without coding knowledge? For everyday automations, no — you build them by dragging boxes around on screen and connecting them, no code needed. Once you want to do trickier things, reshape your data, or figure out why something broke, knowing a little JavaScript makes a big difference. And if you want to learn, the community and the official guides are genuinely helpful places to start.

What is Queue Mode in n8n? Think of Queue Mode as a to-do list for your automations. Instead of one part of the program trying to run everything at once, jobs line up in a list and several helpers pick them off and run them side by side. A small tool called Redis keeps that list. This keeps things fast and dependable once you are running a lot — roughly 100+ runs a day. You do need to add Redis, but that is a quick, standard step with Docker.

When should I use n8n Cloud instead of self-hosting? Go with the paid Cloud version when nobody on your team is comfortable looking after a server, when you need it to stay online no matter what and want a support team to call, when you would rather not deal with any upkeep at all, or when you are just trying things out and do not want to build your own setup yet.

### [About Achiya Cohen](https://achiya-automation.com/en/about/)

WhatsApp Chatbot Developer & Business Automation Expert · Since 2023 · 50+ completed automation projects · 5.0★ (20 reviews)

Achiya Cohen is a solo WhatsApp chatbot and no-code automation consultant based in Ashdod, Israel. Since 2023 he has built custom WhatsApp Business API bots and n8n workflow automations for small business owners — restaurants, clinics, lawyers, real estate agents, e-commerce stores. Featured in [The Times of Israel](https://blogs.timesofisrael.com/author/achiya-cohen/) and [DEV Community](https://dev.to/achiya-automation).
[LinkedIn](https://www.linkedin.com/in/achiya-automation/) [GitHub](https://github.com/achiya-automation) [DEV.to](https://dev.to/achiya-automation) [Full bio →](https://achiya-automation.com/en/about/)

---

סיכום האתר לסוכנים: https://achiya-automation.com/llms.txt · כל העמודים: https://achiya-automation.com/sitemap-index.xml · API: https://achiya-automation.com/openapi.json
