How to setup Calibre Library web server on your Debian VPS

Calibre is a popular Ebook library software to backup,restore, and organize digital prints of books (popularly called e-books). It works with many devices including Amazon Kindle, Kindle for PC software, Nook etc. A lesser known software is Calibre server which allows you to share non copyright-protected content over the internet.

The following instructions summarize how to setup Calibre library server on your Debian or Ubuntu VPS:

Login as webserver user via ssh.

Enter the following commands:

sudo -v wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
sudo apt-get update
sudo apt-get install xvfb imagemagick
mkdir ~/calibre-library
mkdir ~/calibre-library/toadd
nohup calibre-server --with-library ~/calibre-library 

Now, you will be able to access your Library at http://yourip:8080

If you need to change the default port, run this:

calibre-server --with-library ~/calibre-library --port 8180

Adding books to the library:

Copy/Upload your files to ~/calibre-library/toadd and then run:

xvfb-run calibredb add ~/calibre-library/toadd/* --library-path ~/calibre-library

Of course you can create aliases/scripts for any of these commands to automate.

References:

  1. DigitalOcean

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.