Resource icon

Docker Calibre book manager in Docker

Currently reading
Docker Calibre book manager in Docker

36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
Another question... I had my Calibre_Library in a share, but wanted to convert the share to allow CRC checksum, etc. So I created a new share, moved all data to it, deleted the old share, and then renamed my new share to be the same.

Now calibre is complaining about permissions on the database. I tried:
  • Restarting the container
  • Rebooting the NAS
  • Deleting/Recreating the volume setting for the container
  • Looked over all permissions... didn't see anything abnormal (in fact, I was able to create a default library in the config folder so I tried to match the new share's permissions with that)
I still get a permissions error! Any ideas? Do I have to completely recreate the container? (which isn't bad, just more work than I wanted to do at the moment...)
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
If you browse the folder owner in File Station... does that match the owner of the book folders you copied over?

FWIW I moved my library to a different shared folder and all went well. So it seems there may be a disconnect of ownership and PUID/PGID settings.
 
36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
Ok, that makes some sense... the new share has my admin account as owner while the calibre settings has "1000" as the owner. That's the PUID/PGID I used.

But when I try to set owner to 1000, I can't... it's not an available selection! How do I do that? Or, can I set my PUID value to my admin account name?
 
36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
Hmmm... changed both environment variables and then set owner on the folders and nothing changed. I restarted the NAS and still no change... the variables do not have to be numbers, correct?
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
the variables do not have to be numbers, correct?
On the NAS, set the owner of the shared folder using the NAS login name. Be sure to check the box that all child files/folders are given the same owner.

On Docker container, use the PUID/PGID environmental values for the owner (SSH)...
Code:
id
 
36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
I thought that's what I did... if my NAS login is "bob" I set PUID and PGID to "bob". Then I went and set the Calibre_Library folder in the NAS folder structure, owner to "bob" (all folders/files). Finally, I set the calibre config folder owner to "bob", folders/files.

Same result.

But I notice that when I start the container, the owner of the calibre config folder is reset to 1000 (my initial PUID/PGID value). Even though my new PUID/PGID are "bob"...

Maybe I should recreate the container using "bob" as PUID/PGID.
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
the owner of the calibre config folder is reset to 1000

That's really odd... Are you actually entering "bob" (an alphameric login name)?

Just to be clear ... you do not enter "bob" as PUID and PGID values, but you enter the numerical PUID and PGID numbers that represent "bob"...

For example, if "bob" is a member of the administrator's group, his PGID is likely 101. But I cannot guess his PUID... though it is probably in the range of 1020-1040. If it were 1030, then you would enter 1030 and 101 for the PUID and PGID values respectively.
 
36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
Last edited:
Yeah, I'm using the alpha name... I guess my understanding of PUID/PGID is woefully lacking. My next question is how do I determine the PUID for "bob"?
-- post merged: --

yeah, a little searching does wonders...

-- post merged: --

Spoke too soon... even though I found the number of "bob", now I can't even connect to the server... funny how 1000 worked for both PUID and GUID at first. I dont think there is any user 1000.
-- post merged: --

Alright, spoke again too soon. The problem was I wasn't following the PGID value correctly. Setting that to 101 and user to 1000 (non-existant, as far as I can tell) worked! My library is accessible again!

Thanks so much for your help, sorry for the noob questions!
 
Hi @Telos ,
Thank you for your guide. I have used it to set up Calibre and have moved my library from my PC to my new NAS.
However, have one problem that I wonder if you can help with. When I try to download metadata and/or covers I get and error that says "Failed to download metadata or cover", if click on Details it just says the same thing but names the book I was trying to download data for.
I assume the problem is Calibre docker not being able to connect to the internet but don't know how to resolve this. Do you have any suggestions?
 
If I disable the Synology firewall it works. If I add a custom rule, like this, it still doesn't work, so presumably Calibre needs some specific ports open to download metadata
1606145067192.png
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
presumably Calibre needs some specific ports open to download metadata

I don't have docker specific ports open. I use my local NAS IP to control that.
For local access I use...

Source... 192.168.0.0 255.255.0.0 all
If you want to narrow that down, look at the ports fields for the Docker container.
 
Last edited:
I don't have docker specific ports open. I use my local NAS IP to control that.
For local access I use...

Source... 192.168.0.0 255.255.0.0 all
If you want to narrow that down, look at the ports fields for the Docker container.
Yes, I have a rule that allows connections from all if my local IP addresses to the NAS.
It's odd that the NAS firewall is stopping the metadata updating, seeing as the connection is being initiated from inside the network.
I have the NAS firewall set up to notify me if an application or service is blocked, but have had no notifications.
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
It's odd that the NAS firewall is stopping the metadata updating, seeing as the connection is being initiated from inside the network.
Just disable each firewall rule in turn to see which is triggered. If you have a final "deny all" rule, test that first.
 
Just disable each firewall rule in turn to see which is triggered. If you have a final "deny all" rule, test that first.
The only 'deny' rule I have is the final deny all rule. There isn't much point in disabling that, it would be the same as disabling the firewall, which I have already tried. What I need to know is has any one had the same problem and did they find out which port to open to cure it.
 

Telos

Subscriber
3,029
971
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
The only 'deny' rule I have is the final deny all rule.
The only thing I can think of is adding an allow rule for container IPs, such as

172.17.0.0 255.255.0.0 all

Some time ago I used this, but after disabling it I saw no ill effect, so it remains disabled.

I'm also using the "All Interfaces" firewall setting for most of my rules.

But back to Calibre... what port mappings are you using... Is your PUID/PGID values from your administrator account?
 
36
4
NAS
DS720+,DS212
Operating system
  1. Windows
Mobile operating system
  1. Android
A bit off-topic, but just wanted to say thanks to Telos and the rest of the people here. I installed this Calibre container roughly a month ago and was confused and overwhelmed. Now, I've installed FreshRSS, FileRun, Portainer, PostgreSQL, MySQL, etc. and, while I still have a lot to learn, realize just how far I have come.

Looking back at Telos' tutorial, I am struck by how easy it is... now. In fact, I would be tempted to not even write such a tutorial because it is rather simple! But I know where I was, and so thanks Telos for taking the time to write this up so I could get started with containers!
 

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

hello, i'm using this tutorial to build my nginx proxy on docker and mariadb on docker, but them i do...
Replies
8
Views
3,407
I discovered if you use fireflyiii/core:latest everything works just fine
Replies
35
Views
13,879

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Top