cloudflare/cloudflared · error
%s is neither the ID nor the name of any of your tunnels
Error message
%s is neither the ID nor the name of any of your tunnels
What it means
findID resolves a user-supplied tunnel input to a UUID: it first tries to parse it as a UUID, then falls back to looking up a non-deleted tunnel by name via tunnelActive. If neither succeeds, the input is not a valid tunnel ID in your account nor the name of an existing tunnel, so this error is raised.
Source
Thrown at cmd/cloudflared/tunnel/subcommand_context.go:376
return u, nil
}
// Look up name in the credentials file.
credFinder := newStaticPath(sc.c.String(CredFileFlag), sc.fs)
if credentials, err := sc.readTunnelCredentials(credFinder); err == nil {
if credentials.TunnelID != uuid.Nil {
return credentials.TunnelID, nil
}
}
// Fall back to querying Tunnelstore.
if tunnel, found, err := sc.tunnelActive(input); err != nil {
return uuid.Nil, err
} else if found {
return tunnel.ID, nil
}
return uuid.Nil, fmt.Errorf("%s is neither the ID nor the name of any of your tunnels", input)
}
// findIDs is just like mapping `findID` over a slice, but it only uses
// one Tunnelstore API call per non-UUID input provided.
func (sc *subcommandContext) findIDs(inputs []string) ([]uuid.UUID, error) {
uuids, names := splitUuids(inputs)
for _, name := range names {
filter := cfapi.NewTunnelFilter()
filter.NoDeleted()
filter.ByName(name)
tunnels, err := sc.list(filter)
if err != nil {
return nil, err
}
if len(tunnels) != 1 {View on GitHub (pinned to 2253eeeb25)
Solutions
- Run `cloudflared tunnel list` and copy the exact ID or name of the tunnel.
- Confirm you are logged into the right account (`cloudflared tunnel token` / cert.pem origin) — the lookup only sees tunnels under the account of your current cert.pem.
- Create the tunnel if it doesn't exist yet: `cloudflared tunnel create <name>`.
- Re-authenticate with `cloudflared tunnel login` if the tunnel lives in another account.
Example fix
// before cloudflared tunnel run my-tunel // after cloudflared tunnel list # find exact name/id cloudflared tunnel run my-tunnel
Defensive patterns
Strategy: validation
Validate before calling
out, err := exec.Command("cloudflared", "tunnel", "list", "--output", "json").Output()
if err != nil {
return err
}
var tunnels []struct{ ID, Name string }
json.Unmarshal(out, &tunnels)
valid := false
for _, t := range tunnels {
if t.ID == input || t.Name == input { valid = true }
}
if !valid { return fmt.Errorf("%q is not an existing tunnel", input) } Prevention
- Always confirm the name/ID with `cloudflared tunnel list` before referencing a tunnel.
- Prefer the tunnel UUID in scripts to avoid name/account ambiguity.
- Check which account your cert.pem belongs to before switching projects.
When it happens
Trigger: Running `cloudflared tunnel run/info/delete/route <input>` where <input> is neither a valid UUID nor the exact name of an existing non-deleted tunnel owned by the authenticated account.
Common situations: Typo in the tunnel name; tunnel belongs to a different Cloudflare account because cert.pem was issued for another account; tunnel was deleted; input references an old renamed tunnel.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- there should only be 1 non-deleted Tunnel named %s
- ErrNoTunnelID
- ErrInvalidTunnelID
- errDeprecatedClassicTunnel
- tunnelCmdErrorMessage
AI-assisted analysis of cloudflare/cloudflared@2253eeeb25 (2026-09-06).
Data as JSON: /api/errors/f4dcc794e4b2ae51.
Report an issue: GitHub.