Is n8n open source? What it is and how the Sustainable Use License applies
n8n is a workflow automation platform with public, self-hostable source, but it is not open source under an OSI-approved license. It is distributed under the Sustainable Use License, which n8n calls fair-code, with the n8n Enterprise License covering the enterprise files. The n8n repository describes it as a fair-code platform to build and deploy AI agents and workflows, and it holds the Sustainable Use License in LICENSE.md and the Enterprise License in LICENSE_EE.md.
Workflows connect triggers such as webhooks, schedules and app events to nodes that call APIs, transform data, run code and drive AI agents that choose tools and call language models. Each workflow can hold credentials for the systems it touches, so an instance often has broad access across the organization. That access shapes every deployment decision below.
The Sustainable Use License permits use for your own internal business purposes or for non-commercial and personal use. Per the n8n license FAQ, it applies only to self-hosted n8n, and use is free if workflows are only created or modified by you or people in your organization. n8n Cloud is a separate paid subscription with its own terms. The FAQ does not permit hosting n8n as a service where clients build workflows, letting external end users build workflows through a custom UI, API, MCP or AI agent, forking the code to launch your own automation product, white-labeling by removing branding, or using enterprise features that need a license key without an Enterprise license.
The FAQ allows a consultant to install and maintain n8n on a client's own server and charge for it, provided the consultant does not also host it. It also permits charging for workflow creation, setup, maintenance, training and consultancy, and building automations for clients on your own instance as long as clients cannot create or edit them. Shipping n8n inside a paid product is gray territory to confirm with n8n. A partner program for multi-instance management is in development, and commercial licensing questions go to n8n sales. Review the license with your legal team for any use beyond internal automation.
n8n enterprise vs community: features that depend on a paid plan
Without a license key n8n runs as the free Community edition, and a Business or Enterprise license key enables those editions. n8n marks plan availability on each feature page. These features most often change a self-hosted design.
| Feature | Plan listed by n8n | Deployment effect |
|---|---|---|
| SAML single sign-on | Self-hosted Business and Enterprise | Only an instance owner or admin can configure it, and from n8n 2.18.0 SSO can also be set with environment variables. Without it, users sign in with accounts managed inside n8n. |
| OIDC single sign-on | Self-hosted Enterprise only | If your identity standard is OIDC, plan for Enterprise or use SAML on Business. |
| Source control and environments | Business and Enterprise | n8n's pricing page lists Git version control and multiple environments under Business. Without them, promote workflows with CLI export and import in a reviewed pipeline. |
| Queue mode | Listed under self-hosted Business on the pricing page | Confirm the plan with n8n before you commit to a worker pool design, because the scaled architecture on this page depends on queue mode. |
| External secrets | Enterprise | Supports 1Password through Connect Server, AWS Secrets Manager, Azure Key Vault, GCP Secrets Manager, HashiCorp Vault and Infisical from 2.26.0. Credentials reference them as {{ $secrets.<vault-name>.<secret-name> }}. Without it, secrets stay encrypted in the n8n database. |
| Log streaming, audit logging, custom roles and enforced 2FA | Enterprise | Log streaming sends workflow, node, audit, worker, AI node, runner and queue events to a syslog server, a generic webhook or a Sentry client. If absent, plan monitoring from application logs. |
| Multi-main high availability | Self-hosted Enterprise only | It needs N8N_MULTI_MAIN_SETUP_ENABLED=true on every main, queue mode, PostgreSQL, Redis, the same n8n version everywhere and a load balancer with sticky sessions. Without it, the main instance remains a single point of failure. |
| Business or Enterprise license key | Business and Enterprise | One key works on unlimited instances, and combined production executions count toward one quota. The key must ping n8n's license server daily, so allow that outbound connection. |
n8n workers, Redis and Postgres: components of a scaled deployment
A single container is enough to start. Queue mode separates scheduling from execution.
Main instance
Serves the editor and API, handles timers and webhook calls, and creates executions. In queue mode it does not run them. Set EXECUTIONS_MODE=queue on the main instance and every worker. In multi-main, the leader runs timers, pollers and pruning, and a follower takes over if it fails. The leader key TTL defaults to 10 seconds.
Workers
Start with n8n worker, or the Docker image with the worker argument. Workers load workflow data from the database, run executions from the queue and write results back. The --concurrency flag defaults to 10 parallel jobs, and n8n recommends 5 or higher to avoid exhausting database connections.
Webhook processors
Optional instances started with n8n webhook that add inbound capacity behind a load balancer. Route /webhook/* and /webhook-waiting/* to them. Everything else, including /webhook-test/*, goes to the main process. n8n does not recommend adding the main process to the webhook pool.
Redis
The queue-mode message broker. Pending executions wait there until a worker takes them, while workflow data stays in the database. Defaults are host localhost, port 6379 and database 0, set with QUEUE_BULL_REDIS_HOST, QUEUE_BULL_REDIS_PORT and QUEUE_BULL_REDIS_DB. Point every process at the same Redis.
PostgreSQL
Stores workflows, encrypted credentials, users and executions. DB_TYPE accepts sqlite or postgresdb, and SQLite is the default. PostgreSQL defaults are host localhost, port 5432, user postgres, database n8n, schema public, pool size 2 and SSL disabled. Review pool size and SSL for production. n8n 2.0 removed MySQL and MariaDB.
Task runners
Run JavaScript and Python Code node code apart from the main process. The task runners docs say to use external mode in production, with the n8nio/runners image as a sidecar. Each queue-mode worker needs its own sidecar, and the runners image version must match the n8nio/n8n version.
Choose a topology: n8n Docker Compose, queue mode or Kubernetes
Use one container for a pilot. The n8nio/n8n image listens on port 5678 and mounts the n8n_data volume at /home/node/.n8n. With PostgreSQL, that volume still holds encryption keys, logs and source control assets. Set TZ for the system timezone and GENERIC_TIMEZONE for schedule-based nodes such as Schedule Trigger. The Docker guide marks itself outdated and points to the Docker Compose guide, and the n8n-hosting repository has a docker-compose/withPostgres file. Starting on PostgreSQL avoids a database migration when you move to queue mode. From n8n 3.0, self-hosted n8n must use Docker.
A main instance, Redis and a pool of workers share one PostgreSQL database. Every worker and webhook processor needs the main instance's encryption key to read stored credentials. For Kubernetes, the server setups page lists guides for AWS with Terraform for high availability, Azure with Terraform for queue mode on AKS, Google Cloud on GKE and OpenShift Local, and it mentions a Helm installation guide. The hosting docs also list guides for DigitalOcean, Hetzner and Heroku. Helm chart versions are separate from n8n versions, so track both.
Add webhook processors behind a load balancer when inbound volume is high. Set N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true to stop the main process handling production webhooks. Expose only webhook paths externally and keep the editor on an internal network. Decide binary data storage early. The queue mode docs list database as the default, and n8n 3.0 changed N8N_DEFAULT_BINARY_DATA_MODE to filesystem. Filesystem storage requires every main, worker and webhook process to share the same volume and path. Set the mode explicitly instead of relying on the default of the version you run.
n8n's docs give no self-hosted production hardware specification. The OEM prerequisites page offers an illustrative example of 320 MB to 2 GB of memory and says memory needs usually outweigh CPU needs. Load depends on execution count, payload and binary data size, Code node use, AI agent calls and saved execution data. Pruning defaults to EXECUTIONS_DATA_PRUNE=true, EXECUTIONS_DATA_MAX_AGE=336 hours and EXECUTIONS_DATA_PRUNE_MAX_COUNT=10000. EXECUTIONS_TIMEOUT defaults to -1, which disables it, with EXECUTIONS_TIMEOUT_MAX at 3600 seconds. Set these early and measure with your own workflows.
n8n security hardening for credentials, code and AI agents
n8n 2.0 tightened several defaults. Task runners are on by default, and N8N_BLOCK_ENV_ACCESS_IN_NODE defaults to true so Code nodes cannot read environment variables. The ExecuteCommand and LocalFileTrigger nodes are disabled and can be re-enabled through NODES_EXCLUDE. ReadWriteFile and ReadBinaryFiles are limited to ~/.n8n-files through N8N_RESTRICT_FILE_ACCESS_TO, and N8N_SKIP_AUTH_ON_OAUTH_CALLBACK is false (see the 2.0 breaking changes). n8n 3.0 adds an enforced N8N_CONTENT_SECURITY_POLICY and sets N8N_UNVERIFIED_PACKAGES_ENABLED to false. Keep these defaults unless a reviewed workflow needs an exception, and record each exception with its owner.
The n8n security overview lists MFA enforcement, SSL enforcement, SAML or OIDC SSO, encryption key rotation, task runner hardening, execution data redaction, disabling the public REST API, blocking nodes, email verification for registration and telemetry opt-out. Work through that list for each environment, and set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true. Limit who can create and share credentials, scope each one to minimum permissions in the target system, and use one service account per integration so access can be revoked cleanly. The n8n audit command gives a repeatable security check.
Restrict outbound network access from workers to approved systems. From n8n 2.12.0, N8N_SSRF_PROTECTION_ENABLED turns on SSRF protection, tuned with N8N_SSRF_BLOCKED_IP_RANGES, N8N_SSRF_ALLOWED_HOSTNAMES and N8N_SSRF_ALLOWED_IP_RANGES. n8n describes it as a defense-in-depth layer and says network controls should stay the primary defense. Review which webhook paths are exposed outside the network.
An AI agent that reads inbound email or web content and can call tools with stored credentials may be steered by instructions hidden in that content. Limit each agent's tools, require human approval for actions with side effects, and test agent workflows for prompt injection before production. DeployOpen's AI and LLM security testing can cover these workflows. Community nodes install third-party packages, so approve and pin them like any code dependency. Connect sign-in to your identity provider where the plan includes SSO, and otherwise run a documented joiner and leaver process.
n8n backup and restore: keep the encryption key with the data
Stored credentials are only usable with the encryption key that protected them. With Docker, run CLI commands with docker exec -u node -it <n8n-container-name>.
| Item | Why it matters | Practice |
|---|---|---|
| Encryption key | n8n encrypts stored credentials with it. If N8N_ENCRYPTION_KEY is unset, n8n generates a random key on first launch and saves it in ~/.n8n. See the encryption key docs. | Set it explicitly, for example with a value from openssl rand -hex 32. Keep it in a secret manager and back it up apart from the database and the instance. |
| One key per environment, shared by every process | Every main, worker and webhook process on one database needs the same key, and each environment needs its own. n8n will not start with a different key on an existing database. | Inject the same key into every process from one secret. A staging copy restored from the production database needs the production key to read its credentials. |
| PostgreSQL | It holds workflows, encrypted credentials, users and executions. | Back up on a schedule and test restores with the same key. |
| CLI exports | The command n8n export:workflow --backup --output=backups/latest/ is shorthand for --all --pretty --separate. Adding --decrypted to export:credentials writes credentials in plain text. | Use the backup flag for routine copies. A decrypted export exposes every secret at once, so restrict it and delete it. |
| Import behavior | On import, exported IDs are preserved, so items with matching IDs are overwritten. n8n import:workflow deactivates imported workflows unless --activeState=fromJson is set, which works only in multi-main and queue mode. | Rehearse imports on a test instance and plan activation as a separate step. |
| Binary data, volume and configuration | These cover files handled by workflows, the n8n_data volume with keys, logs and source control assets, and environment, Compose or Helm settings. n8n 3.0 renamed ~/.n8n/binaryData to ~/.n8n/storage. | Back up the binary data volume or bucket, and keep configuration in version control. |
n8n upgrade 3.0: plan around breaking changes
n8n uses semantic versioning and releases often. Its release notes say a new minor version ships most weeks. On December 4, 2026 they listed stable 3.4.4 for production and beta 3.5.3 as the most recent, possibly unstable release. The GitHub releases page showed n8n@3.4.4 as Latest, n8n@3.5.3 as the beta pre-release and n8n@2.50.7 on the v2 tag.
n8n 3.0 became stable on November 26, 2026 with release 3.4.1. According to the 3.0 breaking changes, self-hosted n8n must use Docker, and npm and npx installs are not supported. Internal task runner mode is deprecated. N8N_UNVERIFIED_PACKAGES_ENABLED defaults to false, N8N_RUNNERS_TASK_TIMEOUT to 60 seconds and N8N_DEFAULT_BINARY_DATA_MODE to filesystem. Encryption key rotation is enabled by default, and ~/.n8n/binaryData is renamed ~/.n8n/storage. Instances coming from older settings should also read the 2.0 changes: MySQL and MariaDB were removed as storage backends, so those instances must migrate to PostgreSQL or SQLite first, and Code nodes that relied on environment variables may need changes.
n8n recommends updating at least monthly and testing first on a test instance. Restore a staging instance from production with the same encryption key. Include workflows that use Code nodes, AI agents and community nodes. Pin an image tag such as n8nio/n8n:<n8n-version> rather than latest, and match the n8nio/runners tag to it.
Before you start, take a full backup of the database and encryption key and note the newest row in the migrations table. Changing the image tag back does not reverse migrations. Roll back with n8n db:revert or a database restore, with all n8n processes stopped. Upgrade main, workers and webhook processors together. Multi-main needs the same version everywhere, and queue mode deployments should read the release notes for every version between current and target. Helm chart versions are separate from n8n versions.
n8n operating ownership
The platform team runs n8n. Workflow owners answer for what each workflow does with the access it holds. Security holds the encryption key and approves what widens access. One record keeps the license, plan and change history.
Platform team
- Run main, workers, Redis and PostgreSQL.
- Monitor queue depth, failures and database growth.
- Set execution pruning and binary data mode.
- Test upgrades and restores with the production key.
Workflow owners
- Name an owner and purpose for each workflow.
- Handle failed executions.
- Retire unused workflows and credentials.
Security
- Hold and back up the encryption key.
- Approve credentials, community nodes and agent tools.
- Review egress and exposed webhook paths.
- Review enforced settings and any exceptions.
License and change record
- Record the license and plan in use.
- Keep configuration and exports in version control.
- Log each upgrade and the workflows tested.
Self-hosted n8n deployment questions
Is n8n open source?
Its source is public and self-hostable, but the Sustainable Use License is not OSI-approved. n8n calls it fair-code. Use is free if workflows are only created or modified by you or people in your organization. The license FAQ does not permit hosting n8n as a service for clients to build workflows, white-labeling, or forking it to launch your own automation product.
What is the difference between n8n enterprise vs community?
Without a license key n8n runs as the free Community edition, and a Business or Enterprise key enables those editions. Self-hosted SAML SSO is on Business and Enterprise, and OIDC SSO on Enterprise only. Enterprise adds external secrets, log streaming, audit logging, custom roles and enforced 2FA. Multi-main high availability is self-hosted Enterprise only. A key works on unlimited instances and must ping n8n's license server daily.
Can DeployOpen install n8n for us?
Yes, on your own servers or cloud account. n8n's license FAQ allows consultants to install, configure and maintain n8n on client infrastructure, provided they do not also host it. DeployOpen designs the topology, sets up PostgreSQL, Redis and queue mode where needed, and hands over a documented platform. You own the instance and any n8n license.
How do we run n8n with Docker Compose?
Use the n8nio/n8n image on port 5678 with the n8n_data volume at /home/node/.n8n. n8n's Docker guide points to its Docker Compose guide and to the n8n-hosting repository, which has a docker-compose/withPostgres file. Set TZ and GENERIC_TIMEZONE, and set N8N_ENCRYPTION_KEY explicitly. From n8n 3.0, self-hosted n8n must use Docker, and npm and npx installs are not supported.
When do we need n8n queue mode with workers, Redis and Postgres?
Not for a pilot. Move to it when executions compete for capacity or workers need to scale independently. Queue mode needs EXECUTIONS_MODE=queue on the main instance and all workers, Redis as the broker and a database all processes share. DeployOpen designs it on PostgreSQL. Workers start with n8n worker and run 10 jobs in parallel by default.
What if we lose the n8n encryption key?
Stored credentials cannot be decrypted, so every credential would need to be re-entered. n8n generates a random key on first launch and saves it in ~/.n8n unless N8N_ENCRYPTION_KEY is set. It will not start with a different key on an existing database. Back the key up apart from the database before the first credential is created.
Can n8n run on Kubernetes with Helm?
n8n's server setups page lists Kubernetes guides for AWS with Terraform for high availability, Azure with Terraform for queue mode on AKS, Google Cloud on GKE including Terraform queue mode, and OpenShift Local. It also mentions a Helm installation guide. Helm chart versions are separate from n8n versions. In queue mode, give each worker its own task runners sidecar.
How do we upgrade to n8n 3.0 safely?
Back up the database and encryption key, note the newest migrations row, and test on staging restored from production with the same key. Check the 3.0 changes: Docker is required, binary data defaults to filesystem, the storage folder is renamed, unverified packages are off and the task timeout is 60 seconds. Pin the image tag and upgrade all processes together. Roll back with n8n db:revert or a restore.
Scope and handover
DeployOpen installs and configures n8n on infrastructure you own, consistent with n8n's license terms for consultants. The instance stays yours, along with any n8n license. We design the topology, set up PostgreSQL, Redis and queue mode where needed, and integrate SSO when your plan includes it.
We harden credentials, code execution and network paths, and set up backups that cover the encryption key as well as the data. We document the platform, plan and test upgrades, and can provide ongoing support.
Handover includes topology and sizing notes, configuration in version control, the encryption key escrow procedure, the license record, a credential and community node inventory, restore test results, the current version and named owners for each operating area.
Sources and further reading
- n8n license FAQ ↗
- n8n Sustainable Use License ↗
- n8n queue mode ↗
- n8n v2.0 breaking changes ↗
- n8n GitHub repository ↗
- n8n hosting docs ↗
- n8n server setups docs ↗
- n8n Docker docs ↗
- n8n OEM prerequisites ↗
- n8n database environment variables ↗
- n8n task runners docs ↗
- n8n v3.0 breaking changes ↗
- n8n SSRF protection docs ↗
- n8n security overview ↗
- n8n encryption key docs ↗

