A professional-grade, containerized n8n environment optimized for performance, security, and persistence. This setup is specifically designed to support automation workflows on Apple Silicon (M1/M2/M3) or Intel Macs.
This stack orchestrates four distinct services to provide a robust, self-hosted automation engine:
- n8n (App): The primary automation engine.
- Postgres (DB): High-performance storage for workflows and execution history.
- Cloudflared (Tunnel): Securely bridges your local n8n instance to the web without opening router ports.
- Uptime Kuma (Monitor): A visual, user-friendly dashboard to track system health.
This setup employs a Hybrid Security Architecture:
- Public Access (n8n): Exposed to the web via Cloudflare Tunnel to support Webhooks (critical for connecting to external APIs). Secured by n8n’s internal authentication.
- Local Isolation (Monitor): The Uptime Kuma dashboard is restricted to
127.0.0.1:3001. It is physically inaccessible from the public internet. - Encrypted Tunnel: All external traffic is routed through Cloudflare's global network. No ports are opened on your local router.
The included installer script handles most dependencies automatically.
- macOS: Sonoma or Sequoia recommended.
- Xcode Command Line Tools: The script will prompt for installation if missing.
- Homebrew & Docker Desktop: Automatically installed/verified by the script.
- Clone this repository to your Mac.
- Make the script executable:
chmod +x create_n8n_local.sh - Run the installer:
./create_n8n_local.sh
Log in to your Cloudflare account before setting up your new n8n tunnel. The script will open the dashboard for you. Follow these visual steps:
Switch to Zero Trust Dashboard

Once n8n is live, follow these steps to activate your Community license:
Step 1: Enter your email address to receive the activation key.

Step 2: Click "Get started" to skip the onboarding questions.

Step 3: Confirm your admin email address.

Step 4: Check your inbox for the free license key.

Step 5: Continue to the n8n dashboard.

Step 6: Navigate to Usage and plan to enter your key.

Step 8: Your version is now activated for unlimited use.

After logging into your local monitor at http://localhost:3001, add these three monitors for total visibility:
- n8n App:
- Type: HTTP
- URL:
https://your-n8n.yourdomain.com
- Database:
- Type: TCP Port
- Host:
n8n_db - Port:
5432
- Tunnel Engine:
- Type: TCP Port
- Host:
cloudflared_tunnel - Port:
20241
Start/Stop:
docker compose up -d
docker compose stop






