How to Register a New Tunnel Service on Linux

I had CF tunnel on my PC(Arch Linux) before and then I uninstalled it. Removed it from the web UI as well.

Today, I needed it one again and then I created a new one in the web UI and then installed cloudflared.

In the connector step, I run the command it gave, but there is an error. It won’t create the service, says it already exists.

I don’t understand how is this possible, as I uninstalled cloudflared already before.

The error: I get:

sudo cloudflared service install XXXXXXXXXXXXXXXXXXXXXXXXX
2023-09-07T13:47:21Z INF Using Systemd
2023-09-07T13:47:21Z ERR error generating service template error="cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are runn
ing 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 r
eally sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command"

I have run cloudflared tunnel uninstall command too, but still I can’t register the new tunnel that I just created.

Please, help me fix it.

Try sudo rm -rf /etc/systemd/system/cloudflared.service. It looks like the service file isn’t being removed when uninstalling it.