General

A Calibre Server alternative: build your own e-book library 📕

If you love e-books, you have probably used Calibre to transfer and organise your digital library, and there is a simpler way to run your own online bookshop.

A Calibre Server alternative: build your own e-book library
Pedro MartinsPedro Martins5 min read

If you love e-books, you have certainly already used Calibre to transfer and organise your digital book library. Calibre is free software, available for Windows, Mac and Android, that lets you organise, create and transfer your e-books to your e-reader (Kobo and Kindle, among others).

Calibre Software
Calibre Software

Although the fastest way to transfer your books is to use the traditional USB cable, or even to buy from the Kindle or Kobo store, we do not always have a cable to hand!

The challenge

But how can I browse the books I have on Dropbox or Google Drive directly on my Kobo/Kindle, simply and easily, without turning to a computer or software? The idea is just to put your e-books in the cloud and, in seconds, be able to browse everything on your Kobo through a simple link that is compatible with your e-reader, given that the e-reader browser is very basic and slow!

Calibre Server & BicBucStriim

That is when I started looking into how to set up a Calibre server so I could have my bookshop online. After a few minutes of research, I found this tutorial on how to set up the server on Ubuntu. The process looked long, though, and I would still have to buy or rent a VPS simply to have my book collection online. It was perhaps a bit "overkill" for what I was after.

Since I already had a small Synology NAS (a small backup server), I started looking into how I could make use of it and install this service on a Synology NAS. I quickly found a community-built package called BicBucStriim; basically, I installed it and in less than 10 minutes I already had it online and working! The instructions for installing this package can be found at : https://github.com/rvolz/BicBucStriim and they basically come down to :

  • Log in to the NAS
  • Enable the web server, PHP and Apache
  • Copy the software folder into the "web" folder on your NAS, preferably in "web/bbs"
  • After installation visit your NAS: https://xxx.xxx.xxx.xxx/bbs

Once the installation is done and you open the plugin/add-on URL, you should see something similar to the screenshot below:

BicBucStriim
BicBucStriim

After the installation, though, I noticed that I would still need a Calibre database to use this add-on; it seemed this still was not the time I would get free of Calibre! I still did not have a simple solution...zzZZZZz. 👻

Ubooquity – Simple & Easy

After a few more minutes looking for alternative solutions, I found Ubooquity, which looked much simpler! After downloading it, I noticed it was written in Java, so it was as simple as running the .jar file! With a single click, I had an e-book server running on my computer.

There is also already a pre-built Docker image for easy installation (https://hub.docker.com/r/linuxserver/ubooquity), but we followed the tutorial for Synology NAS that can be found here, which basically comes down to :

  • Create a folder on the NAS for the software, binaries and so on.

  • Install Java 8 in Package Manager

  • Copy the Ubooquity.jar file into the folder you created (Download the file here)

  • Copy the .sh file that comes in this tutorial further down

  • Create the .ubooquity folder

  • Create a Scheduled Task to run on NAS boot to start Ubooquity

The screenshots below show some configuration examples:

( Folder creation )

Ubooquity Setup Folder
Ubooquity Setup Folder

( Task Scheduler setup )

Ubooquity NAS setup
Ubooquity NAS setup

The script used ( .sh ) for automatic execution of Ubooquity follows in this article, and we remind you that Java 8 needs to be installed; you can and should change this script to match your configuration or folder structure. If you do not know the location of the Java binary, you can go to your VPS/NAS and type "which java", which should return the path you need to enter after "JAVA_DIR"

#!/bin/sh #title : ubooquity.sh #description : Launch ubooquity server. shell script in task manager #date : 20170807 #============================================================================== ### JAVA VARIABLES ### # Java installation directory JAVA_DIR=/var/packages/Java8/target/j2sdk-image/bin # Maximum size of the Java runtime memory allocation pool. Default: 64MB MEM=512m ### UBOOQUITY VARIABLES ### # Ubooquity binary location UBOOQUITY_BIN=/volume1/Books/bin/Ubooquity.jar # Ubooquity working directory WORK_DIR=/volume1/Books/bin/.ubooquity # Ubooquity process ID file location PID_FILE=$WORK_DIR/ubooquity.pid # Ubooquity library port LIB_PORT=2202 # Ubooquity administration port ADMIN_PORT=2203 ### ENVIRONMENT VARIABLES ### # Character encoding ENCO=UTF-8 # Locale selection LANG=en_US.$ENCO ### SCRIPT ### # Workaround to read special characters properly export LANG # Kill previous process if [ -f $PID_FILE ]; then pkill -F $PID_FILE > /dev/null 2>&1 fi # Launch ubooquity printf "Starting Ubooquity server...\n" $JAVA_DIR/java -jar -Dfile.encoding=$ENCO -Xmx$MEM $UBOOQUITY_BIN \ --adminport $ADMIN_PORT --libraryport $LIB_PORT \ --workdir $WORK_DIR \ --remoteadmin --headless & UBOOQUITY_PID=$! echo $UBOOQUITY_PID > $PID_FILE printf "Ubooquity is now running (pid: %d).\n" $UBOOQUITY_PID exit 0

After saving the script, you can click "Run Now" in your Task Scheduler to run the script and check for any possible errors. If everything goes as planned, your server should be available on ports 2202 and 2203 ( Administration ).

Example : http://192.168.1.2:2202 and http://192.168.1.2:2203/admin on your local network, and you can then set up port forwarding to access it outside your network.

If you do not know how to configure a domain for your local network you can use a DDNS or follow this tutorial.

_( Ubooquity "Public" interface )

Ubooquity Interface
Ubooquity Interface

( Ubooquity "Public" interface )

Ubooquity Administration
Ubooquity Administration

Summary

The Calibre server is without doubt a good solution and is used by many people, both as a server and as a client application. Personally, though, I found it too advanced and complicated for a simple online "file directory". Ubooquity did exactly the job we expected, in a simpler and easier way. I hope you enjoyed it, and happy reading! 👋

Share this article

Related articles.

Have a project in mind?

Tell us what you need. In 15 minutes we understand your project and suggest the next step.