This setup gives n8n a private place to run real automations: a domain behind Cloudflare, a VPS running Docker, PostgreSQL for workflow data, HTTPS for the editor, and backups to Google Drive. It is the infrastructure layer behind form workflows, chatbots, API jobs, and internal tools.
Public traffic, containers, workflow logic, and storage are separated into clear layers so the automation workspace is easier to inspect, restart, and maintain.
Why this setup
A default n8n install can be useful for testing, but a real automation workspace needs a little more structure. The goal here was to make the server usable for private workflows, webhooks, form automations, API jobs, and internal bots while keeping the public surface understandable.
Cloudflare sits in front of the domain, HTTPS is enforced in the browser, Docker keeps services isolated and restartable, and PostgreSQL gives n8n a proper database layer instead of treating the server as a disposable demo.
This setup runs on a VPS that costs about $7 per month, roughly PHP 430, which is enough for a focused workspace with dozens of small workflows.
The server invoice is only one part of the choice. Before deploying, compare it with the subscription, backup, maintenance, recovery, and collaboration tradeoffs in the n8n Cloud versus self-hosted cost guide.
Proof screenshots
What was configured
Cloudflare DNS and proxy are used in front of the VPS, with sensitive origin details hidden from public screenshots.
n8n and supporting services run as containers so the stack can be restarted, inspected, and extended without mixing every service directly into the host.
PostgreSQL was added as the database layer for n8n. The container is newer because it was introduced as a setup refinement.
The workflow UI loads over HTTPS, so operators are not using the admin surface over plain HTTP.
The intended shape is small-business practical hardening: Cloudflare in front, HTTPS enforced, firewall rules for required access, and backups rather than an open default install.
What self-hosting does not remove
- Single-server risk: this design does not provide high availability. A VPS, disk, database, proxy, or operator failure can interrupt every workflow on the host.
- Operations ownership: someone must install security updates, monitor disk and memory, review failed executions, verify certificates, and test upgrades.
- External costs: model APIs, email, messaging, storage, and other services may still bill separately.
- Data responsibility: self-hosting changes where data is stored, but it does not automatically satisfy privacy, retention, access-control, or client-contract requirements.
Good fits
A small business that wants leads, forms, email drafts, and internal alerts running from one private n8n workspace instead of scattered one-off tools.
A VA agency or ops team running several client intake workflows from one server, with separate workflows for forms, CRM updates, reports, and review queues.
Teams that need stable public endpoints for website forms, chatbots, payment events, WooCommerce actions, Airtable updates, or Google Workspace jobs.
Teams moving recurring automations into a private workflow engine where the logic is visible, documented, and easier to inspect before scaling further.
Backup and maintenance layer
The server and n8n setup already have backups going to Google Drive. That matters because a self-hosted automation server is not only about getting n8n online. It also needs a way to recover workflows, credentials, and service data if an update, server issue, or configuration mistake breaks something.
The maintenance plan is simple: keep restore steps, update notes, and basic monitoring close to the deployment so the setup is easier to maintain over time. The practical self-hosted n8n backup and restore guide lists the exact recovery set and a safe isolated restore test.
A backup is not proven until a restore works. The recovery set must include the database, workflow and credential data, the original n8n encryption key, environment configuration, and the compose or deployment files. Test an isolated restore and record the recovery time before relying on the server for customer-facing work.
Related guide
Self-hosting changes the cost math against managed tools. For a side-by-side on what each option actually costs, read Zapier vs Make vs n8n Pricing: A Real Lead Form Example.
Need a private n8n setup?
If you already have a VPS and need n8n configured properly, this can start as one focused setup session: domain, Cloudflare, Docker, HTTPS, PostgreSQL, backups, and handover notes. If you do not have a server yet, I can map the smallest useful setup before anything is installed.
Get a setup map