SOLVED How to install Calibre Web in TrueNAS Core 12.0

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
All,

I have been trying to install the community plugin of calibre-web but its not working as expected. Here are the steps I took to resolve the issues.
  1. Goto to community plugins, install calibre-web
  2. Create an Open Share on TrueNAS. This is where your existing Calibre Library to be copied to. (I used open share to avoid any permission issues and I don't mind anyone in the household reading the books anyway coz no knowledge is forbidden knowledge ;-) ). Note: If you don't have an existing Calibre Library then you will need to initialise the metadata.db file in the jail. The easiest way to create this file is to install calibre on your computer. This will generate the metadata.db file which you could copy into the same folder in the Jail where your books will live. (In my case it was the folder named Calibre Library)
  3. I already had the calibre installed on my Mac. The location of the Calibre Library on Mac was: /Users/YOUR_USER_NAME/Calibre Library
  4. I copied the entire Calibre Library folder from my Mac to the Open Share folder (See step 2) on the TrueNAS via SMB share. It was important because Calibre Library folder holds an important file named metadata.db which is used by the calibre-web plugin
  5. Stop the Calibre-web Jail and Add the mount point of the Calibre Library which you copied into the Open Share folder (in Step 4.)
  6. Start the Plugin
  7. If you click on Manage in the TrueNAS UI Plugins, you will get Unable to connect in the browser.
  8. Open the shell of the `Jail` i.e. iocage console calibre-web
  9. ps aux | grep calibre will show that the process is running already.
  10. I had to manually start by nohup python3 /usr/local/app/calibre-web/cps.py &
  11. then created a script which will automatically do it upon reboot. at /usr/local/app/calibre-web/cw-startup.sh(Location of the script doesn't matter though). the contents of the cw-startup.share:
    Code:
    #!/bin/sh
    nohup python3 /usr/local/app/calibre-web/cps.py &
  12. chmod +x cw-startup.sh
  13. Setup the crontab: echo '@Reboot root /usr/local/app/calibre-web/cw-startup.sh' >> /etc/crontab
  14. restart the plugin and see if you get the UI now
  15. change admin password
  16. create a user
  17. click on the Admin menu item at the top
  18. then click Edit Basic Configuration and then expand External Binaries and paste /usr/local/bin/ebook-convert in the Path to Calibre E-Book Converter textbox (this will enable book conversion i.e. from epub to mobi
  19. you could enable Upload books to add more in the future from the same Basic Configuration section and then Feature Configuration section.

That's it. Enjoy!
 

Sunii

Cadet
Joined
Oct 23, 2014
Messages
3
I had to use the full path to python3 (/usr/local/bin/python3) for this to work but it did, thanks!
 

CycloCrux

Cadet
Joined
Mar 1, 2021
Messages
1
Does anyone else have issues getting ebook-convert to work? The settings are pointing to the correct path (verified location), but I'm unable to convert books.
 

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Does anyone else have issues getting ebook-convert to work? The settings are pointing to the correct path (verified location), but I'm unable to convert books.
have you installed the converter? You will need to separately install it in the same jail and then pass its binary/executable location in the GUI
 

aschaapherder

Dabbler
Joined
Sep 11, 2015
Messages
14
Hmm, tried to install it but pkg insists the package does not exist. When I try to upgrade the jail to version 12.2 I get
Code:
nas1% sudo iocage upgrade calibrejail -r 12.2
Password:
12.2 is missing, please fetch it!

nas1% iocage list
+-----+-----------------+-------+--------------+-----------------+
| JID |      NAME       | STATE |   RELEASE    |       IP4       |
+=====+=================+=======+==============+=================+
| 8   | calibrejail     | up    | 11.4-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+
| 1   | duplicati       | up    | 12.2-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+
| 2   | grafana         | up    | 12.2-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+
| 9   | lychee          | up    | 12.2-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+
| 4   | nextcloudnew    | up    | 12.1-RELEASE | 172.x.x.xxx     |
+-----+-----------------+-------+--------------+-----------------+
| 5   | plexmediaserver | up    | 12.2-RELEASE | 172.x.x.xxxx    |
+-----+-----------------+-------+--------------+-----------------+
| 6   | subsonic        | up    | 11.2-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+
| 7   | transmission    | up    | 12.1-RELEASE | 172.x.xx.xxx    |
+-----+-----------------+-------+--------------+-----------------+

nas1% ls /mnt/volume2/iocage/releases/
11.1-RELEASE    11.2-RELEASE    11.3-RELEASE    11.4-RELEASE    12.1-RELEASE    12.2-RELEASE



Sure I can build a new jail but I am puzzled by the fact that I cannot upgrade the jail while I could update the others without issues.

Am I missing something?
 
Last edited:

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
I tried to install the `Calibre-Web` community plugin on TrueNAS-12.0-U8.1
The installation failed with the following error message:
calibre had a failure Exception: RuntimeError Message: pkg error: - py38-pip :,py38-ldap : Refusing to fetch artifact and run post_install.sh! Partial plugin destroyed
I guess I could create a Jail and then add the calibre package, but I'd prefer to install the plugin directly.
 

shahram7

Cadet
Joined
May 9, 2023
Messages
5
Hi @fahadshery, thank you for your topic and tutorial.
"ps aux | grep calibre" doesnt show me anything
1684431455347.png

but with "nohup python3 /usr/local/app/calibre-web/cps.py &" calibre starts and I can access its UI.
I've created that script and set up the crontab, but when i restart the plugin the jails is not accessible
1684432086154.png


1684432145278.png


I would be very grateful if you could help me with this.

EDIT: I have found the error for those who simply copy like me. Reboot should be written with lowercase.
step 13 it should be
Code:
echo '@reboot root /usr/local/app/calibre-web/cw-startup.sh' >> /etc/crontab


Best regards,
Shahram
 
Last edited:

LucaJones

Cadet
Joined
Jul 9, 2023
Messages
1
What are the common issues encountered during the installation of the calibre web community plugin, and what steps can be taken to resolve them effectively?
 

xeroja876

Cadet
Joined
Aug 24, 2023
Messages
1
All,

I have been trying to install the community plugin of calibre-web but its not working as expected. Here are the steps I took to resolve the issues.
  1. Goto to community plugins, install calibre-web
  2. Create an Open Share on TrueNAS. This is where your existing Calibre Library to be copied to. (I used open share to avoid any permission issues and I don't mind anyone in the household reading the books anyway coz no knowledge is forbidden knowledge ;-) ). Note: If you don't have an existing Calibre Library then you will need to initialise the metadata.db file in the jail. The easiest way to create this file is to install calibre on your computer. This will generate the metadata.db file which you could copy into the same folder in the Jail where your books will live. (In my case it was the folder named Calibre Library)
  3. I already had the calibre installed on my Mac. The location of the Calibre Library on Mac was: /Users/YOUR_USER_NAME/Calibre Library
  4. I copied the entire Calibre Library folder from my Mac to the Open Share folder (See step 2) on the TrueNAS via SMB share. It was important because Calibre Library folder holds an important file named metadata.db which is used by the calibre-web plugin
  5. Stop the Calibre-web Jail and Add the mount point of the Calibre Library which you copied into the Open Share folder (in Step 4.)
  6. Start the Plugin
  7. If you click on Manage in the TrueNAS UI Plugins, you will get Unable to connect in the browser.
  8. Open the shell of the `Jail` i.e. iocage console calibre-web
  9. ps aux | grep calibre will show that the process is running already.
  10. I had to manually start by nohup python3 /usr/local/app/calibre-web/cps.py &
  11. then created a script which will automatically do it upon reboot. at /usr/local/app/calibre-web/cw-startup.sh(Location of the script doesn't matter though). the contents of the cw-startup.share:
    Code:
    #!/bin/sh
    nohup python3 /usr/local/app/calibre-web/cps.py &
  12. chmod +x cw-startup.sh
  13. Setup the crontab: echo '@Reboot root /usr/local/app/calibre-web/cw-startup.sh' >> /etc/crontab
  14. restart the plugin and see if you get the UI now
  15. change admin password
  16. create a user
  17. click on the Admin menu item at the top
  18. then click Edit Basic Configuration and then expand External Binaries and paste /usr/local/bin/ebook-convert in the Path to Calibre E-Book Converter textbox (this will enable book conversion i.e. from epub to mobi
  19. you could enable Upload books to add more in the future from the same Basic Configuration section and then Feature Configuration section.

That's it. Enjoy!
Hi there from steps 11 to 13 confuse me, i'm totally new to truenas and the creating script is confusing me can you please give some more detailed steps
 
Joined
Oct 11, 2023
Messages
1
All,

I have been trying to install the community plugin of calibre-web but its not working as expected. Here are the steps I took to resolve the issues.
  1. Goto to community plugins, install calibre-web
  2. Create an Open Share on TrueNAS. This is where your existing Calibre Library to be copied to. (I used open share to avoid any permission issues and I don't mind anyone in the household reading the books anyway coz no knowledge is forbidden knowledge ;-) ). Note: If you don't have an existing Calibre Library then you will need to initialise the metadata.db file in the jail. The easiest way to create this file is to install calibre on your computer. This will generate the metadata.db file which you could copy into the same folder in the Jail where your books will live. (In my case it was the folder named Calibre Library)
  3. I already had the calibre installed on my Mac. The location of the Calibre Library on Mac was: /Users/YOUR_USER_NAME/Calibre Library
  4. I copied the entire Calibre Library folder from my Mac to the Open Share folder (See step 2) on the TrueNAS via SMB share. It was important because Calibre Library folder holds an important file named metadata.db which is used by the calibre-web plugin
  5. Stop the Calibre-web Jail and Add the mount point of the Calibre Library which you copied into the Open Share folder (in Step 4.)
  6. Start the Plugin
  7. If you click on Manage in the TrueNAS UI Plugins, you will get Unable to connect in the browser.
  8. Open the shell of the `Jail` i.e. iocage console calibre-web
  9. ps aux | grep calibre will show that the process is running already.
  10. I had to manually start by nohup python3 /usr/local/app/calibre-web/cps.py &
  11. then created a script which will automatically do it upon reboot. at /usr/local/app/calibre-web/cw-startup.sh(Location of the script doesn't matter though). the contents of the cw-startup.share:
    Code:
    #!/bin/sh
    nohup python3 /usr/local/app/calibre-web/cps.py &
  12. chmod +x cw-startup.sh
  13. Setup the crontab: echo '@Reboot root /usr/local/app/calibre-web/cw-startup.sh' >> /etc/crontab
  14. restart the plugin and see if you get the UI now
  15. change admin password
  16. create a user
  17. click on the Admin menu item at the top
  18. then click Edit Basic Configuration and then expand External Binaries and paste /usr/local/bin/ebook-convert in the Path to Calibre E-Book Converter textbox (this will enable book conversion i.e. from epub to mobi
  19. you could enable Upload books to add more in the future from the same Basic Configuration section and then Feature Configuration section.

That's it. Enjoy!
I was finding this on the internet. And I got the solution as well. But I used this site-packages/calibre/db/config.yml code instead of that above-mentioned code and it worked well too. Will you please explain if are there any differences between these two codes.
.
 
Top