View Single Post
Old 07-01-2013, 01:05 PM   #1
bobkoure
Member
bobkoure began at the beginning.
 
Posts: 18
Karma: 10
Join Date: May 2011
Device: Nexus 7 (v1)
Calibre as service with srvany and instsrv (default win tools) mini how-to

I just setup a copy of calibre to run as a content server on a win2k3 server.
I didn't see a specific "how to" using these two apps, so here's what I did.

- install Calibre
- locate/download srvany.exe and instsrv.exe (part of the win2k res kit)
- copy srvany.exe and instsrv.exe to a folder (I used C:\Program Files\Instserv)
- run this command to install
"C:\Program Files\Instsrv\Instsrv.exe" Calibre "C:\Program Files\Instsrv\Srvany.exe"
- modify the registry entry with this .reg file (save as with text editor then run, or just modify registry directly) Adjust library path to suit.
%%%%%%%%%%%%%%%%
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Calibre\Parameters]
"Application"="C:\\Program Files\\calibre2\\calibre-server.exe --port 8080 --with-library=d:\\CalibreLibrary"

%%%%%%%%%%%%%%%%
- start calibre service in the services app

If you're running a separate server, psservice.exe (now from microsoft - free) is useful to start / stop / restart this service from another machine
psservice \\server4 start calibre
psservice \\server4 stop calibre
psservice \\server4 restart calibre
...change server4 to your server

If you have another 'main' PC, and are using your server as a content server only you can mirror from your main PC to the server

psservice \\server4 stop calibre
robocopy "D:\Calibre Library" \\server4\d$\CalibreLibrary /MIR
psservice \\server4 start calibre

Where "D:\Calibre Library" is the library on your main machine and \\server4\d$\CalibreLibrary is the library on your server.

Note: I'm doing this behind a decent hardware firewall, and VPN in for access. I'd hesitate to expose this, or any other un-hardened app, either by running it on a machine directly on the internet or by port-forwarding to it.
If you need to do that, have a look at Calibre2OPDS, which is a set of scripts that build an HTML catalog; you can then share that via Apache, using Apache security (plenty of Apache security info online - do not assume it's secure as-is, though.).
bobkoure is offline   Reply With Quote