How can I run Argo Tunnel with config.yml?

Argo Tunnel doesn’t work only when using configuration file.

I followed the instructions,

  1. created tunnel: cloudflared tunel create tunnalname
  2. made config-test.yml:
  3. tried to run tunnel: cloudflared tunnel --config config-test.yml run

contents of config-test.yml is below:

hostname: tunnelname.example.com
url: https://192.168.10.225/
tunnel: e9b48ca4-c636-4dd5-b5db-ac1aebc83507
credentials-file: /root/.cloudflared/e9b48ca4-c636-4dd5-b5db-ac1aebc83507.json

But it doesn’t work well and Error 1033 is displayed.

however cloudflared tunnel --hostname tunnelname.example.com --url https://192.168.10.225/ tunnelname works fine.

How can I run with configuration file?

Hello @kei.misawa ,

There are 2 kinds of tunnels:

  • classic tunnels, which are deprecated, and which provision DNS records on every connection; these are used when you do not use the run keyword, and require hostname config
  • named tunnels, which are recommended, and have simpler reconnection (more reliable); these are used when you use run keyword

I recommend the 2nd way, for which the documentation has every step: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps

In particular, this bit:
image

Based on your steps, you did not perform step 2.

When you ran the command with all arguments in the CLI, you ended up running a classic tunnel (which provisions DNS on every connection, less reliable) and hence why it worked.

PS: you will probably need to access your dash.cloudflare.com → zone → DNS and delete the DNS record for your tunnelname.example.com because it will be pointing to the classic tunnel and the Named Tunnels step 2 will try to write that (and will give you an error that it cannot overwrite it)

2 Likes

Hello @nuno.diegues ,

As you said, I forgot the step 2. Now it works correctly.
Thank you very much!

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