Calibre in the plugin jail

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi guys,

I tried to add Calibre to my FreeNAS.

Plan was to add this: http://www.freshports.org/deskutils/calibre/ to the jail.

I entered the jail and the rest is here:
http://pastebin.com/eu62Ft5f

Joshua made a LazyLibrarian plugin, but Calibre is a Ebook manager and not a downloader.
So Calibre would be great, since my ebooks are located on my FreeNAS anyway.

What do I have to do, to get it on FreeNAS? :)

You might be able to add the packages / or compile it from ports. The problem is it requires an xserver (gui session) running I believe. This is possible in the jail but I wouldn't recommend it. I know people have asked the developer to rip out the webserver portions of calibre so it wouldn't depend on the desktop portion but I don't think the developer ever got to it.
 

ThomasDK81

Dabbler
Joined
Mar 19, 2012
Messages
49
Thats really interesting :)
Just skimmed it, but like the separation of the web-GUI and Calibre.
Thought about making something like this infact.

Thanks :)
 

Larcen

Cadet
Joined
Apr 16, 2013
Messages
6
I've been running Calibre in a jail for a while now. All you need to do is remote into the jail by either ssh or shell and execute pkg_add -r calibre. Once it finishes you just need to run calibre-server and some switches that can be googled. calibre-server commands.
 

thorndike

Dabbler
Joined
Sep 23, 2013
Messages
11
Thanks for the information. I have installed calibre-server from your instructions and have the server commands I need. I can start it from the command line and it seems to work correctly. Now that I know what has to be run, how do I get this to run every time the jail or server is restarted?
 

abcdaman

Cadet
Joined
Oct 8, 2013
Messages
1
You need to configure the /etc/rc.conf file. The /usr/local/etc/rc.d/calibre file will tell you what need to be defined in the configuration file. (for example: calibre_enable, calibre_port.. etc) Once you restart your jail you should be able to access it.
 

joelmusicman

Patron
Joined
Feb 20, 2014
Messages
249
Not to go grave digging, but I just wanted to report that these instructions worked well for me, following Larcen's install instructions and abc's mention of the instructions in the config file. Set the calibre-server library directory to the same directory of my PC's Calibre library (located on NAS), put it in rc.conf, and this was probably the EASIEST jail I've ever set up! No issues on 9.2.1.2.
 

tommat

Cadet
Joined
Mar 28, 2014
Messages
2
Thanks to Larcen for posting the installation route - which works in the standard jail in 9.2.1.3. And to abcdaman for the information on configurations.

Just to make it easier for other beginners (like me), if you use /mnt as your storage you can get Calibre's server working by typing in the jail's Shell:

calibre-server --with-library="/mnt"

It will serve your books (port 8080) as long as the Shell window is open, but closing the shell windows also kills the server process.

I haven't managed to get the rc.conf route to work yet, which would let me browse my Calibre library after closing the shell window.Has anybody got it working properly, and if so could you post how to do it please?
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
And also - does anybody know what the deal is with lazylibrary? There used to be a plugin for this too, but for some reason it is not in the repository... Lazylibrary and calibre would be a killer-combo of course.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Will this be added to the repository any time soon then?

The PBI repository? Not unless you or someone else makes the PBI...
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
have you seen COPS? http://blog.slucas.fr/en/oss/calibre-opds-php-server

You'll want Calibre on a local PC to add and build the database, but COPS will be able to share your ebooks easily. I've had this working on a test server but not under FreeNAS yet

Yes, I think this is the best way to manage my ebooks and make it avalaible for all my devices anytime I need it. I installed it in a test (virtual) box , Today I'll reply the installation step in my home box. I'll let you know if all works right ;)
 

joelmusicman

Patron
Joined
Feb 20, 2014
Messages
249
Yes, I think this is the best way to manage my ebooks and make it avalaible for all my devices anytime I need it. I installed it in a test (virtual) box , Today I'll reply the installation step in my home box. I'll let you know if all works right ;)

This was definitely one of the easiest installs I've done. It's been awhile so I don't remember exactly which guide I followed.

And also - does anybody know what the deal is with lazylibrary? There used to be a plugin for this too, but for some reason it is not in the repository... Lazylibrary and calibre would be a killer-combo of course.

The PBI can be found in this thread...
 

MajorBFD

Cadet
Joined
May 16, 2014
Messages
2
Has anyone gotten this to start automatically when a jail starts? I've added the following entries to the rc.conf file

calibre_enable="YES"
calibre_port=8200
calibre_library="/Books"

and I cannot get it to run automatically. It runs great when I run it manually with appropriate switches. Maybe someone can point me in the right direction if they have it working.

Thanks.
 

MajorBFD

Cadet
Joined
May 16, 2014
Messages
2
Thanks to abcdaman for the PM help. For anyone else having an issue getting it to start, change the calibre_user to root in the rc.d/calibre file. It worked after making that change.
 

sdspieg

Contributor
Joined
Aug 6, 2012
Messages
168
Sorry to post here again - but so is there a way to install calibre in FreeNAS, and if so - could somebody please post the instructions (or - better yet - add it to the repository)? Thanks.
 

dannyb78

Explorer
Joined
Aug 30, 2011
Messages
70
The Best solution is put books files and library in a datastore, then running a server like cops to make your books avalaible on the net.
 

MarchHare

Dabbler
Joined
Oct 14, 2013
Messages
12
This didn't work for me. The server starts then complains there are no books spitting out an error message:

Error: No books found

TypeError: undefined is not a function

at Object.printStackTrace.implementation.createException (http://10.0.1.162:8080/static/stacktrace.js:81:18)

at Object.printStackTrace.implementation.run (http://10.0.1.162:8080/static/stacktrace.js:66:25)

at printStackTrace (http://10.0.1.162:8080/static/stacktrace.js:57:62)

at render_error (http://10.0.1.162:8080/static/browse/browse.js:134:18)

at booklist (http://10.0.1.162:8080/static/browse/browse.js:271:29)

at HTMLDocument. (http://10.0.1.162:8080/browse/category/newest:33:17)

at Function.jQuery.extend.ready (http://10.0.1.162:8080/static/jquery.js:392:9)

at HTMLDocument.DOMContentLoaded (http://10.0.1.162:8080/static/jquery.js:745:10)​
 
Top