Are you looking for a way to run n8n—the open source workflow automation tool—without spending a dime on hosting or reverse proxies? In this guide, I’ll show you how to set up n8n for free using Docker and the n8n Community Proxy (MCP), so you can build and run automations from your own machine with public webhook access.
I've personally tested and documented this solution on GitHub: https://github.com/encryptedtouhid/n8n-docker-mcp-zero-cost
What You’ll Need
- Docker installed on your server, VPS, or local PC
- Basic command line knowledge
- An account at n8n Community for MCP
Step 1: Pull the Latest n8n Docker Image
docker pull n8nio/n8n
Step 2: Create a Docker Volume for Data Persistence
This ensures your workflows and credentials remain safe after container restarts.
docker volume create n8n_data
Step 3: Start n8n with Docker
docker run -it --rm \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
n8n will now be available at http://localhost:5678
.
Step 4: Set Up Community Proxy (MCP)
The n8n Community Proxy (MCP) lets you securely expose your local n8n instance to the public internet—ideal for webhooks and integrations—without needing to pay for a reverse proxy service or set up your own.
- Sign up at n8n Community and go to the MCP Proxy page.
- Copy the MCP Docker command from the page. It should look like this:
docker run -it --rm \
--network="host" \
-e N8N_HOST=localhost \
-e N8N_PORT=5678 \
-e N8N_PROTOCOL=http \
-e MCP_TUNNEL_SUBDOMAIN=yourusername \
n8nio/community-proxy
Replace yourusername
with your unique desired subdomain.
- Run the MCP container in a new terminal. This will give you a public URL like
https://yourusername.community.n8n.io/
which forwards requests to your n8n instance.
Step 5: Use Your Public Webhook URL
Whenever you create a workflow with a webhook trigger in n8n, use your MCP-based URL:
- Example:
https://yourusername.community.n8n.io/webhook/your-endpoint
Optional: Docker Compose Setup
If you want to manage both containers together, use Docker Compose:
version: '3'
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
mcp:
image: n8nio/community-proxy
network_mode: host
environment:
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- MCP_TUNNEL_SUBDOMAIN=yourusername
volumes:
n8n_data:
Start both services with:
docker compose up -d
Reference Implementation
For a step-by-step implementation, troubleshooting, and extra tips, see my public repository:
https://github.com/encryptedtouhid/n8n-docker-mcp-zero-cost
Conclusion
With this setup, you get a fully functional, zero-cost n8n automation system with public access for webhooks—no cloud costs, no paid proxy, and the flexibility of self-hosting. Perfect for personal projects, learning, and prototyping!
Note: The Community Proxy is designed for light to moderate use. For sensitive or production workflows, consider setting up your own secure reverse proxy and HTTPS.
Happy automating with n8n!