๐ Deploy N8N with Docker Compose ๐

Hello! I'm a DevOps Engineer dedicated to continuous learning and contributing to the tech community. If you find value in what I share, feel free to spread the word to others who might benefit as well. Your support is greatly appreciated!
๐ AI Automation Tool | How To Host n8n For Free FOREVER ๐
๐ค What is n8n?
n8n (pronounced "n-eight-n") is a powerful, free and open-source workflow automation tool that helps you connect different apps and services together. Think of it as a self-hosted alternative to tools like Zapier or Make (formerly Integgy), but with:
โ No monthly fees - Host it yourself for free forever
โ Unlimited workflows - Create as many automations as you need
โ 300+ integrations - Connect to almost any service
โ Full control - Your data stays on your server
โ Visual workflow builder - Easy drag-and-drop interface
๐ฌ Video Demonstration
๐ Prerequisites & Infrastructure Checklist
Before you begin, make sure you have the following installed on your system:
| Requirement | Version | Check Command |
| ๐ณ Docker | 20.10+ | docker --version |
| ๐ง Docker Compose | 2.0+ | docker-compose --version |
| ๐ป Operating System | Linux/macOS/Windows | - |
๐ Quick Start Guide
Deploy n8n in simple steps:
๐ Clone & Configure Repository
git clone https://github.com/meibraransari/N8N-Deploy-Using-Docker-Compose.git
cd N8N-Deploy-Using-Docker-Compose
cp -a env.sample .env && nano .env # Update the environment variables
docker compose up -d
docker compose logs -f
# Fix permission
Error: EACCES: permission denied, open '/home/node/.n8n/config'
docker compose down
# set permissions to path in env file like "DOCKER_VOLUME_STORAGE=/mnt/docker-volumes"
chmod -R 777 /mnt/docker-volumes/n8n/
docker compose up -d
docker compose logs -f
๐ Network: DNS & SSL Configuration
๐ Local Network Access
http://192.168.1.100:5678
๐ก Technitium DNS Configuration
https://dns.devopsinaction.lab/
Point domain to IP address
192.168.1.222 n8n.devopsinaction.lab
๐ก๏ธ Nginx Proxy Manager Setup
https://npm.devopsinaction.lab/
Domain Names n8n.devopsinaction.lab
Forward Hostname/IP: 192.168.1.100
Forward Port: 5678
SSL Certificate:
Force SSL: True
โ๏ธ Manual Nginx Configuration (Optional) if you have your own nginx server.
server {
listen 80;
server_name n8n.devopsinaction.lab;
return 301 https://$host$request_uri;
if ($host = n8n.devopsinaction.lab) {
return 301 https://$host$request_uri;
}
}
# HTTPS reverse proxy (Dont forget to add ssl file | letsencrypt | certbot)
server {
listen 443 ssl;
server_name n8n.devopsinaction.lab;
ssl_certificate /etc/letsencrypt/live/n8n.devopsinaction.lab/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/n8n.devopsinaction.lab/privkey.pem;
# Optional: secure SSL headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Global proxy timeouts (10 minutes)
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
send_timeout 600s;
location / {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_hide_header X-Powered-By;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
}
๐ Accessing your n8n Instance
https://n8n.devopsinaction.lab/
Fill form to create account
Email *
First Name *
Last Name *
Password *
๐ก Implementation Blueprints
Very quick quickstart
First AI agent



