Cannot Run Traefik.exe as Windows Service


We are trying to configure Traefik as a Windows Service using sc.config. We have successfully used the same configuration process for other Go apps like Nomad and Consul.

The command used to start the service works fine when run directly from a command prompt.

After configuration, when we attempt to start the service, Traefik also seems to operate as expected (the UI is up, active and it serves client traffic). However, the Windows executable doesn't seem to send the expected successful response to the Windows Service Manager, so after the defined service start period times the Service Manager stops the service.

I opened a bug here ... Cannot Run Traefik.exe as Windows Service · Issue #8946 · traefik/traefik · GitHub ... but the automated bot closed it and says it looks like a configuration issue, not a bug.

If anyone has successfully configurated v2.6.x to run as a Windows service without NSSM it would be very helpful to know how you got it working as NSSM isn't an option for us.