Overview
n8n is a workflow automation platform (fair-code, distributed under the Sustainable Use License). This template deploys an n8n instance backed by a highly available PostgreSQL cluster by default. The editor, REST API, and webhook endpoints are served on one public HTTPS endpoint, and the instance owner account is pre-provisioned at install — there is never an unauthenticated setup page. Both the owner login and the credential-encryption key come from secrets you create before installing. Neither passes through Helm values, which matters here because the n8n login form sits on a public endpoint by default.Architecture
- n8n — A single-replica stateful workload serving the editor, REST API, and webhooks on port
5678. Public URLs are derived from the canonical endpoint at start, so webhook URLs work out of the box. - PostgreSQL (HA, default) — The postgres-highly-available template as a subchart: 3× Patroni PostgreSQL, 3× etcd, and a HAProxy leader-routing endpoint n8n connects through.
- PostgreSQL (dev/lightweight, optional) — The single-instance postgres template instead, for lighter non-HA deployments.
- Owner managed from a secret — The owner account is applied from your prerequisite secret at every start, so n8n never opens an unauthenticated setup page and the account cannot be edited from inside the app.
What Gets Created
- Stateful n8n Workload — Single replica serving the editor, API, and webhooks on port
5678. - Database Workloads — HA mode: a stateful Patroni PostgreSQL workload, a stateful etcd workload, and a standard HAProxy leader-routing workload. Single mode: one stateful PostgreSQL workload.
- Volume Sets — 10 GiB persistent storage for n8n instance config and binary execution data (
/home/node/.n8n), plus the database subchart’s own volume sets. - Secrets — A start-script secret that derives public URLs at runtime, plus the database credentials created by the subchart. The owner login and the encryption key are not created here — they live in the two secrets you create.
- Identity & Policy — A least-privilege policy granting the n8n identity
revealon exactly the secrets it uses, including your two pre-created secrets. - Cron Backup Workload (optional) — When database backups are enabled.
This template does not create a GVC. You must deploy it into an existing GVC.
Prerequisites
Two secrets must exist before you install. Secrets are org-level, so no GVC flag is involved.1
Create the encryption key secret
An opaque secret with encoding Set
plain whose payload is a long random key. n8n encrypts every credential it stores with it:encryptionKey.secretName to the name you used, and store a copy of the key somewhere safe outside Control Plane.2
Hash the owner password
n8n accepts only a bcrypt hash for the owner password, never plaintext, so hash it first.
htpasswd -B emits the $2y$ form, which n8n accepts:3
Create the owner secret
A dictionary secret holding exactly the keys Set
email and passwordHash:owner.secretName to the name you used.4
Read a secret back later
-o yaml is required; without it the command prints the secret’s metadata table rather than its contents:UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Upgrading From 1.0.x
Version1.1.0 moved the instance owner out of Helm values. 1.0.0 and 1.0.1 shipped the owner’s email and password as values, used exactly as written, guarding a login form that is public by default.
To upgrade an existing install:
1
Create the owner secret
Follow Prerequisites, hashing the password you log in with today so the login does not change.
2
Drop the removed keys from your values
Remove
owner.email and owner.password, and set owner.secretName instead. Leave encryptionKey.secretName, owner.firstName, and owner.lastName exactly as they are.3
Upgrade
The single replica restarts and the editor and webhooks are briefly unavailable — see Important Notes. Workflows, credentials, and execution data on the volume set are untouched.
Choosing a Database Mode
Exactly one of the two database modes must be enabled — the chart enforces this at render and fails the install with a clear message otherwise.Configuration
The defaultvalues.yaml for this template:
n8n Instance
image— The n8n container image.resources— CPU and memory for the n8n container.minCpu/minMemoryare the reservation;maxCpu/maxMemoryare the limit.encryptionKey.secretName— Name of your pre-created opaque secret holding the credential-encryption key. See Prerequisites.owner.secretName— Name of your pre-created dictionary secret holdingemailandpasswordHash. The owner is re-applied from it on every start, so editing the secret and restarting the workload is how you rotate the login — and the account cannot be edited from inside n8n. See Prerequisites.owner.firstName/owner.lastName— Display name for the owner account. These remain ordinary values; only the email and password moved into the secret.timezone— IANA timezone applied to Schedule triggers and$nowexpressions (e.g.America/Chicago).volumeset.capacity— Volume size in GiB (minimum 10) for instance config and binary execution data.
Access
publicAccess.enabled— Serve the editor, API, and webhooks on the canonical*.cpln.appHTTPS endpoint. Set tofalsefor an internal-only instance (external requests are blocked at the edge; in-GVC callers still reach it perinternalAccess).internalAccess.type— Internal firewall scope of the n8n workload:
Database
Enable exactly one ofpostgresHA (production, default) or postgres (dev/lightweight) — see Choosing a Database Mode. In both modes, change the database password before installing (postgres.credentials.password). n8n is wired to the active database automatically — the HAProxy leader endpoint in HA mode, or the single instance directly in dev mode.
If you run more than one release of this template in the same organization, give each its own postgres.config.credentialsSecretName. Secret names are organization-wide, so a second release left on the default name is refused at install and creates nothing — the first release is unaffected.
Connecting
Webhooks
Webhook URLs are derived from the canonical endpoint at startup, so the URLs shown in the editor are the ones external callers use — no extra configuration needed.Backing Up
Database backups are optional and disabled by default. Enable them withpostgresHA.backup.enabled or postgres.backup.enabled (matching your database mode), and complete the storage setup for your provider before installing. The values below are shown under backup.* — set them within the enabled database block.
- AWS S3
- Google Cloud Storage
- S3-compatible (MinIO, R2, Wasabi)
1
Create a bucket
Create an S3 bucket. Set
backup.aws.bucket and backup.aws.region to match.2
Set up a Cloud Account
If you do not have one, create a Cloud Account for your AWS account. Set
backup.aws.cloudAccountName to its name.3
Create a bucket-scoped IAM policy
Create an AWS IAM policy with the JSON below (replace
YOUR_BUCKET), then set backup.aws.policyName to the policy’s name:backup.mode selects logical (scheduled pg_dump via a cron workload) or wal-g (continuous WAL archiving). The single-instance mode takes scheduled logical dumps.
Important Notes
- Back up the encryption-key secret — losing it permanently bricks every credential n8n has stored; never change it after first boot (n8n fails to start on a key mismatch).
- Create both prerequisite secrets before installing. A missing one wedges the deployment with no log output at all; Prerequisites gives the one command that diagnoses it.
- The owner secret is authoritative at every restart — it is not a one-time bootstrap. Changing it changes the login; see Upgrading From 1.0.x.
- Change the bundled database password (
postgres.credentials.password) before installing — it is used exactly as written. It stays a value deliberately: it is internal plumbing between n8n and its own database that nobody types. - The n8n main instance is single-replica by upstream design — the default HA PostgreSQL backend removes the database as a failure point.
- Upgrades restart the single replica — expect roughly a minute of editor/webhook downtime per Helm upgrade. The first upgrade after an install also re-applies the bundled database, which can add a couple of minutes.
- Access changes take time to propagate — after toggling
publicAccessorinternalAccess, re-test over roughly 30 seconds to 5 minutes before concluding the knob is broken. - Synchronous webhook responses must finish within 30 seconds — see Webhooks.
- Uninstall deletes the database and n8n volume sets — all workflows, credentials, and execution data. Enable backups if the data matters.
- n8n is fair-code under the Sustainable Use License — free to self-host, but not OSI open source.
External References
n8n Documentation
Official n8n documentation
Environment Variables
n8n deployment environment variables reference
Webhook Endpoints
Webhook and endpoint configuration reference
User Management
Owner account and user management guide
Sustainable Use License
The fair-code license n8n is distributed under
n8n Template
View the source files, default values, and chart definition