Can't run n8n with docker/ngrok because of ERR_NGROK_8012

Describe the problem/error/question

I’m trying to run n8n via docker with ngronk, however it seems i’m having some troubles with port numbers. I get this error message when going to the free domain given to me by ngronk on my Firefox browser. Running localhost:5678 works fine, but not the domain.

Here’s how the .yml and .env files look like:



The edges page on ngrok shows that 1 tunnel is active.
I run this whole setup with docker.
“docker logs ngrok” in terminal drops a whole bunch of errors, i don’t know how related they are to this.

If there’s any more information I need to provide, i’ll do that as soon as I can.

Information on your n8n setup

  • n8n version: Community Edition (Registered)
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): i don’t think i changed anything
  • Running n8n via (Docker, npm, n8n cloud, desktop app): trying to run throught docker
  • Operating system: Windows 10

Hey @sves

ngrok seems to think your account is already running a tunnel and it looks like your account is limited to just the one so you may need to check in the ngrok ui to see if you have another one running that shouldn’t be.

The browser error would suggest it is being used to serve something running on port 80 that isn’t running, did you manually install ngrok as a service at some point?

ngrok dashboard in the edges section says that only 1 tunnel is running.

Not that I remember, my download history doesn’t show anything ngrok related.

Hey @sves

Is that url still valid for your account? The error here is all around ngrok so you may need to reach out to them for more details.

Yes it’s certainly active, I made sure. They had just given it to me at the time of my post.

I’ll contact ngrok and see what happens from there. Thanks for the support!

1 Like

You could try cloudflare as an option instead as well.

Hi sves, I’m from ngrok Support and wanted to try to help here. If you are having trouble, please feel free to contact us from the ngrok website for further help!

With ngrok you connect to Edges differently than starting a direct tunnel.

In your case, the easiest thing here will be to actually delete the Edge. You don’t need an Edge to use the domain, if it’s defined in your ngrok.yml, it just needs to be reserved to your account.

Also if you are using docker desktop with windows, you may need to enable host network in Docker Desktop itself (Docker Desktop version 4.34 and higher).

I ran into this issue(ERROR_NGROK_8012) endlessly on my older Mac Mini running Catalina (yes I know, old!!) and running NGROK in Docker container. I did a lot of troubleshooting and never sorted it out. Ended up running it directly on the Mac Mini (as service which restarts after reboots) and it finally works. Was never sure why the containerized version of NGROK had trouble since both it and the n8n container were on the same network and apparently talking to each other properly. I wish there was more of step by step to follow for this process but it might also be with my older hardware and software (older Docker version (4.15.0 for Catalina) but I never received errors that seemed related to that. Anyways, glad to see i wasn’t the only one with the trouble. Any insights on pulling this off in the future, I would rather run in Docker if I could?
~Dubhead

I had the same issue and I resolve it adding a ngrok.yml and use ngrok as a service. Here you are the repository https://github.com/DevilUpperCase/self-hosted-n8n-kit-with-ngrok

or this one as non githubv type fork:
https://github.com/DevilUpperCase/self-hosted-ai-starter-kit-with-ngrok

You have to run the attachngrok to the port 5678 of the n8n service. As i put on the other comment:

I had the same issue and I resolve it adding a ngrok.yml and use ngrok as a service. Here you are the repository https://github.com/DevilUpperCase/self-hosted-n8n-kit-with-ngrok

or this one as non github type fork:
https://github.com/DevilUpperCase/self-hosted-ai-starter-kit-with-ngrok

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.