๐ Full Setup Guide for n8n on Windows using Docker


Want to automate tasks and build workflows with n8n
on your Windows machine? This guide walks you through installing and configuring n8n
using Docker Desktop on Windows โ no domain required.
๐ฆ Prerequisites
Install Docker Desktop for Windows
๐ Download Docker DesktopEnable WSL 2 during the installation.
Restart your system once done.
Enable Docker volumes and file sharing for your drive (
C:
)Go to Docker Desktop > Settings > Resources > File Sharing
Make sure
C:\Users\YourUsername\
is listed.
โ๏ธ Step-by-Step Installation
โ Step 1: Create Project Folder
Open PowerShell or Command Prompt and run:
mkdir C:\n8n-docker
cd C:\n8n-docker
โ
Step 2: Create .env
File
Create a file named .env
inside C:\n8n-docker
with the following contents:
# Timezone
GENERIC_TIMEZONE=Asia/Kolkata
# Port
N8N_PORT=5678
# Authentication
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=yourStrongPassword123
# Host and webhook
N8N_HOST=localhost
WEBHOOK_URL=http://localhost:5678/
# Encryption key
N8N_ENCRYPTION_KEY=a_secure_random_string
# Database
DB_TYPE=sqlite
โ
Step 3: Create docker-compose.yml
Create a file named docker-compose.yml
in the same folder with the following content:
version: "3.8"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "${N8N_PORT}:5678"
environment:
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}
- N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}
- N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
- WEBHOOK_URL=${WEBHOOK_URL}
- N8N_HOST=${N8N_HOST}
- N8N_PORT=${N8N_PORT}
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
- DB_TYPE=${DB_TYPE}
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
โ
Step 4: Start n8n
with Docker
From inside the C:\n8n-docker
folder, run:
docker-compose up -d
โ
Step 5: Access the n8n
App
Open your browser and visit:
http://localhost:5678
Youโll see the login screen. Use the credentials from your .env
file:
Username:
admin
Password:
yourStrongPassword123
๐ Restart or Stop
Restart:
docker-compose restart
Stop:
docker-compose down
๐ง Optional: Enable Webhook Access from Other Devices
Want to access your n8n
instance from another device on your network?
Run
ipconfig
in PowerShell and note yourIPv4 Address
, e.g.,192.168.1.42
Update your
.env
file:
N8N_HOST=192.168.1.42
WEBHOOK_URL=http://192.168.1.42:5678/
- Restart Docker:
docker-compose down
docker-compose up -d
You can now access n8n
from any device on the same network using the new IP.
โ Done!
You now have a fully working n8n
automation server running on Windows using Docker, without needing a domain. Happy automating! ๐คโจ
Subscribe to my newsletter
Read articles from Athuluri Akhil directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
