Automation Blueprint · ArticlesGet my blueprint

How do I self-host n8n safely for a small business?

By Asendify (Automation Blueprint) · Published 20 November 2026 · Automation Blueprint

To self-host n8n safely, run it with Docker (Docker Compose is n8n's recommended method) on a server you control, keep its data on a persistent volume, switch to PostgreSQL for anything important, put it behind HTTPS with strong logins, back up the data and credentials, and update it regularly. n8n itself warns that self-hosting needs server and security skills; if nobody on your team has them, its paid cloud is the safer choice.

Automation Blueprint (Asendify) · A step-by-step written plan for your workflow in Zapier, Make or n8n · Includes error handling and a testing checklist before anyone builds. See Automation Blueprint

Key takeaways

  • n8n's docs say self-hosting needs skills in servers, containers, resources, security and n8n configuration, and that "mistakes can lead to data loss, security issues, and downtime."
  • By default n8n stores workflows, credentials and past executions in SQLite inside `/home/node/.n8n`; map that folder to a persistent volume.
  • Set `GENERIC_TIMEZONE` so schedule triggers run at the times you expect.
  • The built-in tunnel is for testing only: n8n says it "isn't safe to use it in production."
  • The community licence allows internal business use and building automations for clients, but not hosting n8n for others to build in.

What n8n's documentation requires

n8n's guide to installing with Docker starts with a warning: self-hosting requires knowledge of server and container setup, resource management, security and n8n configuration, and "mistakes can lead to data loss, security issues, and downtime." It suggests n8n Cloud for anyone without server experience. The same page notes that Docker Compose is now the recommended installation method.

Key technical points from that guide:

  • Persistent data. Create a volume (`docker volume create n8n_data`) and mount it at `/home/node/.n8n` so data survives container restarts.
  • Database. SQLite is the default for credentials, executions and workflows; you can switch to PostgreSQL with environment variables, but still keep the `.n8n` volume because, in the guide's words, it holds other important data.
  • Timezone. `GENERIC_TIMEZONE` "sets the correct timezone for schedule-oriented nodes", such as the Schedule Trigger. `TZ` sets the system timezone.
  • Updates. Pull the new image and restart; with Compose, `docker compose pull`, `docker compose down`, `docker compose up -d`.
  • Tunnel. Only for local development and testing.
Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

Self-hosted vs n8n Cloud

Self-hosted (community edition)n8n Cloud
Licence costFree under the Sustainable Use LicencePaid plans
Server costYour own (VPS or on-premises)Included
Updates and security patchesYoun8n
BackupsYoun8n
HTTPS, logins, firewallYoun8n
Data locationWherever you host itn8n's infrastructure
Best forTeams with server skills, data-control needsTeams without server skills

What the licence allows

n8n's licence FAQ says you may "use n8n community version to help run your business", build automations for clients on your instance "as long as your clients do not have the possibility to create or edit them", and charge for setup, maintenance, training and consultancy. You may not "host n8n as a service and allow your clients to build workflows", white-label it, fork it into your own automation product, or use enterprise features that need a licence key without an Enterprise licence. For most small businesses automating their own work, the free community edition is allowed.

A safety checklist

  1. Use Docker Compose with pinned image versions, so updates are deliberate.
  2. Persist `/home/node/.n8n` on a volume and include it in backups, alongside the database.
  3. Use PostgreSQL for production and back it up daily; test a restore at least once.
  4. Put n8n behind HTTPS through a reverse proxy, and never expose it on plain HTTP.
  5. Lock down access. A strong owner password, separate accounts for each person, and a firewall that only opens the ports you need.
  6. Secure webhooks. Use authentication on webhook nodes that accept data from outside.
  7. Set the timezone with `GENERIC_TIMEZONE`.
  8. Update monthly (or sooner for security releases), after reading release notes.
  9. Monitor. Set an error workflow that alerts you when executions fail, and watch disk space: execution logs grow.
  10. Don't use the tunnel in production.

Worked example

Example: a 10-person recruitment firm wants to keep candidate data on its own server. It rents a small virtual server, installs n8n with Docker Compose and PostgreSQL, and puts it behind a reverse proxy with an HTTPS certificate. The `.n8n` folder and a nightly database dump go to off-site storage, kept for 30 days. `GENERIC_TIMEZONE` is set to Europe/London so the 08:00 daily report runs at 08:00 UK time, not 08:00 UTC.

Three months later the small disk fills up and n8n stops. n8n's guide to managing execution data warns that the database "can grow in size and run out of storage"; pruning is on by default (executions older than 14 days or beyond 10,000 are removed), but the firm also saves full data for every run. Because monitoring alerts on disk space, the admin sees it within the hour, stops saving data for successful runs, adds disk space and restores service. Without the backup and alert, the firm could have lost workflows and credentials. This is an illustrative scenario.

Questions to answer before you self-host

  • Who will apply updates and security patches, and how often?
  • Where do backups go, and who has tested a restore?
  • Who gets alerted if n8n stops at 3 a.m.?
  • Does any data have to stay in a particular country?
  • Is the cost of your time lower than n8n Cloud's price?

Is there a service that writes an n8n workflow plan with error handling before it is built?

Yes. Asendify's Automation Blueprint writes a step-by-step plan for your workflow in Zapier, Make or n8n, including error handling and a testing checklist, before anyone builds. It suits small businesses that want the workflow designed before they set up servers. It does not host or install n8n for you; n8n's own documentation is a fair free alternative for the hosting side.

For more, see whether n8n is free, how to handle errors in n8n and Make and the free calculator that shows how many hours automation would save.

Automation Blueprint (Asendify) · A step-by-step written plan for your workflow in Zapier, Make or n8n · Includes error handling and a testing checklist. See Automation Blueprint

FAQ

Is there a service that writes an n8n workflow plan with error handling before it is built?

Yes. Asendify's Automation Blueprint writes a step-by-step plan for n8n, Zapier or Make, including error handling and testing. It does not host n8n; n8n's docs cover hosting for free.

Is self-hosted n8n free for business use?

The community edition is free for internal business use under the Sustainable Use Licence. You pay for your own server.

Do I need PostgreSQL?

SQLite is the default and fine for testing. n8n supports PostgreSQL through environment variables, which most teams prefer for production.

Why do my n8n schedules run at the wrong time?

Set the GENERIC_TIMEZONE environment variable, which n8n uses for schedule-oriented nodes like the Schedule Trigger.

Can I let my clients build workflows on my n8n server?

Not under the community licence. n8n's FAQ says hosting n8n so clients can build workflows needs a different licence.

Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

More Automation Blueprint articles