Skip to main content
← All guides

ERR_NGROK_8012: Fix ngrok’s Failed Upstream Connection

ERR_NGROK_8012 means traffic reached the ngrok agent, but nothing answered at the local address it forwards to. Start the app, confirm curl gets a response on that port, and restart ngrok with the matching port, such as ngrok http 3000. qURL™ won’t publish an app that isn’t running, so you find the problem before you send a link, not after.

Why qURL here

qURL checks that your app is answering before it publishes, then gives it no public URL and no open port, so scanners have nothing to find. Install the CLI with no account, invite people by email or send one person a link that opens once, and end access with one command. A background service keeps the share serving after you close the terminal.

See how qURL compares to ngrok →

Causes of ERR_NGROK_8012

Causes of ERR_NGROK_8012
CauseHow to spot itFix
The app is not runningcurl to the port fails with “Connection refused”Start the app, then reload the page
The ngrok command names the wrong portThe dev server prints a different port from the one in ngrok httpRestart ngrok with the port the app prints
The app listens on another address, such as IPv6 only or a container’s own networklsof shows the app on [::1] or a container address, not 127.0.0.1Point the tunnel at the exact address the app listens on, or bind the app to 127.0.0.1

Steps

  1. Confirm the app answers on its own

    ngrok’s first check for ERR_NGROK_8012 is to reach the service directly, without ngrok. If curl fails here, the problem is the app, not the tunnel: start it, or wait for the dev server to finish compiling.

    curl -I http://localhost:3000

    Check: curl prints an HTTP status line, such as HTTP/1.1 200 OK.

  2. Find the port and address the app really uses

    Dev servers move to the next port when theirs is taken, and some listen only on IPv6. On macOS or Linux, lsof lists every listening socket with its address. Match the tunnel to what it prints.

    lsof -iTCP -sTCP:LISTEN -nP
  3. Restart ngrok on the right port

    ngrok’s fix for a port mismatch is to restart the agent with the port your service uses. Update to the latest ngrok release if the error persists.

    ngrok http 3000
  4. Or share the app with qURL, which checks it first

    On macOS, install it with Homebrew. On Linux and Windows, download the package for your platform from the latest release; the CLI page lists each one. For commands with --name, qurl --version must print 4.0.0 or later. Update an older CLI before copying those commands. Nothing asks you to sign up. qurl publish refuses an app that is not running, so a broken address shows up in your terminal instead of on a recipient’s screen.

    brew install layervai/tap/qurl
    brew upgrade qurl
    qurl --version

What the recipient sees

A one-time qURL link grants access to the first person who opens it, with no LayerV account or client install.

More

qURL may show a preview before connection. Named invitees verify their email and save a passkey. Your app’s own login still applies, and your machine must stay awake with the app running.

Troubleshooting

Troubleshooting
If you seeDo this
curl works but ERR_NGROK_8012 still appearsThe tunnel and curl are reaching different addresses. If the app listens on [::1] only, localhost and 127.0.0.1 can resolve differently; point the tunnel at the address lsof shows, or start the dev server with --host 127.0.0.1.
The error appears only while the dev server restartsRequests that arrive while the app is down have nowhere to go. Reload once the server is back. A qURL share survives the restart: the CRID belongs to the address, not the process, so recipients reload once the app is back on the same port.
Show 7 more fixes
More troubleshooting
If you seeDo this
qurl publish says the local app is not accepting TCP connectionsStart the app first and check that curl works on the same address. qurl publish connects to localhost as 127.0.0.1, so if your app listens only on IPv6 (on macOS or Linux, lsof -iTCP -sTCP:LISTEN -nP shows [::1]), publish 'http://[::1]:PORT' instead, or start the dev server with --host 127.0.0.1 and publish that address. Neither requires listening on your LAN. Keep the quotes: zsh treats the brackets as a pattern.
The recipient sees “Access link invalid”The link was already used or has expired. Run qurl share again and send the new link.
The recipient sees “Resource not found”The resource was deleted after the link was made. Publish the app again, then run qurl share and send the new link.
publish rejects http://127.0.0.1 with “only HTTPS URLs are allowed”, asks you to log in, prints no Access: line, or says “unknown flag: --name”Your qURL CLI is out of date. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. After updating, qurl --version prints 4.0.0 or later, and every publish is private by default.
publish says “a public name is required” in a script or agent runAdd --name "App preview" to the publish command, replacing App preview with a short public name for your app. Recipients can see this name; keep secrets and client details out of it.
publish says this Linux session “can’t reach a systemd user manager”You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup →
publish says “Quota Exceeded” with “protected resource limit reached”, or “Your qURL account has reached a plan limit”You can see this without an account: a device with no account can keep up to 3 active resources, with links that last up to 24 hours. Run qurl list --status active, then qurl delete <CRID> for any you no longer need (it asks you to confirm; --yes skips that). qurl stop keeps the resource, so it does not free a slot.

Frequently Asked Questions

What does “upstream” mean in ERR_NGROK_8012?

The upstream is your own app: the local service the ngrok agent forwards traffic to. ngrok’s page explains that the tunnel was created and traffic reached the agent, but the agent could not open a connection to that service.

Can I show a nicer page when my app is down?

ngrok suggests a Cloud Endpoint with a Traffic Policy that serves a maintenance page instead of the error. While your app is down, recipients cannot load it through qURL. Restart the app on the same port and have them reload in their existing session. The share keeps its CRID.

Who else can reach my app while the link is open?

Opening the link gives that browser access for 1 hour by default. Other browsers on the same public IP cannot use that session. Whoever opens the link first can use it. Scripts without a browser use IP-based access, which devices on the same public IP can share. Keep your app’s sign-in for sensitive data.

Publish your app now

Install the CLI, then run one command. No sign-up, no API key.

Install the CLI →

Book a pilot

Tell us what to hide. We’ll scope a pilot.

Enterprise starts with a paid pilot on one application, typically 60 to 90 days, credited in full toward year one if you convert within 60 days. After that, an annual package sized to what you protect, not per seat.