Failed cloudflared.service startup

Hello, I recently tried installing cloudflared.service though my PC crashed during the installation. Now whenever I try reinstalling, it pauses infinitely after I run sudo systemctl start cloudflared. Here is the logs for when I try starting up the service. I haven't had much luck online either.
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG edge discovery: returning same edge address back to pool connIndex=0 event=0 ip=<IP>
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG Connecting via http2 connIndex=0 event=0 ip=<IP>
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG rpc rx error: context canceled
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z ERR failed to serve incoming request error="Unauthorized: Failed to get tunnel"
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z ERR Register tunnel error from server side error="Unauthorized: Failed to get tunnel" connIndex=0 event=0 ip=<IP>
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG edge discovery: returning same edge address back to pool connIndex=0 event=0 ip=<IP>
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG Connecting via http2 connIndex=0 event=0 ip=<IP>
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z DBG rpc rx error: context canceled
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z ERR failed to serve incoming request error="Unauthorized: Failed to get tunnel"
Jan 01 12:55:38 user-server cloudflared[19994]: 2024-01-01T18:55:38Z ERR Register tunnel error from server side error="Unauthorized: Failed to get tunnel" connIndex=0 event=0 ip=<IP>
1 Reply
Frosty
FrostyOP•11mo ago
@FloppyDisk 💾 how do you do this? how do you regenerate the tunnel token i mean i'll have to migrate over then right alright i'll give it a shot the command? the cloudflared tunnel login is different from the cloudflared.service i was able to auth with cloudflared tunnel login but the cloudflared.service still won't start ya this is the guide i went through i can create the tunnel locally but the background service doesn't work at all let me double check cert.pem is in this location but I don’t have any reference in it in my config in the guide they didn’t include how to reference it so this is all I have url: http://localhost:8000 tunnel: <Tunnel-UUID> credentials-file: /root/.cloudflared/<Tunnel-UUID>.json ya I do how do you find the token? when the cloudflare.service executes token run <token> regen but still the same errors as above I migrated it and ran the command and here's the error
sudo cloudflared service install TOKEN
2024-01-01T21:10:57Z INF Using Systemd
2024-01-01T21:10:57Z ERR error generating service template error="cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command"
cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command
sudo cloudflared service install TOKEN
2024-01-01T21:10:57Z INF Using Systemd
2024-01-01T21:10:57Z ERR error generating service template error="cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command"
cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command
im not sure what i did but it started working now thanks @FloppyDisk 💾
Want results from more Discord servers?
Add your server