Skip to content
Effloow
← Back to Articles
AI INFRASTRUCTURE ARTICLES ·2026-04-05 ·BY EFFLOOW EDITORIAL ·19 MIN READ

How to Self-Host n8n with Docker — AI Workflow Automation Guide 2026

Self-host n8n with Docker Compose and build AI workflows. Source-verified guide covering setup, Ollama integration, agents, and deployment.
n8n self-hosting docker ai-workflow automation ollama ai-infrastructure tutorial
SHARE
Illustration for How to Self-Host n8n with Docker — AI Workflow Automation Guide 2026
Illustration: AI-assisted. Editorial policy

n8n can be used as a managed cloud service or as a self-hosted workflow automation platform. The cost model is different in each mode: n8n Cloud is priced around workflow executions, while a community self-hosted deployment shifts the bill to the server, storage, monitoring, backups, and maintenance you operate yourself.

n8n is a source-available workflow automation platform with native AI capabilities and a visual node editor. The official GitHub README describes it as a fair-code platform with 400+ integrations, custom code support, AI agent workflows, and self-hosting support. That makes it useful when you want AI calls, vector database queries, webhooks, API requests, and human review steps in one workflow surface.

This guide walks through self-hosting n8n with Docker Compose, from initial setup to an AI workflow pattern with Ollama for local LLM inference. It is a source-verified implementation guide, not a claim that Effloow ran this exact stack in production for this article.

The goal is a practical deployment path: PostgreSQL persistence, safe credential handling, Ollama integration for private inference where appropriate, and production hardening steps before you expose the instance to the internet.

Fact-check status: Pricing, release, starter-kit, and integration claims here were checked against official n8n pages on 2026-06-11. Exact hosting costs, competitor bills, workload capacity, and performance numbers vary by provider and workload, so this guide treats them as planning inputs rather than benchmark results.


What Is n8n?

n8n (pronounced "nodemation") is an open-source, source-available workflow automation platform. You connect nodes on a visual canvas to build automations — triggers, data transformations, API calls, AI model invocations — and n8n executes them on schedule or in response to events.

Feature Detail
GitHub stars About 192,000 on GitHub when checked on 2026-06-11
Current stable version 2.25.6 in the official release notes when checked on 2026-06-11
License Sustainable Use License (source-available)
Integrations 400+ integrations according to the official README and starter-kit docs
AI capabilities LLM chains, AI agents, vector stores, embeddings
Deployment Docker (self-hosted), n8n Cloud, or npm

Sources checked

Why n8n stands out in 2026

n8n is strongest when AI is one part of a broader automation: a webhook receives data, an HTTP node enriches it, an AI node classifies or drafts output, a database node stores state, and a human approval step gates sensitive actions.

The platform ships with dedicated nodes for:

  • LLM chains — connect any model (OpenAI, Anthropic, Google, Ollama) to structured prompts with output parsing
  • AI agents — autonomous agents with tool use, memory, and multi-step reasoning
  • Vector stores — Qdrant, Pinecone, Supabase, and more for RAG workflows
  • Embeddings — generate and query embeddings from multiple providers
  • Document loaders — ingest PDFs, web pages, and databases into your AI pipelines

If you have used Dify for AI-specific workflows, think of n8n as the broader automation layer. Dify excels at RAG chatbots and prompt engineering. n8n excels at connecting AI to everything else — your CRM, email, databases, APIs, and file systems. When the whole job is retrieval over a large document set, a dedicated engine such as RAGFlow handles chunking and ingestion more thoroughly than n8n's general nodes, and you can still trigger it from an n8n workflow.

n8n's execution model

This matters for understanding the cost advantage. Zapier charges per "task" — every individual action in a workflow counts. A 5-step workflow triggered 1,000 times burns 5,000 tasks. Make.com charges per "operation" — similar granularity.

n8n counts per "execution." One execution = one complete workflow run, regardless of how many nodes it contains. A 20-node workflow that processes 1,000 webhook events uses 1,000 executions, not 20,000.

On self-hosted n8n, there is no execution limit at all. You pay for the server. That is it.


Why Self-Host n8n?

The main reason to self-host is control. You decide where data lives, which model endpoints are allowed, how long execution logs are retained, and which network paths are exposed. Cost can also be lower for some workloads, but only after you include server time, backups, upgrades, monitoring, and incident response.

n8n Cloud pricing snapshot

Plan Price Executions/month Active workflows
Starter 20€/mo, billed annually 2.5K Unlimited
Pro 50€/mo, billed annually 10K Unlimited
Business 667€/mo, billed annually 40K Unlimited
Enterprise Contact sales Custom Unlimited

Source checked: n8n pricing on 2026-06-11. Verify current pricing before purchasing because plan names, annual discounts, included features, and execution quotas can change.

Self-hosted cost model

Component Monthly cost
VPS or local server [DATA NOT AVAILABLE]
Domain name, if needed [DATA NOT AVAILABLE]
SSL certificate (Let's Encrypt) Free
Backups and monitoring [DATA NOT AVAILABLE]

Self-hosted Community Edition does not impose the same hosted-plan workflow execution quota, but your actual ceiling is your machine, database, worker configuration, queue mode, and operational discipline. Treat any "$5/month unlimited automations" claim as marketing shorthand unless it is tied to your own measured workload.

When n8n Cloud makes more sense

Self-hosting is not always the right choice. n8n Cloud is worth the premium if:

  • You need multi-user access control without configuring LDAP/OIDC yourself
  • You want zero maintenance — no Docker updates, no backups to manage
  • Your team does not have anyone comfortable with basic server administration
  • You need enterprise SSO and audit logging out of the box

For solo developers, small teams, and anyone who already manages their own infrastructure, self-hosting can be a strong path. If that describes you, our guide to self-hosting your entire dev stack covers the broader infrastructure context.

Comparison with other platforms

We covered this in detail in our Zapier vs Make vs n8n comparison, but the decision should be based on the current pricing pages and your own workflow counts, not a generic benchmark table:

Question Why it matters
How many complete workflow runs do you expect per month? n8n Cloud pricing is based on full workflow executions.
How many steps does each workflow contain? Some automation tools bill per task or operation, while n8n emphasizes execution-based pricing.
Does sensitive data need to stay inside your network? Self-hosting gives you the network boundary, but also the security burden.
Who will patch, back up, and monitor the system? Self-hosting is only cheaper if operations are handled reliably.
Do you need SSO, SAML, LDAP, audit logging, or enterprise support? These may require n8n Business, Enterprise, or another managed option.

Prerequisites

Before starting, make sure you have:

  • A server or local machine with at least 2 CPU cores and 2GB RAM (4GB recommended for AI workloads)
  • Docker Engine 24+ and Docker Compose v2 installed
  • A domain name (for production with SSL — optional for local development)
  • Basic comfort with the terminal

Recommended servers

For a dedicated self-hosted n8n instance, we recommend:

  • Local development: Any machine with Docker installed (Mac, Linux, or Windows with WSL2)
  • Production VPS: A small Linux VPS with enough RAM for n8n, PostgreSQL, and your execution history. Check current provider pricing directly before committing.
  • AI workloads with local LLMs: A larger server or a machine with a GPU if you plan to run non-trivial Ollama models alongside n8n.

If you plan to run Ollama alongside n8n for local AI inference, budget at least 8GB of RAM. Small models like Llama 3.2 (3B) run well on 8GB; larger models like Llama 3.1 (70B) need a GPU server. See our Ollama self-hosting guide for model sizing details.


Method 1: n8n Self-Hosted AI Starter Kit (Recommended)

n8n maintains an official Self-Hosted AI Starter Kit that bundles n8n with PostgreSQL, Ollama, and Qdrant. The official docs describe it as a way to get started with self-hosted AI workflows, but also warn that it is for testing and proof-of-concept use unless you customize, secure, and harden it for production.

Step 1: Clone the repository

git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit

Step 2: Configure environment variables

cp .env.example .env

Edit the .env file with secure values:

# .env — CHANGE THESE VALUES
POSTGRES_USER=n8n_user
POSTGRES_PASSWORD=your-secure-password-here
POSTGRES_DB=n8n

N8N_ENCRYPTION_KEY=generate-a-random-32-char-string
N8N_USER_MANAGEMENT_JWT_SECRET=generate-another-random-string
N8N_DEFAULT_BINARY_DATA_MODE=filesystem

# Uncomment for Mac/Apple Silicon running Ollama locally
# OLLAMA_HOST=host.docker.internal:11434

Generate secure random strings for the encryption keys:

openssl rand -hex 32  # Run twice — once for each key

Important: The N8N_ENCRYPTION_KEY encrypts stored credentials. If you lose it, all saved credentials become unreadable. Back it up somewhere safe.

Step 3: Start the stack

Choose the command that matches your hardware:

# NVIDIA GPU (recommended for AI workloads)
docker compose --profile gpu-nvidia up -d

# AMD GPU (Linux only)
docker compose --profile gpu-amd up -d

# CPU only (works everywhere, slower AI inference)
docker compose --profile cpu up -d

# Mac / Apple Silicon (uses host Ollama — install Ollama separately)
docker compose up -d

The first run pulls several Docker images and downloads the Llama 3.2 model (about 2GB). This takes a few minutes depending on your connection speed.

Step 4: Access n8n

Open your browser and navigate to:

http://localhost:5678

You will see the n8n setup screen. Create your admin account — this is the owner account for your instance. Choose a strong password.

What the starter kit includes

The Docker Compose stack runs five services:

Service Image Purpose Port
n8n n8nio/n8n:latest Workflow automation engine 5678
PostgreSQL postgres:16-alpine Persistent data storage 5432 (internal)
Ollama ollama/ollama:latest Local LLM inference 11434
Qdrant qdrant/qdrant Vector database for RAG 6333
n8n-import n8nio/n8n:latest One-time demo data import

The starter kit includes demo workflow material for understanding n8n's AI capabilities. Treat demo workflow IDs and seed content as examples that may change in the upstream repository.


Method 2: Minimal n8n Setup (Without AI Stack)

If you only need workflow automation without the AI components, a simpler setup with just n8n and PostgreSQL is lighter on resources.

Docker Compose for minimal n8n

Create a docker-compose.yml file:

volumes:
  n8n_storage:
  postgres_storage:

services:
  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - postgres_storage:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 5s
      timeout: 5s
      retries: 10

  n8n:
    image: n8nio/n8n:2.25.6
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_USER=${POSTGRES_USER}
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
      - N8N_USER_MANAGEMENT_JWT_SECRET=${N8N_USER_MANAGEMENT_JWT_SECRET}
      - N8N_DIAGNOSTICS_ENABLED=false
    volumes:
      - n8n_storage:/home/node/.n8n
    depends_on:
      postgres:
        condition: service_healthy

Create the .env file:

POSTGRES_USER=n8n_user
POSTGRES_PASSWORD=your-secure-password
POSTGRES_DB=n8n

N8N_ENCRYPTION_KEY=your-random-encryption-key
N8N_USER_MANAGEMENT_JWT_SECRET=your-random-jwt-secret

Start it:

docker compose up -d

This minimal setup is lighter than the full AI starter kit, but actual RAM use depends on workflow concurrency, execution logging, custom code nodes, and data volume. Measure your own instance before sizing production infrastructure.


Building Your First AI Workflow

Now that n8n is running, let us build a practical AI workflow. We will create an AI-powered content summarizer that:

  1. Receives a URL via webhook
  2. Fetches the web page content
  3. Sends it to an LLM for summarization
  4. Returns the summary as a structured JSON response

Step 1: Create a new workflow

In the n8n editor (http://localhost:5678), click "Add Workflow" in the top-right corner. Name it "AI Content Summarizer."

Step 2: Add a Webhook trigger

  1. Click the + button to add a node
  2. Search for "Webhook" and select it
  3. Set the HTTP Method to POST
  4. Set the path to summarize
  5. Under "Respond," select "Using 'Respond to Webhook' Node" — this lets us return the AI-generated summary

Step 3: Add an HTTP Request node

  1. Add a new node after the Webhook
  2. Search for "HTTP Request"
  3. Set the URL to: {{ $json.body.url }} — this reads the URL from the incoming webhook payload
  4. Set the method to GET
  5. Under "Options," set Response Format to "String" — we want the raw HTML

Step 4: Add an AI chain

  1. Add a "Basic LLM Chain" node
  2. Connect it to the HTTP Request output
  3. Configure the model:
    • If using Ollama (from the starter kit): select Ollama Chat Model and choose llama3.2
    • If using an API: select OpenAI Chat Model or Anthropic Chat Model and add your API credentials
  4. Set the prompt:
Summarize the following web page content in 3-5 bullet points. Focus on the key facts and actionable information. Return the summary as JSON with the format: {"title": "...", "bullets": ["...", "..."], "word_count": N}

Content:
{{ $json.data }}

Step 5: Add a Respond to Webhook node

  1. Add a "Respond to Webhook" node at the end
  2. Set "Respond With" to "All Incoming Items"

Step 6: Test it

Activate the workflow, then call it:

curl -X POST http://localhost:5678/webhook/summarize \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

You should receive a JSON response with the AI-generated summary.

This basic pattern — trigger → fetch data → AI processing → structured output — is the foundation for most AI automation workflows. From here, you can add error handling, conditional branches, database storage, and notification steps.


Advanced: AI Agent Workflows with Tool Use

n8n's AI Agent node goes beyond simple LLM chains. It creates autonomous agents that can reason, use tools, and take multi-step actions — similar to what you would build with LangGraph or CrewAI in code, but configured visually.

What an AI Agent can do in n8n

An n8n AI Agent node combines:

  • An LLM (any supported model) for reasoning
  • Tools that the agent can call: HTTP requests, code execution, database queries, web search
  • Memory for multi-turn conversations
  • Output parsers for structured responses

Building a research agent

Here is a workflow pattern for an AI research agent:

  1. Webhook trigger — receives a research question
  2. AI Agent node configured with:
    • Model: Ollama (llama3.2) or Claude/GPT-4 via API
    • Tools:
      • SerpAPI or Google Search node — for web research
      • HTTP Request tool — for fetching specific pages
      • Code tool — for data processing and calculations
    • System prompt: "You are a research assistant. Search the web to answer questions thoroughly. Cite your sources with URLs."
  3. Respond to Webhook — returns the agent's research report

The agent can decide which configured tools to use based on the question and intermediate results. For production, constrain tools carefully and require human approval for actions that modify external systems or expose sensitive data.

Agent tool configuration

To add tools to an AI Agent node:

  1. Click the AI Agent node
  2. Under "Tools," click "Add Tool"
  3. Select from available tool nodes (Calculator, Code, HTTP Request, SerpAPI, etc.)
  4. Each tool gets a name and description that the LLM uses to decide when to invoke it

The key insight is that the tool descriptions matter as much as the system prompt. Write clear, specific descriptions so the agent knows when each tool is appropriate.

Memory for multi-turn conversations

For chatbot-style workflows, add a Window Buffer Memory or Postgres Chat Memory sub-node to the AI Agent. This gives the agent conversation context across multiple interactions.

With PostgreSQL already in your stack, Postgres Chat Memory is the natural choice — sessions persist across n8n restarts and you get full conversation history in your database.


n8n vs Zapier vs Make: When to Choose What

We wrote a detailed comparison of all four platforms. Here is the decision framework:

Choose Zapier if:

  • You need the largest integration library (7,000+ apps)
  • Your team is non-technical and needs the simplest interface
  • Budget is not a primary constraint
  • You need enterprise compliance certifications

Choose Make.com if:

  • You need complex multi-branch workflows at scale
  • You want the best price-to-operations ratio on a managed platform
  • Your workflows involve heavy data transformation
  • You do not want to manage infrastructure

Choose n8n (self-hosted) if:

  • You want AI workflow automation as a first-class feature
  • You want execution capacity governed by your own infrastructure rather than a hosted-plan quota
  • Data sovereignty matters — GDPR, client contracts, or privacy requirements
  • You are comfortable with Docker and basic server management
  • You want to run local LLMs via Ollama without API costs

Choose n8n Cloud if:

  • You want n8n's features without managing infrastructure
  • You need managed scaling and high availability
  • Your execution volume fits within the tier pricing

Production Deployment Tips

Running n8n locally is one thing. Running it reliably in production requires a few more steps.

Reverse proxy with Caddy

For production deployments, put n8n behind a reverse proxy with automatic SSL. Caddy is the simplest option.

Add Caddy to your docker-compose.yml:

  caddy:
    image: caddy:2-alpine
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data

Create a Caddyfile:

n8n.yourdomain.com {
    reverse_proxy n8n:5678
}

Add WEBHOOK_URL=https://n8n.yourdomain.com to your n8n environment variables so webhook URLs resolve correctly.

Backups

Your n8n data lives in two places:

  1. PostgreSQL database — workflow definitions, credentials (encrypted), execution logs
  2. n8n_storage volume — binary data, encryption keys

Automate daily backups:

#!/bin/bash
# backup-n8n.sh
BACKUP_DIR="/backups/n8n/$(date +%Y-%m-%d)"
mkdir -p "$BACKUP_DIR"

# Database backup
docker compose exec -T postgres pg_dump -U n8n_user n8n > "$BACKUP_DIR/n8n-db.sql"

# Volume backup
docker run --rm -v n8n_storage:/data -v "$BACKUP_DIR":/backup alpine \
  tar czf /backup/n8n-storage.tar.gz -C /data .

echo "Backup completed: $BACKUP_DIR"

Run this daily via cron:

0 3 * * * /path/to/backup-n8n.sh

Updating n8n

Pin your n8n version in docker-compose.yml (for example, the current stable version from the n8n release notes) instead of using latest, and update deliberately:

# 1. Backup first
./backup-n8n.sh

# 2. Update the image tag in docker-compose.yml

# 3. Pull and restart
docker compose pull n8n
docker compose up -d n8n

Check the n8n release notes before updating. Major version bumps may include breaking changes to workflow nodes.

Credential encryption

n8n encrypts stored credentials using the N8N_ENCRYPTION_KEY environment variable. If this key is lost or changed, all saved credentials become unreadable.

Best practices:

  • Generate a strong key: openssl rand -hex 32
  • Store it outside the server (password manager, encrypted backup)
  • Never commit .env files to version control
  • Set the key before creating any credentials — changing it later requires re-entering all credentials

Resource monitoring

For a typical self-hosted n8n instance:

Metric What to watch
CPU Code nodes, high workflow concurrency, and local model calls
RAM n8n process, PostgreSQL, execution history, and Ollama models
Disk I/O Execution logs, binary data, database writes, and backups
Network Webhook bursts, API calls, and model-provider latency

If running AI workloads with Ollama, monitor Ollama separately from n8n. Local model memory needs vary by model, quantization, context length, and concurrency.


Five Practical AI Automation Examples

Here are five n8n workflows you can build today with the self-hosted AI stack.

1. Email triage agent

  • Trigger: New email arrives (IMAP or Gmail node)
  • AI Agent: Classifies email as urgent/normal/spam, extracts action items
  • Actions: Labels email, creates tasks in your project management tool, sends Slack alert for urgent items
  • Model: Llama 3.2 (3B) via Ollama — fast enough for classification tasks

2. RSS-to-summary pipeline

  • Trigger: RSS Feed trigger (check every hour)
  • AI Chain: Summarizes each new article in 3 bullet points
  • Output: Posts summaries to a Slack channel or Discord server
  • Model: Any LLM — this is a straightforward summarization task

3. Customer support auto-responder

  • Trigger: Webhook from your support system
  • AI Agent with tools: Searches knowledge base (Qdrant vector store), drafts a response
  • Human review: Sends draft to Slack for approval before sending
  • Model: Claude or GPT-4 via API for quality-sensitive responses

4. Document processor

  • Trigger: File uploaded to a watched folder or S3 bucket
  • Processing: Extract text from PDF, split into chunks, generate embeddings
  • Storage: Store embeddings in Qdrant for later RAG queries
  • Model: Ollama for embeddings, any LLM for subsequent queries

5. Competitor monitoring dashboard

  • Trigger: Scheduled (daily)
  • Web scraping: HTTP Request nodes fetch competitor pages
  • AI Analysis: Compares changes, identifies new features or pricing updates
  • Output: Generates a daily digest email with structured comparison data
  • Model: Llama 3.2 via Ollama for cost-free daily runs

Each of these workflows can run on self-hosted infrastructure, but the right server size depends on actual frequency, data volume, model choice, and concurrency. Price the equivalent managed workflow from current vendor pages before making a migration decision.


Connecting n8n to Local LLMs via Ollama

If you used the AI Starter Kit, Ollama is already running. Here is how to configure n8n to use it.

Adding Ollama as a credential

  1. In any AI node, click the Model parameter
  2. Select "Ollama Chat Model" or "Ollama"
  3. Create new credentials:
    • Base URL: http://ollama:11434 (inside Docker network) or http://localhost:11434 (if Ollama runs on the host)
  4. Select your model (e.g., llama3.2)

Pulling additional models

To download more models into your Ollama instance:

docker compose exec ollama ollama pull mistral
docker compose exec ollama ollama pull codellama
docker compose exec ollama ollama pull nomic-embed-text  # For embeddings

For a complete guide on Ollama model selection, hardware requirements, and optimization, see our Ollama + Open WebUI self-hosting guide.

When to use local LLMs vs API models

Use case Recommended model Why
Classification, tagging Small local model or API model Use local models for private, high-volume internal tasks after checking quality.
Summarization Local model or API model Match model quality to the risk of the summary being wrong.
Customer-facing content Higher-quality reviewed model path Require human review when customers see the output.
Code generation Code-capable local or API model Depends on repository complexity and review process.
Embeddings Local or hosted embedding model Choose based on privacy, latency, and retrieval quality.

The hybrid approach works well: use local Ollama models for high-volume, internal tasks and API models for customer-facing or quality-critical outputs.


Frequently Asked Questions

Is n8n really free to self-host?

The n8n Community Edition is free to self-host under the Sustainable Use License. You can use it for your own projects and business automations. The license restricts reselling n8n as a hosted service. For most self-hosting use cases, it is effectively free.

How many workflows can self-hosted n8n handle?

There is no artificial Community Edition workflow count in the same way a hosted quota is expressed, but the practical limit is your server, database, execution logging, queue mode, and workflow design. For high-volume scenarios, load-test your own workflows, scale vertically or horizontally, and consider n8n queue mode with multiple workers.

Can I use n8n with OpenAI and Anthropic APIs?

Yes. n8n has native credential types for OpenAI, Anthropic, Google AI, Hugging Face, and many more. Add your API key in the credentials settings and select the corresponding model in any AI node. You can mix and match providers within the same workflow.

How do I update n8n without losing data?

Pin your version, backup your database and volumes, update the image tag in docker-compose.yml, then run docker compose pull && docker compose up -d. Your workflows, credentials, and execution history are stored in PostgreSQL and survive container updates.

Is self-hosted n8n secure enough for production?

n8n encrypts stored credentials, supports LDAP/OIDC/SAML authentication, and provides role-based access control. For production, add a reverse proxy with SSL (Caddy or Nginx), keep the instance updated, restrict network access to port 443, and use strong encryption keys. The self-hosted version gives you more security control than any cloud platform because you own the network boundary.

Can n8n replace Zapier for a small team?

For many technical-team use cases, yes. n8n covers the same integration patterns: triggers, API calls, data transformation, scheduling, custom code, and AI nodes. Check the n8n integrations page and the current pricing pages for each vendor before deciding whether migration saves money.

How does n8n compare to Dify for AI workflows?

They serve different purposes. Dify is purpose-built for AI: RAG chatbots, prompt engineering, model management. n8n is a general-purpose automation platform with strong AI capabilities added. Use Dify when your entire workflow is AI (chat interfaces, document Q&A). Use n8n when you need AI as part of a broader automation that connects to external services, databases, and APIs.


Production Lessons to Apply

Three practices matter before you treat a self-hosted n8n instance as production infrastructure:

  1. Pin your n8n version. Avoid :latest for production. Pin to a stable release, read the release notes, and update after a backup and staging check.

  2. Set up execution log pruning. n8n stores execution data, and that can grow quickly for high-frequency workflows. Configure pruning and backup retention intentionally.

  3. Treat the AI Starter Kit as a starting point. The official docs say it is for getting started and proof-of-concept work. Harden networking, credentials, data retention, and access control before production use.


What Effloow Added

n8n's docs cover the product feature by feature. What a developer deciding to self-host needs is a path that ends in a working AI workflow plus the judgment about when not to bother. We added:

  • Two named deployment paths — the AI Starter Kit (Recommended) versus a minimal Compose setup — so you pick by whether you want the bundled Ollama/Qdrant stack or just the automation engine.
  • A self-host-vs-managed decision (the n8n vs Zapier vs Make section) that says when a hosted tool is the cheaper answer than running your own instance.
  • Production hardening lessons — version pinning, execution-log pruning, Starter-Kit caveats — pulled to the front so they aren't discovered after an incident.

The value is the runnable path and the operational judgment, not a restatement of the node catalog.


Getting Started: Your First 30 Minutes

Here is a concrete plan for your first session with self-hosted n8n:

  1. Minutes 0-10: Clone the AI Starter Kit, configure .env, run docker compose --profile cpu up -d
  2. Minutes 10-15: Open http://localhost:5678, create your admin account, explore the demo workflow
  3. Minutes 15-25: Build the AI Content Summarizer workflow from the tutorial above
  4. Minutes 25-30: Test the webhook, iterate on the prompt, try switching between Ollama and an API model

After that, explore n8n's workflow templates library — there are hundreds of community-built workflows you can import and customize.

Self-hosting n8n can be a high-leverage move for developers and small teams building AI workflows, especially when data control and customization matter. The honest tradeoff is operational responsibility: you own the server, the upgrade path, the backups, the secrets, and the blast radius of every workflow you enable.


n8n is open-source software maintained by n8n GmbH. This guide covers the self-hosted Community Edition. For managed hosting with support, see n8n Cloud.


Get the next one
in your inbox.

One short weekly dispatch with new guides, tools, and what we tested. No spam, unsubscribe anytime.

Get weekly AI tool reviews & automation tips

Join our newsletter. No spam, unsubscribe anytime.

More in Articles

Tools you can use