Skip to content

mrdiin/n8n-gdg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 

Repository files navigation

๐Ÿš€ GDG Demo for Deploying n8n with Docker + ngrok Tunnel

This guide walks you through setting up ngrok to create a secure public URL, and then deploying n8n (the open-source automation tool) using Docker. Youโ€™ll end up with a live, accessible n8n instance you can connect to Gemini, Git, Slack, or any API.


๐ŸŒ 1. Set Up ngrok

ngrok allows you to securely expose your local server (like n8n) to the internet.

๐Ÿ”— Official Links


๐Ÿชœ Steps

1. Create an ngrok Account

Go to https://ngrok.com and sign up for a free account.

2. Install ngrok

macOS

brew install ngrok

Linux (Snap)

sudo snap install ngrok

Windows


3. Connect Your ngrok Account

After signing in, copy your Auth Token from the ngrok dashboard:
๐Ÿ‘‰ https://dashboard.ngrok.com/get-started/your-authtoken

Then run:

ngrok config add-authtoken <YOUR_NGROK_AUTHTOKEN>

4. Start the Tunnel

Run:

ngrok http 5678

Youโ€™ll see output similar to this:

Forwarding  https://a1b2c3d4.ngrok.io -> http://localhost:5678

Copy the HTTPS URL (e.g. https://a1b2c3d4.ngrok.io).
Youโ€™ll use this as your WEBHOOK_URL in the Docker command below.


๐Ÿงฑ 2. Run n8n in Docker

Now that ngrok is set up, letโ€™s deploy n8n using Docker.

โš ๏ธ Replace the placeholders (<YOUR_EMAIL>, <YOUR_APP_PASSWORD>, <YOUR_NGROK_URL>) with your own values.
Never share real passwords in public repositories or slides.

docker run -it -d --rm \
  --name n8n \
  -p 5678:5678 \
  -e GENERIC_TIMEZONE="Africa/Gaborone" \
  -e TZ="Africa/Gaborone" \
  -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
  -e N8N_RUNNERS_ENABLED=true \
  -e N8N_EMAIL_MODE=smtp \
  -e N8N_SMTP_HOST="smtp.gmail.com" \
  -e N8N_SMTP_PORT=465 \
  -e N8N_SMTP_USER="<YOUR_EMAIL@gmail.com>" \
  -e N8N_SMTP_PASS="<YOUR_APP_PASSWORD>" \
  -e N8N_SMTP_SENDER="YOUR NAME <YOUR_EMAIL@gmail.com>" \
  -e N8N_SMTP_SSL=true \
  -e WEBHOOK_URL="<YOUR_NGROK_URL>" \
  -e N8N_METRICS=true \
  -e QUEUE_HEALTH_CHECK_ACTIVE=true \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

This command:

  • Runs n8n in Docker
  • Connects it to your ngrok public URL
  • Sets up email notifications via Gmail SMTP
  • Stores persistent data in n8n_data

๐Ÿงญ 3. Access the n8n Dashboard

Once both services are running:

  • Local URL: http://localhost:5678
  • Public ngrok URL: Your generated HTTPS link (e.g. https://a1b2c3d4.ngrok.io)

You can now log in and start building automations.


๐Ÿงน 4. Stop and Clean Up

Stop the container:

docker stop n8n

Remove persistent data (optional):

docker volume rm n8n_data

โœ… Summary

Youโ€™ve successfully:

  1. Installed and configured ngrok
  2. Created a secure tunnel for your local machine
  3. Deployed n8n in Docker using that tunnel
  4. Gained a live URL for webhook testing and AI/Gemini automations

Now you can integrate n8n with Gemini, GitHub, Google APIs, Slack, and much more!

About

Repository for hosting all technical files for my GDG 2025 n8n automation presentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors