Argo Tunnel credentials file

I have successfully setup a Argo Tunnel between Cloudflare and my origin server. I have started the process of configuring Argo to run as a service on bootup but the config.yml requires an argument setting of a credentials file. Where/How do we retrieve this file?

I reran the Argo installation to verify if I missed a .json credentials file, but I am only presented to save the .pem file. I initially thought the .pem file was the credentials file, but from what I have read, it appears that I require a .json file.

Any help is greatly appreciated.

You do need the .json file in order to establish (run) the tunnel connection. .pem file is not required in this case.

However, if you are creating new tunnels, listing existing tunnels or delete a tunnel, then you need .pem file.

I realize this, but my initial question was 'where/how do we retrieve this file?

When you first create a tunnel using cloudflared tunnel create tunnel_name, a JSON file will be created inside ~/.cloudflared folder (assume you are using Linux).

Anyway, can you share your config.yml?

I reran the installation a few times and the .json file is never created.
Below is the .yml file. I realize that I am missing the credentials line.

logfile: /var/log/cloudflared.log
filename: /etc/cloudflared/config.yml

Did you follow the instructions here?

yes I did. Let me uninstall the entire cloudflared stack and try again.

Sure. It could be outdated cloudflared installed I guess.

I did a fresh install and I was now able to get a .json file.

I tried executing cloudflared manually to verify my config file and I now get this error.

#cloudflared tunnel --config /etc/cloudflared/config.yaml run

INFO[2020-11-25T16:09:24Z] Starting tunnel 5b978f11-91aa-b669-cj77-489cf1885c55
Tunnel credentials file not found

Here is my config file.

credentials-file: /etc/cloudflared/6923305c-8fd0-4bb0-b75d-63727ba37c9c.json
tunnel: 5b978f9999aab855ca9b276cf1885c07
logfile: /var/log/cloudflared.log
filename: /etc/cloudflared/config.yml

tunnel: 6923305c-8fd0-4bb0-b75d-63727ba37c9c
url: http://localhost:80
logfile: /var/log/cloudflared.log

This should be sufficient to run a tunnel.

Is your credentials file stored in the same location as your config file?

I’ve found that if you have a file named config.yml in /etc/cloudflared, running cloudflared tunnel run (with or without the tunnel name) will run the tunnel with the config file stored in /etc/cloudflared. If the credentials file isn’t in there, it will complain about the file missing.

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