Resource icon

Docker Calibre book manager in Docker

Currently reading
Docker Calibre book manager in Docker

4,027
1,378
NAS
DS4l8play, DS202j, DS3623xs+, DSM 7.3.3-25847
Telos submitted a new resource:

Calibre book manager in Docker - Calibre: The one stop solution for all your e-book needs

Here’s a tutorial to get Calibre e-book manager running on Docker. I’ll set this up assuming you already have a Calibre database that exists on your NAS. In my case, I synced my PC’s Calibre books to:
/home/media/ebooks

I will use the linuxserver/caliber image, available here:
Docker Hub

Once you launch the image let’s make the following tweaks to the container.

General settings…...

Read more about this resource...
 
HI,

Thanks very much for posting this helpful guide. I am trying to follow it.

I've set up the container and it's running, I've set up the ports as per the guide, but when I goto {my-local-Synology-ip}:27880 I get an error "This site can’t be reached".

I also set up the firewall on the NAS to allow this port.

I wonder if you'd have any ideas as to what I might be doing wrong?

Do I need to port forward? I was thinking not as it's internal traffic.

Many thanks for any help you can give me
-B
 

Attachments

  • gearbox - Synology DiskStation.png
    gearbox - Synology DiskStation.png
    293.2 KB · Views: 392
  • gearbox - Synology DiskStation.png
    gearbox - Synology DiskStation.png
    195.2 KB · Views: 391
No port-forwarding is required for the local LAN. In your setup, IP:27880 should bring you here...
ApCtysX.png


Where IP:27881 should bring you to the calibre server settings (if you chose to set up the server). I can't speak to your firewall settings, as I do mine differently. A quick check can be done by temporarily disabling the firewall (if that is possible in your circumstance) to see if that affects connection.

Open the Log tab and look for errors...
ulHfhxO.png

...and post those here.

Alternately, restart the container and monitor the Terminal tab.

Also... calibre takes a while to fully load, and the IP address is not immediately usable. Monitoring the Terminal tab will allow you to see when the container is ready for use.

TQF0cjY.png
 
HI - thanks for the reply, much appreciated!

Here is the container

gearbox - Synology DiskStation.png

gearbox - Synology DiskStation.png


here are the logs


linuxserver-calibre-web1
datestreamcontent
2020-04-10 11:04:42stdout[services.d] done.
2020-04-10 11:04:42stdout[services.d] starting services
2020-04-10 11:04:42stdout[cont-init.d] done.
2020-04-10 11:04:42stdout[cont-init.d] 99-custom-scripts: exited 0.
2020-04-10 11:04:42stdout[custom-init] no custom files found exiting...
2020-04-10 11:04:42stdout[cont-init.d] 99-custom-scripts: executing...
2020-04-10 11:04:42stdout[cont-init.d] 30-config: exited 0.
2020-04-10 11:04:41stdout[cont-init.d] 30-config: executing...
2020-04-10 11:04:41stdout[cont-init.d] 10-adduser: exited 0.
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdout-------------------------------------
2020-04-10 11:04:41stdoutUser gid: 911
2020-04-10 11:04:41stdoutUser uid: 911
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdout-------------------------------------
2020-04-10 11:04:41stdoutGID/UID
2020-04-10 11:04:41stdout-------------------------------------
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdoutWe gratefully accept donations at:
2020-04-10 11:04:41stdoutBrought to you by linuxserver.io
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdout |_| |___/ |_| \__/
2020-04-10 11:04:41stdout | | \__ \ | | | () |
2020-04-10 11:04:41stdout | | / __| | | / \
2020-04-10 11:04:41stdout | | ___ _ __
2020-04-10 11:04:41stdout _ ()
2020-04-10 11:04:41stdout-------------------------------------
2020-04-10 11:04:41stdout
2020-04-10 11:04:41stdoutusermod: no changes
2020-04-10 11:04:39stdout[cont-init.d] 10-adduser: executing...
2020-04-10 11:04:39stdout[cont-init.d] 01-envfile: exited 0.
2020-04-10 11:04:39stdout[cont-init.d] 01-envfile: executing...
2020-04-10 11:04:39stdout[cont-init.d] executing container initialization scripts...
2020-04-10 11:04:39stdout[fix-attrs.d] done.
2020-04-10 11:04:39stdout[fix-attrs.d] applying ownership & permissions fixes...
2020-04-10 11:04:39stdout[s6-init] ensuring user provided files have correct perms...exited 0.
2020-04-10 11:04:38stdout[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2020-04-10 11:04:18stdout[s6-finish] sending all processes the KILL signal and exiting.
2020-04-10 11:04:15stdout[s6-finish] sending all processes the TERM signal.
2020-04-10 11:04:15stdouts6-svwait: fatal: timed out
2020-04-10 11:04:11stdout[s6-finish] waiting for services.
2020-04-10 11:04:11stdout[cont-finish.d] done.
2020-04-10 11:04:11stdout[cont-finish.d] executing container finish scripts...
2020-04-10 10:41:37stdout[services.d] done.
2020-04-10 10:41:37stdout[services.d] starting services
2020-04-10 10:41:37stdout[cont-init.d] done.
2020-04-10 10:41:37stdout[cont-init.d] 99-custom-scripts: exited 0.
2020-04-10 10:41:37stdout[custom-init] no custom files found exiting...
2020-04-10 10:41:37stdout[cont-init.d] 99-custom-scripts: executing...
2020-04-10 10:41:37stdout[cont-init.d] 30-config: exited 0.
2020-04-10 10:41:36stdout[cont-init.d] 30-config: executing...
2020-04-10 10:41:36stdout[cont-init.d] 10-adduser: exited 0.
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdout-------------------------------------
2020-04-10 10:41:36stdoutUser gid: 911
2020-04-10 10:41:36stdoutUser uid: 911
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdout-------------------------------------
2020-04-10 10:41:36stdoutGID/UID
2020-04-10 10:41:36stdout-------------------------------------
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdoutWe gratefully accept donations at:
2020-04-10 10:41:36stdoutBrought to you by linuxserver.io
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdout |_| |___/ |_| \__/
2020-04-10 10:41:36stdout | | \__ \ | | | () |
2020-04-10 10:41:36stdout | | / __| | | / \
2020-04-10 10:41:36stdout | | ___ _ __
2020-04-10 10:41:36stdout _ ()
2020-04-10 10:41:36stdout-------------------------------------
2020-04-10 10:41:36stdout
2020-04-10 10:41:36stdoutusermod: no changes
2020-04-10 10:41:35stdout[cont-init.d] 10-adduser: executing...
2020-04-10 10:41:35stdout[cont-init.d] 01-envfile: exited 0.
2020-04-10 10:41:35stdout[cont-init.d] 01-envfile: executing...
2020-04-10 10:41:35stdout[cont-init.d] executing container initialization scripts...
2020-04-10 10:41:35stdout[fix-attrs.d] done.
2020-04-10 10:41:34stdout[fix-attrs.d] applying ownership & permissions fixes...
2020-04-10 10:41:34stdout[s6-init] ensuring user provided files have correct perms...exited 0.
2020-04-10 10:41:34stdout[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2020-04-10 10:34:26stdout[s6-finish] sending all processes the TERM signal.
2020-04-10 10:34:26stdouts6-svwait: fatal: timed out
2020-04-10 10:34:24stdout[s6-finish] waiting for services.
2020-04-10 10:34:23stdout[cont-finish.d] done.
2020-04-10 10:34:22stdout[cont-finish.d] executing container finish scripts...
 
No, I don't have PGID and PUID variables set,I wasn't sure how to do this, so maybe the issue.


Here are the Environment variables.

gearbox - Synology DiskStation.png



I don't know what `are you running calibre docker on top of this` means, sorry I realise this is probably an issue with my knowledge of docker/sysadmin in general. Thanks a lot for your help.
 
Well the problem here is that you are not running the container as your user. In order to do so you need to figure out tour puid and guid for your nas user.

Log into your nas via ssh as your nas user. then just run id command and hit return. You will see your user id and your group id. something like 1024 or 1026 for user and 101 for admin group. These 2 values need to set as environment varables when using linuxserver images.

Now regarding your other question. Calibre-web is a pure web interface and not the database part of this solution. If you look at the resource you will see what @Telos wrote and what image he is using. If you want to use this calibre-web image then you will need to add one more variable to it and that’s the one pointing to your calibre container where the database already is living.
 
HI

I've ssh'ed in as my user and run 'id' taken that users UID and GID and now have the following.



gearbox - Synology DiskStation.png
gearbox - Synology DiskStation.png



I have a Calibre library at the location on my NAS eBooks/library (it's already being used by the app on my windows machine as a share).

gearbox - Synology DiskStation.png
 
The problem is that you have installed a different Docker image that the one I wrote up. Nothing wrong with that, but my guide (and my comments above) are unrelated to the image you have chosen. I would suggest that you carefully follow the instructions on the Docker Hub page for your image.

The image you chose allows you to use the basic calibre interface on your browser GUI. In contrast, my image allows connected devices (phones, tablets, etc.), to download (and convert) content to your device.
 
:oops:. oh no! I'm sorry to have wasted your time, you are right I see that I've picked the wrong image :cry:


It's now working on port 27880 - and I'll continue with the setup!


Apologies @Telos and @Rusty and thanks for to both of you for your help!

127_0_0_1.png
 
Last edited:
Firstly. thanks very much for your guide Telos, this helped massively and Calibre and Server are both working great on the NAS over LAN. I haven't been able to check access from outside the LAN as yet (lockdown hey!) So before I get the chance to do so, I was just wondering what the port forwarding rules should be on the router and the NAS?

Router: External Port (27881) > Internal Port Nas (27881),
NAS: External Access Local Port 27881 > Router Port 27881
Docker as per configuration given, Local 27881 > Container 8081.
or
Router: External Port (27881) > Docker Internal Port Container 8081, and not set anything up in DSM for External access?

Thanks again
 
I was just wondering what the port forwarding rules should be on the router and the NAS?
Thank you for those kind words.

Forwarding depends on what you want to do remotely. As you may have discovered, there are two basic functions...

In the writeup, port 27880 leads to the Calibre interface that you may be familiar seeing from a PC. I use this primarily for importing books, updating metadata, etc., but I have little use for it remotely, so I haven't forwarded that port externally.

Port 27881 connects to the Calibre server. I use this remotely to download books to my tablet, and other devices. It also permits (with the appropriate add-in) you to convert book formats... for example, from mobi to epub.

I forward Calibre Server at a router level, forwarding port 27881 to my NAS (fixed IP):27881.

Alternately, you could use Reverse Proxy to manage this without opening a port specific to Calibre.
 
Thank you for those kind words.

No thanks required from you sir! thank you for your time and effort creating such a great guide and walkthrough, I'd been trying for ages to get Calibre server setup on the NAS, but after many errors just gave up and went with Cops on WebStation, this is a much better solution!

In the writeup, port 27880 leads to the Calibre interface that you may be familiar seeing from a PC. I use this primarily for importing books, updating metadata, etc., but I have little use for it remotely, so I haven't forwarded that port externally.

Port 27881 connects to the Calibre server. I use this remotely to download books to my tablet, and other devices. It also permits (with the appropriate add-in) you to convert book formats... for example, from mobi to epub.
That's exactly my planned use as well. Also how I was thinking of setting up external access, so thanks again, great to have the confirmation. Cheers.
 
First, thank you Telos for this guide! I am a Docker newbie, and your write-up was extremely helpful! Everything seems to be working as expected.

I've got the "automatically add books" folder set up, but I was wondering if you could provide any tips/guidance on enabling drag-and-drop adding of books (where you can just drag a file into the main Calibre screen). This is supported on the Windows/Mac client, but when I try to do so in the Docker instance, I get the following message (from Guacamole, I think):

Screen Shot 2020-07-04 at 12.11.23 PM.png


I've done some Googling, and it looks like it may be possible to enable file transfer via RDP or SSH in Guacamole; I will do some tinkering, but I wanted to see if you had any experience/tips/tricks.

Again, thank you so much for this guide!
 
I have the same issue with drag/drop. I'm still seeking a solution.

It's interesting that you mentioned the "automatically add books" folder... I may have to go that way... Up until now, I manage my Calibre library on a Windows laptop, and sync the library folders to the NAS, where the Docker version of Calibre runs. However, I discovered that new books that are synced to the NAS, don't appear in the Docker's library unless I restart the server. Apparently I cannot just add books to the file structure and expect them to be auto-assimilated in the library. So maybe I say good-bye to the laptop sync.
 
Hi Telos, Thanks so much for the great walk-thru. I'm almost there but having directory issues. I created a shared folder in DSM called The Citadel with a subfolder called eBooks. When I SSH as myself (admin user) into my NAS, I can see the folder in /volume1/TheCitadel/eBooks but that path is not accessible in the Choose location for calibre library dialog. Adding that to PATH doesn't help. What am I doing wrong? Hate being a noob...
 
I can see the folder in /volume1/TheCitadel/eBooks but that path is not accessible in the Choose location for calibre library dialog. Adding that to PATH doesn't help
OK. So your ebooks are located on that path...

Assuming that you followed everything to the letter... Your volume mapping (in the Synology GUI) for the library should be

TheCitadel/ebooks > /Calibre_Library

Don't look for "volume1" ... You should see that path of you have rights to the shared folder "TheCitadel".
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

BobW submitted a new resource: How to Setup Custom Error Pages for Nginx-Proxy-Manager (NPM) - Setup...
Replies
0
Views
680
Thank You for the great input. I try not to Muck around with SSH on the NAS. I mistakenly waited too long...
Replies
3
Views
1,698
hello, i'm using this tutorial to build my nginx proxy on docker and mariadb on docker, but them i do...
Replies
8
Views
4,675
I discovered if you use fireflyiii/core:latest everything works just fine
Replies
35
Views
16,839
hmmm, looks like something bad happened :( Of course I am inserting a correct admin token (newly...
Replies
421
Views
93,551

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top