Self-hosting
Self-host n8n on a VPS with Docker
n8n Cloud starts at 20€/month (billed annually) for 2,500 executions. The Community Edition is free to self-host with no execution cap, but only while a server keeps it running. This guide turns n8n's official Docker install into an always-on automation server.
- Platform
- n8n
- Best for
- Technical teams and developers who want flexible, self-hostable workflow automation and AI agent orchestration with full control over logic.
- Hands-on
- Controlled benchmark pending
Quick answer
Install n8n with the official Docker image on any Linux VPS, keep its data in a named volume, put it behind HTTPS on your own domain so webhooks work, switch from the default SQLite to PostgreSQL once workflows matter, and pin versions for updates. The software is free for your own business, personal or non-commercial use; the VPS is your fixed monthly cost.
Starting point: n8n offers a free self-hosted Community Edition (source-available, on GitHub with 200,415 stars). · Free tier: Yes — No free cloud tier: the free option is the self-hosted Community Edition on GitHub...
This evaluation is built on verified documentation and official pricing data, paired with a repeatable test workflow you can run directly in your own project.
Worth evaluating when
- Creators and small teams who hit n8n Cloud's execution limits or want unlimited workflows for a fixed monthly cost
- Automations that must run on schedules or receive webhooks around the clock
- Anyone who wants workflow data and credentials on infrastructure they control
Check before paying
- You own uptime, backups, security patches and upgrades
- The Sustainable Use License allows internal business, personal and non-commercial use; reselling n8n itself as a service is not allowed
- SSO, log streaming and other governance features are Business/Enterprise-only, even when self-hosted
Why self-host n8n
n8n Cloud is priced by workflow executions: per n8n's pricing page, Starter is 20€/month for 2,500 executions and Pro is 50€/month for 10,000, billed annually. A busy creator workflow (new video alerts, social reposts, comment triage, AI summaries) can use those quickly.
The self-hosted Community Edition has no per-execution fee. You pay for a server instead, and the cost stays the same whether you run a hundred or a hundred thousand executions, limited only by the machine's capacity.
What the license allows
n8n is source-available under its Sustainable Use License. According to n8n's documentation you may use and modify it for your own internal business purposes, or for personal and non-commercial use, and you may charge clients for building and maintaining workflows on your instance.
What you may not do is sell n8n itself as a hosted service to others, or distribute it commercially. If you are unsure about a specific use, n8n's license FAQ and license@n8n.io are the authoritative sources.
What you need
A Linux VPS that runs Docker, a domain or subdomain pointed at it (webhooks from services like YouTube, Stripe or Slack need a public HTTPS URL), and a few minutes. Start with a small plan and upgrade if long-running or parallel workflows need more memory.
Install with Docker
n8n's documentation starts with two commands: docker volume create n8n_data, then docker run with -p 5678:5678 and -v n8n_data:/home/node/.n8n using the official n8n image. The volume keeps your workflows, credentials and execution history when the container is replaced.
For an always-on server, use the Docker Compose setup from n8n's docs instead of docker run, so the container restarts automatically and the configuration lives in a file you can back up.
By default n8n stores data in SQLite. n8n also supports PostgreSQL through environment variables; switch to it before your workflows become important, because it is easier to back up and scales better.
HTTPS and webhooks
Do not expose port 5678 directly. Put n8n behind a reverse proxy such as Caddy, Nginx or Traefik that serves HTTPS on your domain, and set the public URL variables described in n8n's reverse-proxy documentation (for example WEBHOOK_URL) so webhook nodes generate the right external address.
Enable authentication for the editor, keep the VPS firewall limited to SSH and HTTPS, and store API keys only in n8n's credential store, never inside workflow text.
Updates and backups
Pin the image version, read the release notes, back up the data volume or database, then pull the new image and recreate the container. Test critical workflows after each upgrade.
Schedule regular backups of the volume or PostgreSQL database; your credentials and workflow history live there.
When n8n Cloud or Make is the better choice
If you run few executions and do not want to maintain a server, n8n Cloud's free trial and Starter plan remove all operations work. If you prefer a no-code builder with credit-based pricing, compare Make and n8n first.
Run it 24/7 on your own server
n8n runs on your own machine, so it stops answering when your laptop sleeps. A small Linux VPS with Docker keeps it online for scripts, agents and teammates, with a fixed monthly cost instead of per-token markup.
- Start with the smallest plan that runs Docker; upgrade only if you add users or local models.
- Keep the gateway bound to localhost or behind a firewall, and store provider keys as environment variables.
- Monthly billing lets you test before committing to a long term.
Some links are affiliate links. We may earn a commission if you buy through them. Payment never changes our rankings or editorial verdicts.
Related comparisons
Compare n8n against the tools creators most often weigh it against.
Related guides
More Productivity workflows from the same verified catalog.
Run a same-input test
Start n8n
Create the n8n_data volume, start the container on port 5678 and open the editor through an SSH tunnel.
Build one scheduled workflow
Create a schedule-triggered workflow and confirm it runs while you are logged out.
Test a webhook over HTTPS
Behind your reverse proxy, create a Webhook node and call its production URL from another machine.
Restart safely
Recreate the container and confirm workflows, credentials and execution history are still there.
Rehearse a backup
Back up the volume or database, restore it to a fresh container and check a workflow runs.
Official sources
These external sources support the product and pricing record. Recheck them before purchasing because plans and limits change.
Frequently asked questions
Is self-hosted n8n really free?
The Community Edition is free to self-host under n8n's Sustainable Use License for internal business, personal and non-commercial use. You pay for the server and any paid APIs your workflows call.
Which port does n8n use?
The Docker install maps port 5678. For production, keep it private and serve n8n over HTTPS through a reverse proxy on your domain.
Can I build n8n workflows for clients?
n8n's license documentation says you can charge clients for building, setting up and maintaining workflows on your instance, as long as clients cannot create or edit workflows themselves. Reselling n8n as a hosted product is not allowed.
SQLite or PostgreSQL?
n8n uses SQLite by default and supports PostgreSQL through environment variables. PostgreSQL is the better choice for anything you rely on.