Cloudflare Tunnel error: "Could not start Cloudflare tunnel, max retries reached."

I haven’t changed anything in my app code since yesterday and today when I try to do npm run dev i get the following error:

error
│ Could not start Cloudflare tunnel, max retries reached. │
│ │
│ What to try: │
│ • Run the command again │
│ • Add the flag --tunnel-url {URL} to use a custom tunnel URL

I notice that cloudflare has some tunnel issues currently according to https://www.cloudflarestatus.com/, but I really need to work on my app. Is there a way to get around this or use an alternative?

1 Like

As a workaround, you can manually create a tunnel with another provider and pass the URL. For example, with Ngrok:

  • Install Ngrok from https://ngrok.com/download
  • Run ngrok http 3000 from the terminal and copy the generated URL for the next step
  • npm run dev -- --tunnel-url [https://example.ngrok.com:3000](https://example.ngrok.com:3000/)