Installing and configuring Calibre-Server

  • I am new to OpenMediaVault. I am currently trying to get calibre-server working. After setting up the data directory I get an error "Failed to execute command 'omv-mkconf calibre 2>&1': cp: cannot copy a directory, `/media/4bd32d88-e714-4773-b987-c66b21216c45/media/4bd32d88-e714-4773-b987-c66b21216c45/calibreserver//content', into itself, ".
    I have made a number of attempts to setup this directory. This is my third directory that is now in the directory list.
    I am clearly misunderstanding something.
    A good tutorial on how this server is suppose to work might be the best thing along with some advice on how to start over on the configuration. I have removed the plugin and reinstalled and it retains my previous failed attempts in the drop down.

  • I am not sure what you where trying to do, and what tutorial you are using, but I know that I used the process from the calibre website and it works.
    I used omv 3 since calibre plug in is not available anymore..
    Why are you using omv-mkconf?


    Sent from my SM-N910T using Tapatalk

    omv 3.0.56 erasmus | 64 bit | 4.7 backport kernel
    SM-SC846(24 bay)| H8DME-2 |2x AMD Opteron Hex Core 2431 @ 2.4Ghz |49GB RAM
    PSU: Silencer 760 Watt ATX Power Supply
    IPMI |3xSAT2-MV8 PCI-X |4 NIC : 2x Realteck + 1 Intel Pro Dual port PCI-e card
    OS on 2×120 SSD in RAID-1 |
    DATA: 3x3T| 4x2T | 2x1T

  • Calibre 2.x is still in the Repos of OMV3, so if you don't need Calibre 3.x, you can install it easily with


    Code
    apt-get install calibre



    to run Calibre server with user permissions, add a system user with a home dir, but without the right to login


    Code
    adduser calibre --system --ingroup users --disabled-password --disabled-login


    Setup 2 shares in OMV web gui, gain rights/ALC to user calibre and to the users you want to give rights to add books (I set up "import" and "calibre", add SMB/NFS shares to provide books to calibre)


    To start calibre with system.d create a file with nano: /etc/systemd/system/calibre.service containing this:




    the subdirectory "calibre" in /var/run/ is needed for write-permissions to the PID-file. Adopt the library-path (--with-library=/srv/drive-by-xxx/calibre) and the port to your needs.


    Start

    Code
    systemctl start calibre.service


    Stop

    Code
    systemctl stop calibre.service


    Status

    Code
    systemctl status calibre.service


    Install as service

    Code
    systemctl enable calibre.service




    In calibre home dir (/home/calibre/) create a script named "import.sh" with


    Bash
    #!/bin/bash
        IFS=$'\n'
            /usr/bin/calibredb add -r --with-library=/srv/dev-disk-by-xxx/calibre/ /srv/dev-disk-by-xxx/import/
            rm -R /srv/dev-disk-by-xxx/import/*
    echo "Import abgeschlossen!" | mailx -s "Import of your favourite ebooks done, Sir!" "your-email-address@xxx.xxx"


    Adopt paths and email according to your needs.


    By copying books to the share "import" and running the script afterwards, books are imported to calibre database. Already present books will not be imported twice. You can create a Cron job to run this script every hour or so to check import folder for books an import them automaticly. (In Web-GUI: Planned Tasks -> Tonus 'daily', user 'root', command


    Code
    /home/calibre/calibre_import.sh


    To convert books into another format you can use and adopt this script:


    I store 2 formats EPUB + MOBI to serve Kindle and Tolino readers within my family. The script checks for all EPUBs and converts them to MOBI if not already a MOBI file is present. You an place this script in /home/calibre/ as well as conversion.sh and set up a Cron job to run it for example every 6 hours.


    Don't forget to grant appropriate rights to the scripts and make them executable


    Code
    chmod +x /path_to_script/scriptname.sh


    This setup works for me like a charm. I don't use username + password for accessing calibre server since I do not forward the used port in router to public. (Some Kindle have also a problem with the user/password setup)
    My family can access it by VPN (router-router-bonding) directly through their reader devices as installed shop.



    Feel free to hand in some improvements if there are any, I quite appreciate getting them!

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    7 Mal editiert, zuletzt von riff-raff ()

    • Offizieller Beitrag

    I ported the calibre plugin to the latest OMV but found out that calibre 3.x has many different options. That killed my motivation to go any further.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • That is sad to hear. The options mean server config options?

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    • Offizieller Beitrag

    The options mean server config options?

    Yep. The unit file is very different and I couldn't even get the server started because it said the database doesn't exist. I couldn't figure out how to create/initialize a new database.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Since Calibre version 2.50 is in Jesse repo and 2.75 is in Stretch repo, why not stick to verson 2.x for the plugin? This should cover OMV3+4, right? I know, OMV-Extras is a separate thing and can offer newer packages.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    • Offizieller Beitrag

    why not stick to verson 2.x for the plugin? This should cover OMV3+4, right?

    That sounds like a nice idea but people complain enough as it is when the version used is just a few versions back. Plus, the calibre author recommends against it. I don't use calibre so I don't know what the best solution is. The plugin requires some re-writing whether I use calibre 3.x or use 2.x version from the Debian repos.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Debian Jesse is not bleeding edge ... in OMV, php is not bleeding edge, the kernel is not bleeding edge, a lot of services are not bleeding edge. Well, most users of OMV don't even notice that. For Calibre, where you see only server web gui, there is small difference in appearance.


    If you look through calibres version 3.x changelogs, its basicly features und functions, minor bugfixing and security related update.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    • Offizieller Beitrag

    Debian Jesse is not bleeding edge ... in OMV, php is not bleeding edge, the kernel is not bleeding edge, a lot of services are not bleeding edge. Well, most users of OMV don't even notice that.

    Plenty of people want bleeding edge kernels. People have asked for newer php but that isn't really possible. Most media related services/plugins (like plex, emby, couchpotato, sabnzbd, etc), people want the latest release.


    If you look through calibres version 3.x changelogs, its basicly features und functions, minor bugfixing and security related update.

    I get that but either way, it requires more work from me for something I don't use.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • A small addition to my calibre howto:


    To manage the database from remote, share the calibre-folder via Samba, be sure to set correct ACL and permissions for the accessing user for the directory and its subdirectories!


    Stop your calibre server with

    Code
    systemctl stop calibre.service


    Install a 2.5.0 calibre on your remote computer (for Windows-machines there is a portable edition with this Version) and connect to your share by using the "change library" function. Now you can work on your library, correct import errors or edit metadata.


    If you encounter any errors relating read-only database, your permissions are not set correct.


    use

    Code
    systemctl start calibre.service

    to restart your server after changes were made to the metadata

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Hi Riff-raff,


    thank you very much for that tut.


    I have understood everything so far.. except this one:


    "Setup 2 shares in OMV web gui, gain rights/ALC to user calibre and to the users you want to give rights to add books (I set up "import" and "calibre", add SMB/NFS shares to provide books to calibre)"




    Can you may give me an advice what I have to do exactly? (may in pictures?) I am mostly new on OMV 3.x and my english is good but I can´t follow it up on my german Web GUI...


    Thanks a lot in advance

    Intel Core i3-3220 @3.30 Ghz

    16GB DDR3 RAM

    OMV 5.6.24.0 (456GB HDD)

    1x 1TB

    2x 2TB

    Einmal editiert, zuletzt von Zeb Aztian ()

  • You need two shared folders, in my example 'calibre' (this is where calibre puts its database, the books and all meta data) and the 'import' folder. If you share 'import' with Samba, you can access this folder from your remote PC, copy new ebooks there and import them to the calibre database by using the provided script. Granting rights to these folders is done in the shared folter tab with Privileges and ACL. Privileges need to be set for calibre and the user you want to use to place books in the 'import' folder; read and write permissions should be granted.
    The 'calibre' folder does not need to be shared with Samba since you access Calibre through webinterface or your prefered reading device. You could do it anyways, so you would be able to access the database from a remote calibre installation with GUI as well. In order to do that you would have to stop calibre service before you connect from remote. This is a little nasty, I would not recommed trying to do this.
    The conversion script is designed to convert from EPUB to MOBI for the use on Kindle devices. You can replace all '.MOBI' within the script by your prefered ebook type to adopt your needs.


    Maybe I can set up a virtual machine and take some screenies during a setup to decorate this tutorial


    /rudemode on
    Auf Deutsch geht auch, aber nicht in diesem Thread, Sprachmix wird nicht gern gesehen.
    /rudemode off


    :D

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Hi Riff Raff,


    thanks for your reply :)


    Got it and now I am hanging up on that:
    the subdirectory "calibre" in /var/run/ is needed for write-permissions to the PID-file. Adopt the library-path (--with-library=/srv/drive-by-xxx/calibre) and the port to your needs.


    My calibre.service file is looking as yours but instead of xxx I have chosen the path of my "calibre" folder. What am I doing wrong here?

    Intel Core i3-3220 @3.30 Ghz

    16GB DDR3 RAM

    OMV 5.6.24.0 (456GB HDD)

    1x 1TB

    2x 2TB

  • /srv/drive-by-id-ata-Hitachi_HDS723020BLA642_MN1240F33MV0LD-part1/calibre

    Doesn't seem right, did you check it with ssh or terminal if present? Did you upgraded your installation to OMV3 from an existing OMV2?


    mine looks like this (might be because of raid-use):

    Code
    /srv/dev-disk-by-label-Storage/calibre

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • how does the conent of

    Code
    /srv

    look like?


    Did you create the calibre user? Did you copy the startup script (service) correct?


    My ownership of these two folders:

    Code
    ls -la

    to see

    Code
    drwxrws---+ 22359 root     users     913408 Jan  8 20:34 calibre
    drwxrws---+     2 calibre  users    4059136 Jul 28 00:55 calibre_import

    with

    Code
    getfacl calibre

    to see


    What is that SSH-tool you use? Its more like an file explorer, right, nothing to push commands? I prefer SSH remote from Linux hosts and PuTTy from Windows hosts.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    4 Mal editiert, zuletzt von riff-raff ()

  • Check content of the following file:

    Code
    /etc/systemd/system/calibre.service


    Check if folder

    Code
    /var/run/calibre/

    exists and contains the .pid-file. If there is a .pid, delete it. Check folder permissions as well. The folder should be created by the startscript and rights will be granted as well so that .pid-file can be placed.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

    Einmal editiert, zuletzt von riff-raff ()

  • Check content of the following file:

    Code
    /etc/systemd/system/calibre.service


    My file:


    Check if folder

    Code
    /var/run/calibre/

    exists and contains the .pid-file. If there is a .pid, delete it. Check folder permissions as well. The folder should be created by the startscript and rights will be granted as well so that .pid-file can be placed.



    => There is no PID File inside...
    [/quote]

    Intel Core i3-3220 @3.30 Ghz

    16GB DDR3 RAM

    OMV 5.6.24.0 (456GB HDD)

    1x 1TB

    2x 2TB

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!