How to Install n8n for free on local machine using Docker Desktop

Learn How to Install n8n for free on local machine using Docker Desktop in this comprehensive n8n tutorial. Step-by-step guide with video, code examples, and expert tips from the n8n Zero to Hero course.

Table of Contents

Overview

This lesson is part of the n8n AI Automation - Zero to Hero course, Section: 2. Getting Started.

Watch the video above for the full tutorial, or read the written guide below.

What is Docker-based n8n installation and why does it exist?

Docker-based n8n installation runs n8n inside an isolated container on your local machine, separating it from the host operating system to prevent compatibility conflicts. The Docker method gives you direct control over the database backend (SQLite by default, Postgres if you prefer), makes migrating to a new host straightforward, and produces a cleaner security boundary than a bare NPM install. It works on Mac and Windows via Docker Desktop; Linux users need Docker Engine and Docker Compose instead.

How to install n8n on a local Mac or Windows machine using Docker Desktop

Docker Desktop is the required prerequisite. Download it from the official Docker documentation page, choosing the Apple Silicon or Intel build if you are on a Mac. Docker Desktop is free for personal use and for companies with fewer than 250 employees and less than $10 million USD in annual revenue; larger enterprises need a paid subscription. Drag the downloaded file into your Applications folder, open it, and click "Use recommended settings" to finish setup.

With Docker Desktop running, open a terminal and run the first command from the n8n Docker documentation to create a volume named n8n_data. You can confirm it exists by opening Docker Desktop and checking the Volumes section. Then paste the second command from the docs to pull the latest stable n8n image and start the container. n8n prints a URL, localhost:5678, when the container is ready.

Open localhost:5678 in a browser. Even if you already installed n8n via NPM on the same machine, this container treats itself as a fresh installation because it is fully isolated. Fill in the owner account form, complete the onboarding survey, and optionally enter an email address to receive a free license key that unlocks workflow history, advanced debugging, execution search, and folder tagging. From Docker Desktop's Containers view you can monitor CPU and memory usage and stop or restart the container with one click at any time.

Key Takeaways

  • Docker Desktop n8n installation runs on Mac and Windows only; Linux requires Docker Engine plus Docker Compose and a separate docker-compose setup covered in a dedicated guide.
  • The n8n_data volume created by the first terminal command persists your workflows and credentials outside the container, so your data survives restarts and updates.
  • A Docker container is isolated from the host OS, so a Docker install and an NPM install can coexist on the same machine and each behaves as a completely independent instance.
  • Docker gives you the option to run Postgres instead of the default SQLite database, a level of database control the standard NPM install does not offer.
  • Self-hosting via Docker means you own security, scaling, and server configuration; the n8n cloud version handles all of that for you, making it the better choice if that responsibility feels too technical.

Next Steps

Continue your n8n journey with the full n8n AI Automation - Zero to Hero course.

Frequently Asked Questions

Docker Desktop is only available for Mac and Windows. Linux users must install Docker Engine and Docker Compose separately, then follow the docker-compose method documented in the n8n server-setup section. The n8n documentation lists this path under Server Setups alongside options for Heroku, Digital Ocean, AWS, Azure, and Google Cloud.

The Docker container is a fully isolated environment. n8n running inside the container has no access to the NPM installation's data or settings, so it treats itself as a brand-new instance and runs the complete first-time setup wizard, including the owner account form, onboarding survey, and optional license key step.

The n8n_data volume is a Docker-managed storage location that holds your n8n workflows, credentials, and execution history outside the container itself. Creating it first means your data persists across container stops, restarts, and version updates. Skipping this step would cause n8n to lose all saved data every time the container is stopped.

Docker Desktop is free for personal use and for organizations with fewer than 250 employees and less than $10 million USD in annual revenue. Larger enterprises require a paid Docker subscription. For individual learners and small teams, the free tier covers everything needed to download, run, and manage a local n8n Docker container.

Dheeraj Sharma

Dheeraj Sharma

AI Systems Builder
Creator of the n8n Zero to Hero course (42 lessons, 31+ hours). I help solopreneurs build AI systems that grow revenue without growing workload.

Get the n8n Mastery Bundle

All workflows, cheat sheets, and premium resources from the entire course in one package.

Get Premium Resources