How to recover or reissue credentials JSON for existing tunnel?

What is the name of the domain?

seedflow.co.kr

What is the issue you’re encountering

Hi, I created a tunnel named SFA_ERP_vol2-tunnel using cloudflared on a previous machine.

What steps have you taken to resolve the issue?

Hi, I created a tunnel named SFA_ERP_vol2-tunnel using cloudflared on a previous machine.

Now I’ve reset my PC and lost the original SFA_ERP_vol2-tunnel.json credentials file.

When I try to re-create the tunnel via:
cloudflared tunnel create SFA_ERP_vol2-tunnel
it fails saying the tunnel already exists.

But I can’t find any way to download the existing credentials JSON via the Zero Trust dashboard (under Network > Tunnels). There is no visible “Download credentials” button in any tab — Overview, Public Hostnames, or Connectors.

I don’t have access to the original machine.

How can I recover or reissue the credentials file so I can run this tunnel again?

Thanks.

Hi,

You can do the following to recover your credentials.

  1. Make sure your are logged in on Cloudflared (You are @seedflow.auto )
  2. Run cloudflared tunnel token SFA_ERP_vol2-tunnel this will return base64 encoded variant of the credentials
  3. base64 decode the string (https://www.base64decode.org/)
  4. The decoded string will be json, update the key names like below
// Result of "cloudflared tunnel token SFA_ERP_vol2-tunnel"
eyJhIjoieHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eCIsInMiOiJ5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5IiwidCI6Inp6enp6enp6enp6enp6enp6enp6enp6enp6enoifQ==

//Base 64 decoded
{
"a":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"s":"yyyyyyyyyyyyyyyyyyyyyyyyyyyy",
"t":"zzzzzzzzzzzzzzzzzzzzzzzzzzzz"
}

//credentials.json format
{
"AccountTag":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"TunnelSecret":"yyyyyyyyyyyyyyyyyyyyyyyyyyyy",
"TunnelID":"zzzzzzzzzzzzzzzzzzzzzzzzzzzz",
"Endpoint":""
}

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.