What the licence allows
n8n is published under the Sustainable Use License, a so-called fair-code licence. It allows the Community Edition to be used free of charge for internal business purposes, meaning workflows within your own company. Set-up and support by a service provider are also permitted.
What is excluded is selling n8n as a product or hosted service to third parties where its value derives substantially from n8n itself, or offering n8n under your own name. Some features are also reserved for a paid licence, such as single sign-on, finer roles and permissions or log streaming. The Community Edition is enough for many smaller companies; n8n's pricing page shows the current feature set.
Cloud or self-hosted?
Both options use the same software. The difference is who takes care of operation:
| Criterion | n8n Cloud | Self-hosted |
|---|---|---|
| Set-up | Create an account and start | Set up server, database and HTTPS |
| Ongoing costs | Monthly plan | Server and support time; software free of charge |
| Updates and backups | Handled by n8n | Your responsibility |
| Data | With the provider | On your server or with your hosting provider |
| Internal systems | Only services reachable over the internet | Systems on your own network as well |
The cloud fits when the connected services are in the cloud anyway and nobody in-house should look after a server. Self-hosting pays off when internal systems are connected, data should not leave the company or workflows run very often.
A robust basic set-up
A single container with the built-in SQLite database is enough for first tests. PostgreSQL is the better choice for production. A lean basic set-up with Docker Compose looks like this:
services:
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: n8n
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: n8n
volumes:
- postgres_data:/var/lib/postgresql/data
n8n:
image: docker.n8n.io/n8nio/n8n:${N8N_VERSION}
restart: unless-stopped
depends_on:
- postgres
ports:
- "127.0.0.1:5678:5678"
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_DATABASE: n8n
DB_POSTGRESDB_USER: n8n
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
N8N_HOST: n8n.example.com
N8N_PROTOCOL: https
WEBHOOK_URL: https://n8n.example.com/
N8N_PROXY_HOPS: "1"
GENERIC_TIMEZONE: Europe/Berlin
TZ: Europe/Berlin
EXECUTIONS_DATA_PRUNE: "true"
EXECUTIONS_DATA_MAX_AGE: "168"
volumes:
- n8n_data:/home/node/.n8n
volumes:
postgres_data:
n8n_data:The key points:
- Local access only: port 5678 is bound to 127.0.0.1. A reverse proxy such as Caddy, Traefik or nginx in front of it handles HTTPS.
- Correct webhook URLs:
WEBHOOK_URLandN8N_PROXY_HOPSmake n8n use the public address behind the proxy. Without them, n8n shows URLs with port 5678 that cannot be reached from outside. - Secrets in a
.envfile: password, key and version number sit next to the Compose file, not in the repository. Generate the key once, for example withopenssl rand -hex 32, and keep a copy separate from the server. - A fixed version instead of
latest: a restart will not silently install a new major version. - Limited retention: execution data is deleted after seven days (168 hours). This limits storage and the amount of personal data kept.
The example shows the basic structure, not complete hardening. A firewall, operating system updates and monitoring belong to it as well.
Data protection: what matters
- Execution data contains content. n8n stores the processed data for every execution, such as email texts or customer data. Set the retention period and, for sensitive workflows, do not save successful executions at all. This can be configured per workflow in its settings.
- External services mean data transfers. A node for a cloud language model or an email service sends content to that provider. This usually requires a data processing agreement and clarity about where the provider processes data.
- Local models as an alternative. For confidential content, a language model on your own hardware, for example via Ollama, can avoid the transfer. Check quality, speed and hardware requirements with real examples first.
- Least-privilege access. Each workflow receives only the credentials and permissions it needs. Personal staff accounts are not suitable for this.
This section describes technical measures and does not replace a legal review.
Updates, backups and monitoring
- Updates: n8n releases frequently. Install updates regularly, read the breaking-change notes before larger jumps and test in a copy.
- Backups: back up the PostgreSQL database, the
/home/node/.n8nfolder and the encryption key. Workflows and credentials can also be exported as files withn8n export:workflow --backupandn8n export:credentials --backup. These exports do not include users, execution history or instance settings. - Practise restoring: a backup is only worth something once a restore has actually worked.
- Monitoring: an error workflow using the Error Trigger reports failed executions by email or chat. An external check shows whether n8n is reachable at all.
- Responsibility: agree who responds to an outage and who may change workflows.
Common pitfalls
No encryption key of your own
Without a key set, n8n generates one on first start and stores it in the data folder. If that folder is lost or a second container starts with a different key, the stored credentials become unusable.
Webhooks with the wrong address
Behind a reverse proxy, n8n generates URLs with the internal port if WEBHOOK_URL is missing. External services then cannot reach the workflow.
A growing database
Without pruning, execution data accumulates. With SQLite, deleted space is also not released automatically, only after a VACUUM.
Code nodes after upgrading to 2.0
Since n8n 2.0, Code nodes run in task runners with stricter limits by default. Some libraries or patterns no longer work there. Test workflows with Code nodes before upgrading.
Workflows tied to personal accounts
If workflows depend on individual people's accounts, they stop as soon as someone leaves the company or changes their password. Technical accounts avoid this.
What the effort depends on
- whether a server exists or needs to be set up,
- how many systems are connected and whether ready-made nodes exist for them,
- how strict data protection and access requirements are,
- who handles updates, backups and outages.
How I approach set-up, workflows and operation is described on the n8n automation page.
Sources: n8n documentation: Sustainable Use License, licence FAQ, n8n 2.0 breaking changes, Execution data, webhook URLs behind a reverse proxy and Back up and restore, accessed on 29 November 2026.
