From a67fc54ab30af5402dac7be827c74ebd2eca03cb Mon Sep 17 00:00:00 2001 From: devil1591 Date: Mon, 19 Sep 2016 21:38:36 +0200 Subject: [PATCH] Added windows service for Caddy with NSSM --- Caddy-as-a-service-examples.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Caddy-as-a-service-examples.md b/Caddy-as-a-service-examples.md index d25a12a..bbf27ff 100644 --- a/Caddy-as-a-service-examples.md +++ b/Caddy-as-a-service-examples.md @@ -7,4 +7,14 @@ For example: Ubuntu 16.04, Coreos 1029.0.0, Debian unstable sid (not 8.0), Fedor ### FreeBSD rc.d -Example for an init script on FreeBSD: https://gist.github.com/dprandzioch/f3a0bc4ebde3efd5c2a4 \ No newline at end of file +Example for an init script on FreeBSD: https://gist.github.com/dprandzioch/f3a0bc4ebde3efd5c2a4 + +### Windows + +You can use [nssm.cc](https://nssm.cc/) in order to automaticaly lauch, and restart if crashed Caddy. +First download both NSSM and Caddy then extract them to c:\myserver\ +Then install Caddy as a service by entering the following commands in your Terminal: +`c:\myserver\nssm.exe install Caddy c:\myserver\caddy.exe` +`c:\myserver\nssm.exe set Caddy AppDirectory C:\myserver\` + +