Jail: calibre

one time
# data/calibre is the dataset for calibre libraries
# data/books is the dataset for files you want to import

create jail
export JAIL=calibre
export JAILHOSTNAME=calibre
export JAILDOMAIN=ahlawat.com
export JAILIP=62
export JAILUSER=p
export JAILUSERID=1000
export JAILUSERVNC=true

/root/FreeBSD/jails/create.sh $JAIL $JAILHOSTNAME $JAILDOMAIN $JAILIP $JAILUSER $JAILUSERID $JAILUSERVNC

iocage exec $JAIL "mkdir /data"
iocage fstab -a $JAIL /mnt/data/$JAIL /data nullfs rw 0 0
iocage exec $JAIL "mkdir /mnt/books"
iocage fstab -a $JAIL /mnt/data/books /mnt/books nullfs rw 0 0
iocage fstab -l $JAIL

iocage exec $JAIL "sysrc vncserver_geometry=1920x1200"

iocage exec $JAIL "pkg install -y calibre xpdf"

Notes:
python3 find-duplicate plugin - https://www.mobileread.com/forums/showthread.php?t=131017&page=47
download and install plugin from file

Other python3 plugins - https://www.mobileread.com/forums/showthread.php?t=326394

#calibre's web server
#iocage exec $JAIL "sysrc calibre_enable=YES"
#iocage exec $JAIL "sysrc calibre_user=root"
#iocage exec $JAIL "sysrc calibre_port=443"
#iocage exec $JAIL "sysrc calibre_library=/data/BigLibrary /data/FictionLibrary /data/MovieLibrary"
#iocage exec $JAIL "sysrc calibre_flags= --enable-auth --userdb /srv/calibre/users.sqlite --disable-local-write --ssl-certfile /mnt/certs/fullchain.pem --ssl-keyfile /mnt/certs/privkey.pem"

# add user family/....
#iocage exec $JAIL "calibre-server --userdb /srv/calibre/users.sqlite --manage-users"

#iocage exec $JAIL "service calibre start"
#iocage exec $JAIL "service calibre status"

## allow p (NON-ROOT USER) to start server on 443- requires config below - BUT does not work in jails
## iocage exec $JAIL "echo net.inet.ip.portrange.reservedhigh=0 >> /etc/sysctl.conf"

#source compile
## cd /data
## git clone git://github.com/kovidgoyal/calibre.git
## pkgs - qmake - BUT code still does not build
## export CALIBRE_DEVELOP_FROM=/data/calibre/src; calibre--auto-reload --shutdown-timeout 30 ...


Ref:
https://manual.calibre-ebook.com/generated/en/calibre-server.html
https://manual.calibre-ebook.com/server.html#managing-user-accounts-from-the-command-line-only
https://manual.calibre-ebook.com/index.html
Alternate:
https://blog.slucas.fr/projects/calibre-opds-php-server/
https://github.com/seblucas/cops

https://www.mobileread.com/forums/forumdisplay.php?f=166
https://www.mobileread.com/forums/showthread.php?t=293097

Showcased here is a capital and operational cost effective approach, using minimal server and networking hardware with multiple virtualized applications for Home and Business. This solution template can be easily scaled out and adapted for larger Enterprise deployments.
drop by the diyIT Matrix public room at #diyit:matrix.ahlawat.com
if you have any IT questions/feedback or to request pro bono consulting for a nonprofit

message me privately at @sharad:matrix.ahlawat.com
or email me at - sharad@ahlawat.com - pgpkey: 68DD6B89
Networking and Security Technologist.
EngineerĀ andĀ an avid Programmer.

https://sharad.ahlawat.com
strive to learn and pass on the knowledge to the next generation
one day humanity will understand the meaning of life and hopefully it will be more than ASCII 42 = "*" regex for whatever you want it to be,
and destiny is more than just a roll of a pair of dice with 42 dots (Lets nail down Quantum Entanglement)

May you Live Long (Intelligently) and Prosper and work on technology that matters.
© 2024 Sharad Ahlawat

No personal identifying data is collected or any form of analytics/metrics reported to a third-party by this website.