App template
n8n PostgreSQL
Workflow automation with PostgreSQL and separate code runners.
- Memory when idle
- about 430 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 servers
Introduction
n8n is a workflow automation tool. You connect apps and services with nodes, and n8n runs the workflows on a trigger or a schedule.
This template runs one n8n behind your domain, with its own PostgreSQL database. Code nodes run in a separate task-runner Pod. The owner account is created at the start, so there is no setup screen.
Values you provide
Owner emailRequired
Owner email; account is provisioned before first public request.
Made for you
These values are generated at deploy and kept in a Kubernetes Secret, shown as Secret/key.
- n8n-secrets/owner-password
- n8n-secrets/encryption-key
- n8n-secrets/runner-token
Getting started
-
In Zeabur OSS, open the
n8nservice. When Overview shows its replica as ready, the service is up. Its domain is on the Networking tab under Public domains. It is the domain you entered in the install form, for examplen8n.example.com. -
Sign in with the owner email you entered in the install form. Get the password from the
n8nservice: open Variables, clickn8n-secretsunder From config files and secrets, and click the eye icon next toowner-password. Without Zeabur OSS, read Secretn8n-secrets, keyowner-password, with kubectl:kubectl -n <namespace> get secret n8n-secrets -o jsonpath='{.data.owner-password}' | base64 -d -
Keep a copy of the encryption key in a safe place. n8n encrypts the credentials it saves with this key. Find it the same way: on Variables, click
n8n-secrets, then the eye icon next toencryption-key. Without Zeabur OSS, read Secretn8n-secrets, keyencryption-key, with kubectl:kubectl -n <namespace> get secret n8n-secrets -o jsonpath='{.data.encryption-key}' | base64 -d -
Secret
n8n-secretsalso holdsrunner-token, the shared secret that n8n and the task runner use to trust each other. You do not need it for daily use. Show it the same way on Variables. Without Zeabur OSS, use kubectl:kubectl -n <namespace> get secret n8n-secrets -o jsonpath='{.data.runner-token}' | base64 -d
Configuration
Change the owner password
n8n sets the owner account from the install form and the Secret at every start, and shows the owner details as read-only in its interface. To change the password, open Variables on the n8n service, click n8n-secrets under From config files and secrets, and enter a new value for owner-password. Review and apply, then click Restart at the top of the service page.
See Change the instance owner email in the n8n docs.
Call a workflow with a webhook
The Webhook node has two URLs. The test URL works while you select Listen for Test Event, and shows the incoming data in the editor. The production URL works after you publish the workflow. Both start with your domain. See Webhook node in the n8n docs.
Back up or move the data
n8n keeps workflows, credentials and execution history in the n8n-db database. The n8n-data volume, mounted at /home/node/.n8n, holds files such as binary data. A backup needs the database, the encryption key, the workflow files and, to move to another n8n, an export of your workflows and credentials.
-
Back up the database. In the project, open the
n8n-dbdatabase. Under Backups, set up S3 backups. To get a file instead, click More → Export. See Create, back up, and restore databases and Download a database dump in the Zeabur OSS docs. -
Keep the encryption key from Getting started. Without it, n8n cannot read the saved credentials.
-
Export the workflows and credentials. Click Terminal at the top of the
n8nservice page and run:n8n export:workflow --backup --output=/home/node/.n8n/backups/workflows/ n8n export:credentials --backup --output=/home/node/.n8n/backups/credentials/Then open the Files tab of the
n8nservice and download these two folders. Do not download the whole volume. A big folder can time out. -
Copy the files that workflows saved. This template stores them on the volume, in
/home/node/.n8n/binaryData, and neither the database nor the export holds them. The folder can be big, so stream it to your machine with kubectl instead of the Files tab:kubectl -n <namespace> exec deploy/n8n -c n8n -- busybox tar czf - -C /home/node/.n8n binaryData > n8n-binary-data.tgzTo put it back on a new
n8n, runkubectl -n <namespace> exec -i deploy/n8n -c n8n -- busybox tar xzf - -C /home/node/.n8n < n8n-binary-data.tgz. See Binary data environment variables in the n8n docs.
To move to another n8n, upload the two folders on the Files tab of the new n8n service and run the import with Terminal:
n8n import:workflow --separate --input=<workflows folder>
n8n import:credentials --separate --input=<credentials folder>
The new n8n must use the same encryption key, or it cannot read the credentials. If it cannot, add --decrypted to n8n export:credentials. That file holds the credentials in plain text, so delete it after the import. The export holds no users, execution history, variables or instance settings.
See Back up and restore and Use the command line in the n8n docs.
Troubleshooting
The page shows 502, does not load or keeps reconnecting
Open the n8n service in Zeabur OSS. Check that Overview shows its replica as ready, then read the Logs tab. If the replica is not ready, open Deployments and switch to Events. If Events show OOMKilled, the service ran out of memory. Raise Maximum memory under Settings → Compute. A service that is slow or keeps reconnecting is often short of memory too, so check Events and Maximum memory for it as well. If the domain or the certificate stays pending, see Troubleshooting on the domains page.
See Adjust replicas, resources, and health checks and View logs, events, and usage, and open a terminal in the Zeabur OSS docs.
A Code node does not run
Code nodes run in the task-runner service, which connects to n8n with runner-token. Open the task-runner service in Zeabur OSS, check that Overview shows its replica as ready, and read the Logs tab.
See Task runners in the n8n docs.
Resources
Each service is guaranteed the first amount and can use up to the second.
n8n
Ports
5678, 5679
CPU
0.2 cores to 2 cores
Memory
512 MiB to 2 GiB
task-runner
Ports
5680
CPU
0.1 cores to 1 core
Memory
256 MiB to 1 GiB
n8n-db
Ports
5432
CPU
0.1 cores to 1 core
Memory
256 MiB to 1 GiB
Technical details
This release
- Version
- 3.2.2
- Licence
- LicenseRef-n8n-sustainable-use AND PostgreSQL AND Apache-2.0
- Homepage
- github.com
- Source file
- templates/n8n/template.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| kind | linux/amd64 | v1.37.0 | 430 MiB |
Security
Everything runs in its own namespace. Images are pinned by digest and workloads run as non-root users. Network access is kept to the minimum. There are no default passwords.
Known risks
Risk
n8n uses the Sustainable Use License. You can read the source, but it is not OSI-approved open source. Enterprise files have separate terms.
How it is handled
The template description names the license. Deploy only for permitted internal business, personal or noncommercial use. To resell hosted n8n, you need a separate agreement with n8n.
Risk
Workflow authors can call outside providers, install code or build powerful integrations.
How it is handled
Only let trusted people be administrators. The task runner (the part that runs workflow code) is isolated, has no Kubernetes token and has a read-only filesystem. It cannot read environment variables. The dangerous executeCommand and localFileTrigger nodes are removed. Outbound traffic is not limited, so add an egress NetworkPolicy (a rule that limits outbound traffic) to keep workflows away from private addresses. Community package tools are enabled, so administrators must check each package they install.
Risk
On a public instance that is not set up yet, the first visitor could claim the owner account.
How it is handled
The template uses the managed-owner variables (n8n v2.17 and later). A bcrypt hash (a one-way scrambled form) of the generated Secret is set before n8n starts. The deployment variables set the owner email and password again at each restart. Public sign-up stays closed.
Risk
The database pods (CloudNativePG) must call the Kubernetes API with an identity that the database operator creates.
How it is handled
The cloudnative-pg component creates separate permissions for each database cluster. This exception never applies to the n8n and task-runner Pods.
Risk
No SMTP server is configured.
How it is handled
Email invitations and password-reset mail do not work until you configure SMTP in n8n.
What the cluster needs
Zeabur OSS suggests the components a cluster is missing. Without it, install them first.