🐛'cloudflared tunnel login' does not complete
Describe the bug 'cloudflared tunnel login' does not complete
To Reproduce I am trying to follow these instructions to create a tunnel from my localhost to a static domain created by cloudflare. Create a locally-managed tunnel (CLI) · Cloudflare Zero Trust docs I am stalled at the second step: ‘cloudflared tunnel login’ redirects me to ‘https://dash.cloudflare.com/argotunnel?aud=&callback=https%3A%2F%2Flogin.cloudflareaccess.org%2F_-asOzk-STJjLc3gdY23fYKlQ2LTM3PnsyDj2PGZsX8%3D’ But even after logging in on cloudflare from the browser, I still get ten messages like this: ‘Timestamp INF Waiting for login…’ Followed by ‘Failed to write the certificate due to the following error: Failed to fetch resource Your browser will download the certificate instead. You will have to manually copy it to the following path:’
However, the browser does not download the certificate. I have tried troubleshooting steps such as updating my browser or logging in with a different browser, to no avail. How do I solve this error?
If it's an issue with Cloudflare Tunnel: 4. Tunnel ID : none. failing before that step. 5. cloudflared config: none. failing before that step.
Expected behavior
I was expecting for cloudflared to get a certificate that would help me with the next step, 'cloudflared tunnel create', but every tunnel management command is blocked because I cannot complete the 'cloudflared tunnel login' step.
Environment and versions Apple M2 MacBook Air, macOS 14.5 cloudflared version 2024.5.0 (built 2024-05-16T14:20:06Z)
Logs and errors Other than the logs noted above there are no errors.
@aselunar I faced same issue. In my case, I clicked on the name of the domain I had registered on cloudflare. It asked me to "Authorize" the tunnel. When I clicked on "Authorize", I was told that email verification was pending. So I did that.
Once that was done, when cloudflared tunnel login opened the browser tab, I did the authorize thing right away instead of waiting for the loop of INF Waiting for login messages to appear on stdout. And that managed to save the certificate in $HOME/.cloudflare/cert.pem.
Hope it helps. :)
in the /.cloudflare/ folder you should create config.yml file then paste this
tunnel: tunnel name token:
logfile: C:\Users*****.cloudflared\cloudflared.log loglevel: info
do all of these while cloudflared service is stopped, then start again manually. you will see your tunnel become healthy status.
hello I dont know what happen in my case the browser show me "Please select the zone you want to add a Tunnel to." and I don not have any.
I am also experiencing the browser based certificate install failure using Arch Linux.
When I try to authorize my Cloudflare account with a different computer, type in my tunnel's domain name, then copy the successfully installed cert.pem to the linux server, it still does not authenticate correctly, as the generated cert is a tunnel based (not account based) token.
I've noticed while authorizing the Cloudflare tunnel that it seems to want to authorize an existing domain within Cloudflare. This does not work for me since my domain is registered with AWS with a CNAME record added pointing to the tunnel ID I originally set up.
This software has massive potential for home servers. Hoping these bugs get ironed out. Thanks for your service, whoever is fixing these issues 🫡