How to run Argo Tunnel as a Windows Service with the latest build?

I had 2021.8.3 installed, everything seems to be fine

but when upgraded to 2021.10.0, “–config” flag does not seems to be working

the tunnel run command keeps asking for tunnel name and cred file

I also checked document about running as a windows service, there seems to be no update to those commands, nor config file format

Would be great if you can provide me a hand here to get it going.

It looks like you may have missed the tunnel name in the shell running 2021.10.0 - Can you try running with this format:

cloudflared tunnel --config tunnels/config.yaml run <NAME>

I gave that a try prior to the post. It will just say credential file not found. Basically it would asks to provide everything from the config file, defeats the purpose of the config file.

Also, that does not explain why “ingress validation” would fail too.

Indeed, there hasn’t been anything changed recently in how we manage the config, service or anything specific to Windows.

I have tried to reproduce this, but was unable to:

Note that I created an invalid ingress rules’ config on purpose to make sure that the command would pick it.

There are few things:

  1. The error message might be misleading. A file open error would always generate the same error message. Which is tough to identify what the actual issues is. I tested with a missing config file, it is the same error message as permission issue. This would have been easier if the program would identify exactly what fails at file open operation.

  2. I moved the config.yml file over to the cloudflared default MSI install folder. Now both versions are able to read. However, I did not move the tunnel cred file over. When I run the tunnel, old version can proceed as usual and it is able to validate the file. While new version, if running with admin mode, it can proceed as well, but if I am not running admin mode, including running as “localSystem” in service setting, it would fail saying the cred file not found.

  3. Attached screenshot:

I would think this is a Windows permission issue, but if old version is able to run with all cases, why the new version is not able to? The SYSTEM user, current user and admin group all have at least read permission on the config folder (where cred file located).

Default configuration folder: C:\Windows\System32\config\systemprofile.cloudflared
Default cloudflared install folder: C:\Program Files (x86)\cloudflared

I am running tunnel on Windows Server 2012, if this is important. Also, not testing with powershell.This is a machine I just installed few days ago, I would suggest try to reproduce this issue with a refresh system and follow the guide provided from https://developers.cloudflare.com/cloudflare-one/tutorials/rdp instead of a quick test in a different environment, ie Test, dev env

Thanks!