n8n is a powerful open-source workflow automation tool that lets you connect apps, build automation workflows, and streamline repetitive tasks. Using Docker is one of the most reliable and flexible ways to install and run n8n, whether on Windows, macOS, or Linux.
In this guide, we’ll walk you through:
System requirements
Installing Docker
Running n8n with Docker
Securing your installation
Managing the n8n container
Practical use cases once n8n is running
This lets you set up n8n quickly with persistent storage and proper configuration for development or production environments.
Before you start, make sure your system meets the basic requirements:
CPU: Dual-core or better
RAM: Minimum 2 GB (4 GB recommended)
Disk Space: At least 10 GB free
Docker: Latest stable version installed
Optional: Docker Compose (for multi-container setups)
Running n8n inside Docker simplifies dependency management and gives you a consistent environment across systems.
With Docker installed, it’s time to run n8n:
Open a terminal or command prompt and run:
docker run -d --name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
Here’s what this command does:
Downloads the n8n Docker image
Runs the container in the background (-d)
Maps port 5678 to your machine so you can access n8n
Mounts a volume for persistent data at ~/.n8n
Now open your browser and visit: http://localhost:5678 You should see the n8n dashboard ready to use.
For production or shared systems, it’s important to secure your n8n instance.
Create a file named .env and add:
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=securepassword
Then run n8n with these settings:
docker run -d --name n8n \
--env-file ./.env \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
This ensures your n8n editor is protected with a username and password.
Security Note: Always avoid running an unsecured n8n instance on a public network without authentication.
Once the container is running, open a browser and navigate to:
http://localhost:5678
This is your n8n dashboard where you can start creating workflows, connecting apps, and automating processes.
Here are basic Docker commands to manage your n8n instance:
These commands help you maintain, update, and troubleshoot your containerized n8n installation.
If you are deploying more complex setups (e.g., PostgreSQL database, reverse proxy, multiple services), using Docker Compose makes your configuration easier and more maintainable. It also allows cleaner scaling and environment variable management.
The -v ~/.n8n:/home/node/.n8n volume mount ensures all workflows, credentials, and execution data are stored even after the container restarts.
Once n8n is installed and running via Docker, you can start automating a variety of tasks:
Automate Travel Bookings & Alerts Sync booking confirmations, send itinerary updates, and monitor supplier notifications.
CRM & Lead Management Automatically capture leads, follow up via emails, and update pipelines.
Marketing Automation Build workflows for campaigns, audience segmentation, and engagement tracking.
Cross-App Data Sync Seamlessly synchronize data between tools like Google Sheets, Airtable, Slack, and HubSpot.
Error Monitoring & Alerts Configure automated alerts for API failures or task errors.
These practical use cases show the power of n8n automation across teams and industries.
Installing n8n using Docker is one of the simplest and most flexible ways to get started with workflow automation. Whether you’re using Windows, macOS, or Linux, this guide helps you install, secure, and manage your n8n instance efficiently. With persistent data storage and easy configuration, Docker makes deploying n8n reliable and repeatable.
Ready to build smarter automation and integrate workflows across your business? Contact us to leverage our development and automation expertise.
Contact Us