Skip to content
itsorted.online
Automation guide

Self-Hosting n8n or Other Automation Tools: A Security Checklist

Self-hosting n8n on a small cloud server is cheap and flexible, but the server ends up holding API keys and passwords for every system your workflows touch. In 2026 CSA issued several alerts about n8n vulnerabilities that could allow remote code execution, and its CARBONATO advisory showed how exposed Docker servers get taken over. This checklist covers what a small business must get right when self-hosting n8n or similar tools: authentication, updates, the credential encryption key, backups and network exposure, and when a paid cloud plan is the cheaper choice once you count the risk.

By IT Sorted teamReviewed 7 min readHow we write guides
in

Key takeaways

  • CSA issued n8n alerts in 2026, including a critical remote code execution flaw in February.
  • Several 2026 n8n flaws needed only workflow-edit rights, so limit who can build workflows.
  • n8n encrypts stored credentials with a key; lose it and your credentials cannot be decrypted.
  • Back up the database and the encryption key together, and test a restore.
  • n8n Cloud starts at EUR 20 a month billed annually, often less than the time to maintain a server.
In this guide · 8 sections
  1. 01Why a self-hosted automation server is a high-value target
  2. 02Authentication in front of n8n
  3. 03Updates: the part that decides whether self-hosting is safe
  4. 04The encryption key and credentials
  5. 05Network exposure: the CARBONATO lesson
  6. 06Backups and when n8n Cloud is cheaper
  7. 07Do it yourself or get help?
  8. 08Frequently asked questions

Short answer

Put n8n behind HTTPS with user accounts and 2FA, update it promptly after every security release, store the N8N_ENCRYPTION_KEY safely and back it up with the database, and never expose the Docker API or database ports to the internet. If nobody can own updates, use n8n's cloud plan instead.

Why a self-hosted automation server is a high-value target

An automation server is a key ring. Each workflow needs credentials: your email account, Google Drive, Xero, Stripe, a CRM, an AI provider. n8n stores them in its database, encrypted. Anyone who takes over the server can often use or decrypt them, and then reach every connected system.

That risk was not theoretical in 2026. CSA published alerts on n8n vulnerabilities through the year:

CSA alertDateWhat it covered
AL-2026-0116 Feb 2026Critical flaw (CVE-2026-25049) allowing full remote code execution; fixed in 1.123.17 and 2.5.2
AL-2026-05722 May 2026Multiple flaws where a user able to create or edit workflows could reach code execution or read server files
Always check CSA's alerts page and n8n's release notes for the current fixed versions.

CSA's February alert also suggested temporary mitigations if patching was delayed: limit workflow creation and editing to fully trusted users, and run n8n with restricted operating system privileges and network access.

Authentication in front of n8n

n8n's securing guide lists the built-in controls: user management, SSL, SSO, two-factor authentication, security audits, disabling the public API and blocking specific nodes.

Access controls

Webhook and form URLs have to be reachable for workflows to run, so they are public by design. Treat every public workflow trigger as an entry point: validate input, and avoid passing form data straight into code or commands.

Updates: the part that decides whether self-hosting is safe

Self-hosting means you are the one who applies security releases. If an n8n update ships on a Tuesday, your server stays exposed until someone upgrades it.

  1. Pin a version, but track it

    Use a specific n8n image tag rather than "latest", so updates are deliberate, and record which version is running.

  2. Subscribe to security notices

    Watch n8n's release notes and CSA's alerts. Decide in advance who reads them and who upgrades.

  3. Back up before every upgrade

    Database plus encryption key, so a failed upgrade can be rolled back.

  4. Upgrade within days for security releases

    Test a couple of key workflows afterwards. Major version jumps need more testing; read the migration notes first.

  5. Update the host too

    The operating system, Docker and the reverse proxy all need patching, not only n8n.

The encryption key and credentials

n8n's encryption key documentation explains that n8n creates a random key on first launch, saves it in the .n8n folder, and uses it to encrypt credentials before saving them to the database. You can set your own with the N8N_ENCRYPTION_KEY environment variable, and in queue mode every worker needs the same key.

  • Back it up separately and securely. Without the key, a restored database cannot decrypt your credentials.
  • Do not commit it to Git or paste it into shared documents. Keep it in a password manager or a secrets store.
  • Rotate it when needed. n8n's securing guide includes a procedure for rotating encryption keys.
  • Use least-privilege credentials. Give each workflow an API key with only the access it needs, not an admin account.

Network exposure: the CARBONATO lesson

Most self-hosted n8n runs in Docker. In September 2026, CSA's CARBONATO advisory described a botnet taking over servers whose Docker Remote API was open to the internet without authentication. Our CARBONATO guide explains how to check for it.

Docker's own guide to protecting the Docker daemon socket says Docker uses a non-networked Unix socket by default, and that remote access should be protected with SSH or TLS. For a small n8n server, the rules are simple:

Reachable from the internet

  • Port 443 for the n8n interface and webhooks, through a reverse proxy
  • SSH, ideally restricted to your IP and key-only login

Never reachable from the internet

  • The Docker API (ports 2375 and 2376)
  • The database port (Postgres 5432 or similar)
  • n8n's internal port 5678 directly
  • Redis or other queue services

Set these rules in your cloud provider's firewall, not only on the server, so a misconfigured container cannot open a port by accident.

Backups and when n8n Cloud is cheaper

Back up the database and the encryption key on a schedule, keep at least one copy off the server, and restore it to a test machine once so you know it works. Export important workflows as JSON as a second safety net.

Then compare costs honestly. n8n's pricing page lists cloud plans from EUR 20 a month (Starter, 2,500 workflow executions) and EUR 50 a month (Pro, 10,000 executions), both billed annually, as of October 2026. A small server costs less in cash, but someone has to watch alerts, upgrade, patch the host and test backups, every month.

If n8n feels like more than you need, our Zapier vs Make comparison covers fully managed alternatives.

Do it yourself or get help?

If you or someone on the team is comfortable running Linux servers, self-hosting n8n with the checklist above is reasonable. If not, the safest choice is a managed cloud plan, so security releases are applied for you.

If you would rather not run a server at all, our Workflow Automation (S$390 per workflow) builds workflows in your own Make, Zapier or Apps Script account with error alerts and documentation. Our Security Health Check (S$290) gives a written, risk-ranked review of your domain, website, email and Microsoft 365 or Google Workspace settings, a useful check if automation credentials may have been exposed.

Frequently asked questions

It can be, if someone owns it. That means HTTPS with user accounts and two-factor authentication, prompt updates after every security release, a backed-up encryption key, and firewall rules that keep the Docker API and database off the internet. Without a named person doing that, a managed cloud plan is usually safer.

n8n uses it to encrypt the credentials your workflows use before saving them to the database. n8n creates one automatically on first launch, or you can set N8N_ENCRYPTION_KEY yourself. If you lose it, a restored database cannot decrypt those credentials, so back it up securely alongside your database backups.

Apply security releases within days, and review other updates at least monthly. CSA issued several n8n alerts in 2026, including a critical remote code execution flaw in February. Back up the database and encryption key before each upgrade and test key workflows afterwards.

Usually only HTTPS on port 443 through a reverse proxy, plus SSH restricted to your own IP addresses. The Docker API, the database, Redis and n8n's internal port 5678 should never be reachable from the internet. Set this in your cloud provider's firewall as well as on the server.

In cash, self-hosting a small server is often cheaper. Once you count the monthly time for updates, host patching, backup checks and urgent security releases, n8n Cloud, from EUR 20 a month billed annually as of October 2026, is often the better value for a small team without server experience.

Rather have it done for you?

Fixed price, set up in your own accounts.

Order online, get a written scope, and keep full ownership of everything we set up. Questions first? Ask us in writing.