• REALIQ
  • Posts
  • How to Run n8n with Ngrok Using Docker Desktop

How to Run n8n with Ngrok Using Docker Desktop

Easy & Secure Setup Guide for Beginners

Want to self-host n8n to build powerful automation workflows — without messing with port forwarding, DNS setup, or exposing your server to the internet?

Good news: you can run n8n locally using Docker Desktop, and make it publicly accessible using Ngrok. This setup is perfect for testing webhooks, building internal tools, or giving temporary access to your automations.

✅ Ideal for developers, indie hackers, and automation fans looking for a secure, fast, and beginner-friendly way to host n8n — no firewall configs or domain names required.

What You'll Need

Create free Ngrok Account

First, head to Ngrok Signup page and create a free account. This will give you access to a public domain that tunnels traffic securely to your local machine.

If you have already created account, you can login to the Ngrok account.

Install Ngrok Package

Download the Ngrok CLI for your OS (Linux, macOS, Windows) from the Ngrok Downloads page.

Once installed, open your terminal and run:

ngrok config add-authtoken YOUR_AUTHTOKEN_HERE

This links Ngrok CLI with your account.

Note: Ngrok’s install steps might change over time, so follow their official instructions if you’re stuck.

Install n8n using Docker Desktop

We’ll use Docker Desktop to run n8n in a container. If you don’t have Docker Desktop installed, you can check out my blog and YouTube video.

Find the Official Image

Open Docker Desktop and search for n8nio/n8n in the Images tab.

  1. Click Pull to download the image

  2. After it's downloaded, click Run

  3. Once the n8n image is downloaded, click on run and select Optional settings. It should look similar to the attached image.

Set Up Optional Settings

Here’s what to configure when prompted:

Container Name

Choose a recognizable name like n8n_io

Ports

  • Host Port: 5678

  • Container Port: 5678 (leave this unchanged)

Volume Paths

  • Host Path: /home/your-username/n8n_data (or wherever you want to store your data)

  • Container Path: /home/node/.n8n

Environment Variables

Variable

N8N_EDITOR_BASE_URL

WEBHOOK_URL

N8N_DEFAULT_BINARY_DATA_MODE

Value

https://your-ngrok-domain

https://your-ngrok-domain

filesystem

Once everything is filled out, click Run and let Docker handle the rest.

Deploy your app online

Once you see that your editor is now accessible via your-ngrok-domain, go to your Ngrok account and look for Deploy your app online and go to static domain.

Copy the line of code and paste in terminal; just make sure it has 5678 at the end instead of 80.

# code will look something similear
ngrok http --url=mycoolapp.ngrok.io 5678

Visit your https://your-ngrok-domain URL in a browser, and you should see the n8n editor live and ready to use.

You now have a secure, public-facing n8n instance — running entirely on your local machine.

Final Thoughts

Running n8n with Docker Desktop and Ngrok is a lightweight, secure, and flexible way to build and test automation workflows — with no server needed.

It’s great for:

  • Workflow testing and development

  • Lightweight self-hosting

  • Quick demos or client work

Bonus: Watch the Full Walkthrough

🎥 Prefer video?
Check out the full step-by-step tutorial on my YouTube channel:

Reply

or to participate.