Self-Hosted n8n Stack: Verified Backups, Auto SSL, Quiet Alerts by Zakaria MAMOUMISelf-Hosted n8n Stack: Verified Backups, Auto SSL, Quiet Alerts by Zakaria MAMOUMI

Self-Hosted n8n Stack: Verified Backups, Auto SSL, Quiet Alerts

Zakaria MAMOUMI

Zakaria MAMOUMI

Getting n8n to start is twenty lines of YAML. Keeping it running for a year without looking at it is the rest of this repository.
A public, MIT-licensed template for n8n and PostgreSQL on one Ubuntu VPS, behind Nginx with automatic Let's Encrypt certificates. It is built around four ways a self-hosted stack fails quietly.

Four quiet failures, designed out

The certificate stops renewing and nobody is told. The health check reads the certificate actually served on port 443, not the file on disk, and alerts 14 days before expiry.
Backups that were never restored. Every database dump is test-restored in full before it is accepted, and old backups are deleted only after a new one is complete. Restoring is one command, with a quarterly drill on a scratch machine.
The disk fills up. Container logs are capped, n8n prunes old executions, backups refuse to start when space is low, and the health check alerts at 85% of space or inodes.
Alert spam. A check must fail twice in a row before it alerts, then sends one message per change and one RECOVERED. A muted channel is the same as no monitoring.

What was verified

Every script passes ShellCheck with no findings, both compose files validate against the official Compose schema, and the Nginx startup logic was run against real nginx with missing, replaced and corrupt certificates. It has not been run end to end inside the repository itself, and the README lists exactly what to watch on a first deployment.
Want it running on your own server? I set it up at a fixed price, in writing.
Like this project

Posted Oct 18, 2026

Open-source template: n8n + Postgres behind Nginx and Let's Encrypt, verified backups, one-command restore, Telegram alerts on change only.