EN

Language

Our editions

Written for each audience, not translated word for word.

How to self-host n8n: Docker, editions and the Sustainable Use License

How-toBy Lucas Matías García TorresUpdated Data checked 4 min read

Reviewed by Lucas Matías García Torres on . How we work.

Leer en español

An industrial robotic arm placing small metal cubes connected by glowing orange cables

Short answer

To self-host n8n on October 23, 2026 you need Docker and, for n8n's recommended Compose setup, at least 4 GB of RAM and 2 vCPUs. The free Community edition has almost every feature but lacks SSO, projects, sharing, environments and Git version control, which need a paid Business or Enterprise key. n8n's Sustainable Use License allows internal business, personal and non-commercial use, not selling n8n itself. Use PostgreSQL for production.

Prices and limits change often: check the vendor's page before you pay. How we make money.

You can self-host n8n for free with Docker, run your workflows on your own server and keep your data in-house, but the free edition and the license both come with conditions. On October 23, 2026 n8n recommends Docker Compose, its free Community edition lacks features such as SSO and Git version control, and its Sustainable Use License allows internal business use but not selling n8n itself as a service. This guide covers what you need, how to install it, what the free edition leaves out and what the license allows, based on n8n's official documentation and license read on October 23, 2026.

Self-host or n8n Cloud

n8n's own documentation is frank about who should self-host: it requires knowing how to set up servers and containers, manage resources, secure the server and configure n8n, and mistakes can lead to data loss, security issues and downtime. If you are not used to managing servers, n8n recommends its Cloud service, which has a 14-day free trial. Self-hosting makes sense when you want full control, need to keep data on your own infrastructure or want to run n8n for free. Our comparison of n8n, Zapier and Make covers whether n8n is the right tool at all.

What you need

  • A server or computer with Docker. Docker Desktop works on Mac, Windows and Linux; on a Linux server without a desktop, install Docker Engine and Docker Compose.
  • At least 4 GB of RAM and 2 vCPUs for n8n's recommended Compose setup, which includes a sandbox for running generated code that needs more headroom than a typical container.
  • A domain and HTTPS if the instance must receive webhooks from the internet.
  • Time for maintenance. n8n releases a new minor version most weeks; stable is for production and beta may be unstable.

Install it

n8n's quickest test is a single container:

docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -e GENERIC_TIMEZONE="Europe/Madrid" -e TZ="Europe/Madrid" -v n8n_data:/home/node/.n8n n8nio/n8n

Then open http://localhost:5678. The volume matters: it keeps your workflows, credentials and the instance's encryption key across restarts. GENERIC_TIMEZONE sets the time zone for schedule triggers, so set it to yours.

For anything beyond a test, n8n now marks that single-container page as outdated and recommends its Docker Compose guide: you create a project folder, a .env file with your secrets and the compose.yml that n8n publishes, then start everything with one command. Out of the box it uses the built-in SQLite database. For a production instance with more than a handful of users or workflows running around the clock, n8n says to use PostgreSQL instead, and its guide shows how to add a Postgres service.

What the free edition leaves out

Self-hosted n8n comes in four editions that run the same software:

  • Community: free, with almost the complete feature set, and what n8n runs without a license key.
  • Registered Community: still free; registering your email unlocks folders, debugging in the editor and custom execution data.
  • Business and Enterprise: paid plans whose license key unlocks the rest.

The Community edition does not include custom variables, environments, external secrets, external storage for binary data, log streaming, multi-main mode, projects, SSO with SAML or LDAP, sharing of workflows and credentials, or Git version control. The sharing limit is the one small teams notice first: only the instance owner and the person who created a workflow or credential can access it. Queue mode and logging are included.

What the license allows

n8n is not open source in the usual sense: most of its code is under the Sustainable Use License, and files marked .ee require an n8n Enterprise license. The Sustainable Use License lets you use and modify the software only for your own internal business purposes or for non-commercial or personal use, and distribute it only free of charge for non-commercial purposes. In practice:

  • Automating your own company's work, or personal projects: within the license.
  • Giving a copy to others: only free of charge and for non-commercial purposes.
  • Selling n8n to others, for example as a hosted service: outside the license's terms, so you would need a separate agreement with n8n.

This is our reading of the license text, not legal advice; read it, or ask n8n, before building a business on it.

Before you go live

  1. Back up the data volume and the encryption key. n8n generates the key on first launch and uses it to encrypt the credentials stored in its database, so keep a copy somewhere safe.
  2. Put it behind HTTPS. Our advice is not to expose port 5678 directly to the internet.
  3. Use PostgreSQL once real work depends on it.
  4. Update deliberately: pin a version, read the release notes and test before upgrading.
  5. Treat inputs as untrusted. If workflows pass emails or web pages to a language model, prompt injection applies, as it does to any agent.

Self-hosted n8n is one of the cheapest ways to automate work at scale, as long as someone owns the server. If nobody does, the Cloud plan is the better deal.

What we checked

  • n8n Install with Docker: self-hosting requires server, container, security and configuration knowledge and is recommended for expert users, otherwise n8n Cloud; docker volume create n8n_data and docker run with -p 5678:5678, GENERIC_TIMEZONE, TZ and -v n8n_data:/home/node/.n8n using n8nio/n8n; open http://localhost:5678; SQLite by default, PostgreSQL supported; the .n8n directory contains encryption keys; new minor version most weeks, stable for production and beta may be unstable; the page is marked outdated in favour of Docker Compose. (n8n, )
  • n8n Install using Docker Compose: at least 4 GB of RAM and 2 vCPUs because the sandbox uses Docker-in-Docker; .env with secrets and compose.yml; built-in SQLite by default with the data volume storing the database and encryption key; PostgreSQL recommended for production with more than a handful of users or round-the-clock workflows. (n8n, )
  • n8n editions: Community (free, almost the complete feature set, no license key), Registered Community (free, unlocks folders, debug in editor and custom execution data), Business and Enterprise (paid license key); Community lacks custom variables, environments, external secrets, external binary storage, log streaming, multi-main mode, projects, SSO (SAML, LDAP), sharing of workflows and credentials and Git version control; logging and queue mode are included. (n8n, )
  • Choose how to use n8n: Cloud with a 14-day free trial, self-hosted Community edition free with most features; enterprise features need paid plans on both. (n8n, )
  • n8n LICENSE.md: files with .ee require an n8n Enterprise License; the rest is under the Sustainable Use License 1.0, which allows use or modification only for internal business purposes or non-commercial or personal use, and distribution only free of charge for non-commercial purposes. (n8n (GitHub), )
  • n8n deployment environment variables: N8N_ENCRYPTION_KEY encrypts credentials in the n8n database; by default n8n generates a random key on first launch. (n8n, )

What may change

  • n8n releases new versions most weeks and the editions' feature lists can change; n8n's pricing page is the source of truth. This page is reviewed quarterly.
  • The license summary is our reading of the license text, not legal advice. The checklist before going live is our own recommendation.

Frequently asked questions

Is self-hosted n8n free?

Yes. The Community edition is free with almost the complete feature set, and registering your email unlocks a few more features at no cost. Paid Business and Enterprise plans add SSO, projects, sharing, environments, external secrets, log streaming and Git version control.

How do I install n8n with Docker?

For a quick test, create a volume and run the n8nio/n8n image on port 5678 with your time zone set, then open http://localhost:5678. For regular use, n8n recommends its Docker Compose guide, which needs at least 4 GB of RAM and 2 vCPUs.

Can I use n8n commercially?

The Sustainable Use License lets you use and modify n8n for your own internal business purposes or for personal and non-commercial use, and distribute it only free of charge for non-commercial purposes. Selling n8n itself to others falls outside those terms.

Should n8n use SQLite or PostgreSQL?

SQLite is the default and fine for trying n8n. For a production instance with more than a handful of users or workflows running around the clock, n8n's documentation recommends PostgreSQL and shows how to add it to the Compose setup.

Is n8n Cloud better than self-hosting?

For people who do not manage servers, n8n itself recommends Cloud, because self-hosting mistakes can lead to data loss, security issues and downtime. Self-hosting suits teams that want full control, need data on their own infrastructure or want to run n8n for free.

Sources

  1. Install n8n with Docker: prerequisites, docker run, PostgreSQL and versions, n8n. Accessed October 23, 2026.
  2. Install n8n using Docker Compose: requirements, .env, compose.yml and PostgreSQL, n8n. Accessed October 23, 2026.
  3. Compare n8n self-hosted editions: Community, Registered Community, Business and Enterprise, n8n. Accessed October 23, 2026.
  4. Choose how to use n8n: Cloud or self-hosted, plans and editions, n8n. Accessed October 23, 2026.
  5. n8n LICENSE.md: Sustainable Use License 1.0 and enterprise files, n8n (GitHub). Accessed October 23, 2026.
  6. n8n deployment environment variables: N8N_ENCRYPTION_KEY and related settings, n8n. Accessed October 23, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked on October 23, 2026 against n8n's Docker and Docker Compose installation guides, its editions comparison, its guide to choosing Cloud or self-hosting, its environment variables reference and the LICENSE.md file in its repository.

Next review: .

Part of our Agents & Automation guide.

Other topics