Windows service - multiple tunnels


#1

Hello,

I’m trying to run multiple argo tunnels from the same host running Windows server 2016.
has anyone figured out how to do install several argo services (using a different configuration for each tunnel) ?
How to tell a cloudflared service to use a specific configuration file?
apparently it always picks the configuration from this location : C:\Windows\System32\config\systemprofile.cloudflared\config.yml

I’ve tried using sc.exe to create a windows service to execute “D:\etc\cloudflared\cloudflared.exe --config D:\etc\cloudflared\config-be-fr.yml”
but, when starting the service, it never picks-up this configuration and always look into some folders (userprofiles, etc…) for a file named config.yml and nothing else.

Am I missing something ?
thanks

briac


#2

I’m just adding screenshot of process monitor, showing the daemon looking for the configuration in the user profile folder instead of the using the one given in the command line argument.
running each service using a different user account is an option, but definitely not ideal…

thanks


#3

Thanks for the detailed description, this looks like a bug. It seems that we’re ignoring --config when run as a service. I filed and issue and we should take care of this soon.

Thanks,
Joaquin


#4

Hi btexier,

Have you tried starting the Argo Tunnel service from the Windows Service Manager, after you install it? If you double click on the service in the Services program, there should be a field called start parameters, in which you should be able to put --config <path-to-config> . This will allow you to specify a custom path to a config file. Here’s a screenshot of how the service manager should look:

Note that the service must be stopped in order to edit the start params. This solution was not in our docs- I’ll be updating those shortly.


#5

Hello,

thanks for the reply. This indeed works (the configuration is picked up), but unfortunately, this parameter is not persistent.
This means that you can’t even restart the service, or if the windows machine restarts, the service will fail at start-up, and you then need to manually open the service property again, set the config path, and start the service.

I’m afraid this won’t be an option in a production environment.

Briac