Introduction
As technical reference material becomes digitized, the need to organize and quickly find it grows. Calibre is a feature-rich, free e-book management system that supports finding and downloading metadata, tagging, searching, and sorting your library.
Calibre is provided as a rich, desktop client application that works great on whatever computer you are using.You can even store the library on a shared folder to allow access from multiple machines. With a Synology NAS and its Disk Station Manager software you can install the Calibre OPDS (and HTML) PHP Server (COPS) web server and make the library available from anywhere.
Installation
- Install/enable DSM Web Station
- Install Apache HTTP Server
- Install PHP 5.6
- Download the latest COPS package from SynoCommunity, currently v1.0.1-5 beta
- Use the Manual Install feature in DSM Package Center to install the COPS package.
- Create a new top-level shared folder such as ‘calibre’ to hold the e-book library
Configuration
Sébastien Lucas’ wiki covers the steps to configure COPS for Synology. My notes for DSM 6.2.2 are:
- You need to ssh to your NAS
- Packages are located at
volume1/@appstore
- Websites are located at
/volume1/web
- COPS website is
/volume1/web/cops
- Copy the example local configuration file to edit with local settings:
cp /volume1/web/cops/config_local.php.example /volume1/web/cops/config_local.php
- Edit the config_local.php to specify the location of the Calibre library:
$config['calibre_directory'] = '/volume1/calibre/';
Security
If the COPS website will be exposed outside of the network follow How do I protect folders under the shared folder “web” from unprivileged access?. Here’s how to set up simple but effective user and password digest authentication:
# make a directory to hold passwords (must be accessible by Apache)
> mkdir /volume1/web/passwd
# create a digest admin password file
> htdigest -c /volume1/web/passwd/admin.pw realm admin
# create Apache hypertext access file
# see http://www.htaccess-guide.com/
> vim /volume1/web/passwd/.htaccess
AuthUserFile /volume1/web/passwd/admin.pw
AuthType Digest
AuthName "realm"
Require valid-user
# create a digest user password file
> htdigest -c /volume1/web/passwd/users.pw cops billyjoe
# create Apache hypertext access file
# see http://www.htaccess-guide.com/
> vim /volume1/web/cops/.htaccess
AuthUserFile /volume1/web/passwd/users.pw
AuthType Digest
AuthName "cops"
Require valid-user
Screenshots
COPS List View, default theme:
COPS Thumbnail View, default theme:
COPS Detailed View, default theme: