Another day, another self hosted thing. This weekend, I was Installing Calibre and Calibre-Web Using Portainer and learnt a thing or two. So I thought I would write a simple post on how to be installing Calibre and Calibre-Web Using Portainer and then how to use a 3rd party app on your iPhone to read ebooks.
Table of Contents
About Calibre and Calibre-Web
Calibre is a very popular open-source eBook management software that provides a web-based interface to manage and read your Calibre library remotely. I was first introduced to it when I had my first ebook reader aka Sony PRS505. Subsequently I am even more familiar when I purchased my many Kindle ebook readers. But recently I am reading even more when I purchased the BOOX Palma Mobile ePaper Reader !
Calibre-Web, on the other hand, was rather new to me as I don’t need it in my ebook workflow so far.
- Calibre: A versatile application that lets you manage eBooks, convert between formats, edit metadata, and transfer books to eReaders. It also includes an eBook viewer and allows you to organize your library efficiently.
- Calibre-Web: An alternative lightweight front-end for Calibre’s library. It enables you to host your eBook library on a server and provides a clean, user-friendly web interface for browsing, reading, and downloading books. It supports user authentication and book searching, making it a great solution for sharing your library with others.
However, I have been running Calibre on my MacBook Air, mostly to convert ebook formats and quite recently to REDUCE the size of the ePubs that I have downloaded.
I have decided, just like using self-hosting Jellyfin on my Synology, to try to self host my ebooks on Calibre as a Docker on Synology.
Installing Calibre Using Portainer on a Synology
As usual, I am using Portainer to start a stack to install Calibre on my Synology DS1520+.
Here’s my Docker Compose File. I shamelessly copy it from Marius Hosting’s excellent article on “Synology: Install Calibre With Portainer“. The main difference, besides the PUID, PGID, User Name and Password, is the volume for ebooks (highlighted in bold). I want to keep all my ebooks separate from the docker folder. So I tried to add this line “ – /volume1/ebooks:/books:rw“. Not sure if it works.
version: "3.9"
services:
calibre:
container_name: Calibre
image: ghcr.io/linuxserver/calibre
mem_limit: 4g
cpu_shares: 768
security_opt:
- no-new-privileges:true
- seccomp:unconfined
restart: on-failure:5
ports:
- 7080:8080
- 7081:8081
volumes:
- /volume1/docker/calibre:/config:rw
- /volume1/ebooks:/books:rw
environment:
CUSTOM_USER: patrick
PASSWORD: xxxxx
TZ: Asia/Singapore
PUID: 1031
PGID: 100
Once the above was run in Portainer, I was able to run the Calibre using my Tailscale IP address (or you can just use your NAS IP address). As you can tell, Tailscale is fast becoming a very important part of my NAS life, including watching EPL on Starhub when I am overseas.
So to run my Calibre, I am running it on Port 7080.
Once I am in, I then choose my Calibre Library to the eBook folder. I did need to create an empty folder called Calibre in it.
Once that’s done, another setting is to choose the default Ebook format. Seemed like it is MOBI (maybe cause I choose Kindle as my ebook reader) but Amazon has stopped accepting MOBI as an ebook format. So remember to change this to ePub.
Finally another setting you might want to set is set the folder where Calibre will be monitoring for new eBooks and then importing it into Calibre. Since Calibre is now running 24 by 7 as a docker in your Synology, it will be quite useful. I had mine set as “Import” folder inside the Books folder. So I will just drop ebooks to that. It will also delete the ebooks in this folder once it is imported. NICE.
And when everything is done, a nice interface for you….
Now there is a Calibre Server thing inside Calibre but I could not get it to work. But it is okay. I don’t need it as I am going to install Calibre-Web.
Installing Calibre-Web Using Portainer on a Synology
Calibre-Web is an open source software you can install on Synology to act as a front end to your Calibre Library. It is MUCH NICER interface than the original Calibre (it is not bad lah.. you can see the screenshot above) but it is just much nicer. The most important thing was that I could get OPDS to work easily on Calibre-Web as compared to Calibre.
Marius Hosting did not have an article on installing Calibre-Web on Portainer but instead as a Container Manager. So I went to LinuxServer.io to get a docker composer to play with it.
So the result of combining both to my situation produces this…
services:
calibre-web:
image: lscr.io/linuxserver/calibre-web:latest
container_name: calibre-web
environment:
- PUID=1031
- PGID=100
- TZ=Asia/Singapore
volumes:
- /volume1/docker/calibreweb:/config
- /volume1/ebooks/Calibre:/books
ports:
- 8083:8083
restart: unless-stopped
Again note that the separate config and books set up.
Once it is completed, I will then log on to the Calibre-Web using my Tailscale address with Port 8083. Or your NAS IP address with port 8083.
You will be greeted with this page. The user name is admin. The password is admin123. Ya.. amazing right. Obviously once you are in, you will want to change the password or create a new user.
And you are asked to find the Calibre Library Database file.
I was able to easily find it. The file is sitting in my Ebook Library and is named “metadata.db”. This file was created by Calibre and updated everything a new eBook is loaded into the Calibre Library.
Calibre-Web then uses this file to show off the books you have.
Using Calibre-Web OPDS with Yomu Ebook Reader
Now all these are great but what if you want to read an eBook from your library. Remember that all the above apps are hosted on your Synology and exposed to you via a web interface. Maybe you are like me, you rather have an app.
If you have a Kindle app or a Kindle ebook reader or a Kobe reader, there are ways to get books from the Calibre or Calibre-Web to them.
But here’s another way. I downloaded an app called Yomu Ebook Reader (I am an iOS person).
I then use Yomu to access the OPDS feed of Calibre-Web. Think of it like a RSS Feed (or a catalog) of all the eBooks you have. Calibre-web expose the OPDS of my ebook library right out of the box. It just works. Calibre did not work for me :(.
You can see that Yomu can use many methods of importing ebooks from your library. One of which is OPDS.
I then use my Tailscale IP address of my Calibre-Web docker (with user and password). Imagine hence I am outside travelling (perhaps in Japan). I am bored and want to read a particular ebook from my library. One way is to use the OPDS to pull the ebook I want.
I then can see ALL my ebooks in my Calibre Library.
I then choose maybe 4 books to read on my trip.
Okay. Now I want to read The Nightingale (heard it is a damn good book).
And then I can read it (It has so many customisation of margin, font size, line spacing.. very good).
Isn’t it lovely !!
Installing Calibre and Calibre-Web Using Portainer : Conclusion
It is VERY EASY to be Installing Calibre and Calibre-Web Using Portainer on a Synology and if you are an ebook lover like I am and building up your ebook library, then you should consider doing so. It helps you to keep track of your library of ebooks and then when you want to read, you can search the library.
Using Calibre and Calibre-Web (and Tailscale if you not at home) with your smartphone apps can then allow you to just download the ebooks and read them when you are travelling or retired…..
I hope you find this article useful !!