Back

How to Self-Host n8n for Free

A step-by-step guide to self-hosting n8n for free with Docker — install, secure, persist data, and avoid the mistakes that lose your workflows.

How to Self-Host n8n for Free
Written by
BSH Technologies
Published on2026-06-01

Self-host n8n for free by running it in Docker on a server you control

The free route to n8n is the community edition run in Docker, either on a small cloud virtual machine or a home server. There is no licence fee — you pay only for the hosting, which can be a few hundred rupees a month or nothing at all on hardware you already own. With Docker, the whole install is a single configuration file and one command, and you get unlimited workflow executions bounded only by your machine.

Self-hosting is what makes n8n so cost-effective compared to per-task automation tools. Once it is running, every workflow you build executes for free, your data never leaves your environment, and you are not billed by the operation. The trade is that you own the upkeep — patching, backups, and uptime are now yours.

What you need before you start

Keep the prerequisites modest and the setup stays simple.

  • A server with Docker installed — a low-cost cloud VM or a spare machine at home both work.
  • Around 1 GB of RAM to start; more if you plan heavy or parallel workflows.
  • A domain name and a reverse proxy if you want secure HTTPS access from anywhere, which you should.
  • Basic comfort with the command line and editing a configuration file.

The core steps

This is the shape of a clean, durable install rather than a throwaway one.

  1. Install Docker and Docker Compose on your server.
  2. Write a Compose file defining the n8n service, a persistent volume for its data, and the environment variables for your settings.
  3. Set authentication variables so the editor is not open to the public, and configure the timezone and host URL.
  4. Bring it up with a single command, then put a reverse proxy in front to terminate HTTPS and serve it over a real domain.
  5. Confirm the editor loads over HTTPS, sign in, and build a test workflow to verify everything persists.
Persist the data volume from the very first run. The most common self-hosting regret is discovering, after a container restart, that every workflow and credential lived only inside the container and is now gone.

Secure it before you connect anything real

An exposed automation tool is a serious risk, because it holds the credentials to every service it touches. Lock it down before it does meaningful work.

  • Enable authentication so nobody can reach the editor without logging in.
  • Always serve over HTTPS via a reverse proxy; never send credentials over plain HTTP.
  • Set the encryption key explicitly and back it up, because losing it means losing access to stored credentials.
  • Restrict network access where you can, and keep the host's firewall tight.

Keep it healthy over time

Self-hosting is not set-and-forget. Update the n8n image regularly to get fixes and new nodes, but read the release notes first so a breaking change does not surprise you. Back up the data volume and the encryption key on a schedule, and test that a restore actually works before you need it. Watch resource usage — a workflow that loops or processes large payloads can exhaust memory and take the instance down. These habits are light, but skipping them is how a free, reliable tool becomes an unreliable one.

Use a database once you grow

A fresh n8n install stores its data in a lightweight embedded database, which is fine for getting started but not ideal once you are running many workflows or executing them often. The common upgrade is to point n8n at a proper PostgreSQL database, which handles concurrent executions and larger histories far more comfortably and makes backups cleaner. You configure this through environment variables before the instance holds anything important, so it is worth deciding early rather than migrating a busy instance later. Pair that with a sensible execution-data retention setting — keeping every run forever bloats storage and slows the editor — and prune old execution logs on a schedule so the instance stays responsive as the months go by.

When self-hosting stops being worth it

Self-hosting is excellent until the operational load outweighs the saving. If keeping the instance patched, backed up, and online starts eating real time, or if a workflow outage would genuinely hurt, the managed path — either n8n's cloud or a partner running it for you — becomes the rational choice. The point of free self-hosting is to save money, not to acquire a second job you did not want.

Prefer it built and managed for you?

BSH Technologies builds and operates production n8n for teams who want the power of self-hosting without owning the upkeep. We install it securely inside your environment, persist and back up everything properly, keep it patched, and build the workflows on top. To get self-hosted automation done right, talk to BSH Technologies or explore our AI & automation services.

Frequently asked questions

Is self-hosting n8n actually free?

The n8n community edition has no licence fee, so you pay only for hosting. That can be nothing on hardware you already own, or a few hundred rupees a month on a small cloud VM. Once running, every workflow executes for free with no per-task billing, bounded only by your machine.

What do I need to self-host n8n?

A server with Docker, around 1 GB of RAM to start, and basic command-line comfort. For secure access from anywhere you also want a domain name and a reverse proxy to handle HTTPS. The install itself is a single Docker Compose file and one command.

How do I avoid losing my workflows when self-hosting?

Persist the data volume from the very first run. The most common regret is finding, after a container restart, that workflows and credentials lived only inside the container and are gone. Also set and back up the encryption key, because losing it means losing access to stored credentials.

When should I stop self-hosting and use managed n8n?

When the upkeep outweighs the saving. If patching, backups, and uptime start eating real time, or if a workflow outage would genuinely hurt the business, a managed instance — n8n cloud or a partner running it — becomes the rational choice. Free self-hosting should save money, not become a second job.

Related Topics

#n8n#Self-Hosting#Docker

From the blog

View all posts
How to Build an AI Agent for Free in 2026
Applied AI

How to Build an AI Agent for Free in 2026

You can build a working AI agent for free in 2026 using n8n, open-source frameworks, and a free LLM tier. Here is the exact stack and the steps.

BSH Technologies
BSH Technologies · 2026-06-17
Best Free AI Agent Frameworks in 2026
Applied AI

Best Free AI Agent Frameworks in 2026

The best free AI agent frameworks in 2026 are LangChain, CrewAI, Microsoft AutoGen, LangGraph, and n8n. Here is how to choose between them.

BSH Technologies
BSH Technologies · 2026-06-16