Cert.pem not in /root/.cloudflared/cert.pem on new install

On an existing server where cloudflared tunnel is installed a while ago, /root/.cloudflared/cert.pem exists and I am able to run cloudflared tunnel list. I am trying to spin up a new server to connect to the same tunnel but after I run cloudflared service install <token>, the tunnel is created and works but I don’t see a /root/.cloudflared/cert.pem and I am getting the error below running cloudflared tunnel list. I don’t recall if i manually installed the cert. How and when is the ~/.cloudflared/cert.pem generated?

2024-01-02T16:39:19Z ERR Cannot determine default origin certificate path. No file cert.pem in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]. You need to specify the origin certificate path by specifying the origincert option in the configuration file, or set TUNNEL_ORIGIN_CERT environment variable originCertPath=
Error locating origin cert: client didn't specify origincert path

The token is only good for running a tunnel. You need to run cloudflared tunnel login to generate the certificate.pem file.

1 Like