Post

n8n

n8n

n8n

Purpose

n8n is the workflow automation tool used across the homelab. Runs as a single Deployment in the default namespace of the k3s cluster, fronted by Traefik, and is managed by ArgoCD.

Deployment

ItemValue
Namespacedefault
Imagen8nio/n8n:2.45.2 (pinned in the manifest; Renovate opens a PR for each new version)
Replicas1 (strategy: Recreate)
Nodex86 k3s LXC nodes (nodeSelector kubernetes.io/arch: amd64 + picluster/lxc: "true"); follows its local-zfs volume
Container port5678
Resourcesrequests 100m/384Mi, limits 500m/768Mi
StoragePVC n8n-data-zfs, 5Gi, storageClassName: local-zfs → /home/node/.n8n
Reloaderreloader.stakater.com/auto: "true"

strategy: Recreate is used instead of the default rolling update: the pod is pinned to one node and holds a ReadWriteOnce PVC, so a rolling update would just get stuck waiting on the old pod to release the volume.

Database: Postgres, not SQLite

n8n is configured with DB_TYPE=postgresdb, pointed at postgres.default.svc.cluster.local:5432, database n8n, credentials from the shared postgres-secret. Workflow, credential, and execution data live in Postgres — the PVC only holds n8n’s own local state (encryption-scoped credentials, binary data). Credentials are encrypted with N8N_ENCRYPTION_KEY, stored in the n8n-secret Secret.

Ingress

Traefik IngressRoute, TLS via the shared local-example-com-tls wildcard cert, routes to the n8n ClusterIP Service on port 5678:

  • n8n.prod-k3s.homelab.example (middleware: default-headers)

GitOps

Managed by ArgoCD (Application in argocd/apps/n8n.yaml), watching the k3s branch of gitea.git.homelab.example/bjones/n8n with prune: true and selfHeal: true — changes are made by committing to that branch, not by running kubectl apply by hand. This deployment replaced an earlier Docker Compose + SQLite setup; workflow data was not automatically migrated between the two.

This post is licensed under CC BY 4.0 by the author.