Skip to main content

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.

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.

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 — Owner bootstrap credentials (bcrypt-hashed), a start script that derives public URLs at runtime, and the database credentials from the subchart.
  • Identity & Policy — A least-privilege policy granting the n8n identity reveal on exactly the secrets it uses, including your pre-created encryption-key secret.
  • 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

n8n encrypts every credential it stores with a key it reads from an opaque secret that you create before installing. The key is never passed through values.
1

Generate an encryption key

Generate a long random string, for example:
2

Create an opaque secret

Create an opaque secret in your org with encoding plain whose payload is the generated key. Set its name in encryptionKey.secretName.
3

Back up the key

Store a copy of the key somewhere safe, outside Control Plane.
Losing the encryption key makes every credential n8n has stored permanently undecryptable, and the key must never change after first boot — n8n fails to start on a key mismatch. Back it up before installing.
For optional database backups, you also need a bucket and access setup for one of the supported providers — see Backing Up. Once your encryption-key secret exists, install the template using your preferred method:

UI

Browse, install, and manage templates visually

CLI

Manage templates from your terminal

Terraform

Declare templates in your Terraform configurations
Pulumi Icon Streamline Icon: https://streamlinehq.com

Pulumi

Declare templates in your Pulumi programs

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 default values.yaml for this template:

n8n Instance

  • image — The n8n container image.
  • resources — CPU and memory for the n8n container.
  • encryptionKey.secretName — Name of your pre-created opaque secret holding the credential-encryption key. See Prerequisites.
  • owner.* — The instance owner account, created automatically on first boot. Because the owner is managed through the environment, there is no unauthenticated setup page at any point. Change owner.password before installing. To rotate it later, change the value and run a Helm upgrade — the new password takes effect on the restart.
  • timezone — IANA timezone applied to Schedule triggers and $now expressions (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.app HTTPS endpoint. Set to false for an internal-only instance (external requests are blocked at the edge; in-GVC callers still reach it per internalAccess).
  • internalAccess.type — Internal firewall scope of the n8n workload:

Database

Enable exactly one of postgresHA (production, default) or postgres (dev/lightweight) — see Choosing a Database Mode. In both modes, change the database password before installing (postgresHA.postgres.password / postgres.config.password). n8n is wired to the active database automatically — the HAProxy leader endpoint in HA mode, or the single instance directly in dev mode.

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.
Synchronous webhook responses must finish within 30 seconds — the platform edge times out longer responses with a 504, although the workflow itself still runs to completion. For long-running workflows, set the Webhook node to respond immediately (or add a Respond to Webhook node early) so the caller gets its response right away while the workflow keeps running.

Backing Up

Database backups are optional and disabled by default. Enable them with postgresHA.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.
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:
In HA mode, 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).
  • Change owner.password and the database password (postgresHA.postgres.password / postgres.config.password) before installing.
  • 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.
  • 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