N8n
Workflow automation with a visual editor and hundreds of integrations
n8n on Cubeship
n8n is a workflow automation tool: connect APIs, databases and services with a visual editor, and run the workflows on your own server.
This template installs it on a Cubeship instance with the managed Postgres it keeps workflows, executions and credentials in.
What it creates
- n8n — the editor and webhook endpoint, from
n8nio/n8n:2.38.7, answering on the domain you choose. - n8n-db — a managed Postgres 18 database, attached to the app.
What you are asked
| Input | What to give |
|---|---|
| Where the editor answers | A domain you control, pointed at your instance. |
| The key n8n encrypts stored credentials with | Nothing — the instance generates it and shows it once. Keep a copy: a new key cannot read credentials saved under the old one. |
After installing
- Open the domain and create the owner account.
- Webhooks are served at
https://<your domain>/webhook/….
The URLs assume the instance serves HTTPS. On an instance with TLS off, change
N8N_PROTOCOL to http and WEBHOOK_URL to start with http://.
What is not kept
The app has no disk of its own, so anything n8n writes outside Postgres is gone on the next deploy — community nodes installed from the editor, and binary data if you switch it to filesystem mode. Workflows, executions and credentials are in the database and stay.
Resources
The app is limited to 1 CPU and 1 GiB of memory. Raise limits in
template.yaml for heavy workflows.
What this creates
n8n
n8nio/n8n:2.38.7
n8n-db
Postgres 18
# yaml-language-server: $schema=https://cubeship.dev/schema/template/v1.json
version: 1
minCubeship: "0.6.0"
project: n8n
inputs:
- key: domain
type: domain
label: Where the editor answers
- key: encryptionKey
type: secret
label: The key n8n encrypts stored credentials with
help: Keep a copy. Without it, credentials saved in n8n cannot be read again.
generate: 32
databases:
- key: db
name: n8n-db
engine: postgres
version: "18"
database: n8n
apps:
- key: web
name: n8n
image: n8nio/n8n
tag: "2.38.7"
port: 5678
health: /healthz
domains:
- host: ${input.domain}
attach:
- database: db
limits: { cpu: 1, memory: 1Gi }
env:
# n8n reads its connection piece by piece, not from DATABASE_URL.
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: ${db.db.host}
DB_POSTGRESDB_PORT: ${db.db.port}
DB_POSTGRESDB_DATABASE: ${db.db.name}
DB_POSTGRESDB_USER: ${db.db.user}
DB_POSTGRESDB_PASSWORD: ${db.db.password}
N8N_ENCRYPTION_KEY: ${input.encryptionKey}
N8N_HOST: ${input.domain}
N8N_PROTOCOL: https
N8N_PROXY_HOPS: 1
WEBHOOK_URL: https://${input.domain}/