7030 shaares
There are two ways to run Caddy as a service on Windows: sc.exe or WinSW.
sc.exe
To create the service, run:
sc.exe create caddy start= auto binPath= "YOURPATH\caddy.exe run"
(replace YOURPATH with the actual path to your caddy.exe)
To start:
sc.exe start caddy
To stop:
sc.exe stop caddy