Running Pen as a native Windows service - UlricE/pen GitHub Wiki
Pen 0.26.0 and up can be built as a native Windows service, i.e. no dependency on Cygwin.
This example is for cross-compiling with Mingw under Debian. YMMV, etc.
apt-get install mingw-w64
tar zxfv pen-0.28.0.tar.gz
cd pen-0.28.0
make -f Makefile.win
This will create pen64.exe (64-bit) in the X64 directory and pen32.exe (32-bit) in the X86 directory. Copy one of the executables to a directory (called \pen in this example) on your server. Open a cmd window and type:
cd \pen
pen64 -i pen
This installs the service. It will read its configuration from the file pen.cfg located in the same directory as the executable. Create the file using notepad:
debug 1
listen 8080
server 0 address myserver1 port 80
server 1 address myserver2 port 80
Restart the service to make pen reload the configuration.
Debugging output goes to the file syslog.txt in the same directory as the executable.