How to install Calibre Server on Ubuntu 16.04

I love using calibre to manage my ebook collection. I have installed calibre desktop app on all my devices with windows or mac  and store the library on a network share.


In order to easily  share the library with someone else or access it over web I use calibre server. On official site it is mentioned that package provided by distributions are outdated so I check on ubuntuupdates site for other versions of “calibre” in Xenial:




PPA: Kubuntu-ppa Backports


PPA: GetDeb Apps


As stated here, “GetDeb is an unofficial project with the mission to provide the latest open source and freeware applications for the current Ubuntu Linux release, in an easy to install manner.

To setup the GetDeb Apps repositories:

wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb xenial-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'sudo apt-get update

To install calibre run:

sudo apt-get update
sudo apt-get install calibre

To check for installed version

romeo@mediasrv:~$ sudo apt-show-versions calibre
 calibre:all/xenial-getdeb 2.79.1-1~getdeb1 uptodate

I use a systemd service to automaticaly start calibre server:

sudo nano /lib/systemd/system/calibre.service

 Description=Calibre Service

 ExecStart=/usr/bin/calibre-server \
 --daemonize \
 --max-cover=600x800 \
 --max-opds-items=30 \
 --max-opds-ungrouped-items=100 \
 --username=calibre \
 --url-prefix /calibre \
 --port=8080 \
 --pidfile=/var/run/ \


To start Calibre Server run:

systemctl start calibre.service

To check if Calibre Server start up correctly:

systemctl status calibre.service

To enable the service to run on every start up:

systemctl enable calibre.service

To be able to access it outside of my home network I will configure appache to proxy calibre directory to the internal site

sudo nano /etc/apache2/conf-available/calibre.conf

Insert the text:

<IfModule mod_proxy.c>
 <IfModule mod_ssl.c>
  ProxyHTMLEnable On
  ProxyHTMLExtended On
  ProxyPass /calibre/
  <Location /calibre/>
   Order deny,allow
   Allow from all

To enable new apache directory configuration:

sudo a2enconf calibre
sudo service apache2 reload

The result:

To easily secure public site I opt for one of the choices:

  1. add --password='calibre' switch when starting the calibre server by editing the /lib/systemd/system/calibre.service file.
  2. use basic authentication in apache

Use htpasswd comand to manage users to authenticate:

sudo apt-get update
sudo apt-get install apache2-utils

Use htpasswd command to generate / edit the file which stores usenames and passwords:

sudo htpasswd -c /etc/apache2/.htpasswd romeo

Edit the apache config:

sudo nano /etc/apache2/conf-available/calibre.conf

Locate for <Location /calibre> and append the folowing config:

<Location /calibre/>
  AuthType Basic
  AuthName "Authentication Required"
  AuthUserFile "/etc/apache2/.htpasswd"
  Require valid-user