# Calibre-web on FreeNAS -- Being edited, if this line is present when you read this, I haven't managed to complete the procedure yet. YMMV. ## Creating the Jail * Step 1 - Name Jail and Choose FreeBSD Release * **Name**: calibre-jail * **Jail Type**: Default(Clone Jail) * **Release**: 13.2-RELEASE * `iocage create --name calibre-web --release 13.3-RELEASE` * Step 2 - Configure Networking * DHCP Autoconfigure IPv4 **(check)** * VNET **(check)** - My command line jail-fu isn't reached network-dan guru level. Use the GUI to tweak it. * Step 3 - Confirm Options ## Running the Jail and setting up calibre-web 1. Start the jail and go to the shell. Please, do yourself a favor and do that through `ssh`. But if you insist on your misery, you can start the shell from the TrueNAS web interface. ``` iocage console calibre-web -f ``` 3. Make sure you have installed the package manager: ```console pkg update ``` 3. Install git, pip, python and sqlite3: ```console pkg install git && pkg install py37-pip && pkg install python && pkg install sqlite3 && pkg install py37-sqlite3 ``` 4. Clone the calibre-web repository ```console cd / git clone https://github.com/janeczku/calibre-web.git ``` 5. Follow the ["Quick start"][1]: ```console cd calibre-web/ pip install --target vendor -r requirements.txt ``` 6. Execute: ```console python cps.py ``` Open your web browser and go to http://[jail-ip-address]:8083, if everything goes fine you will see: 7. Stop de Jail and add the mountpoint of your library (do not forget to check the **Auto-start** box in the edit section) 8. Start the Jail, go to the jail's shell and create an startup script: ```console touch /calibre-web/cw-startup.sh echo '#\!/bin/sh' >> /calibre-web/cw-startup.sh echo 'nohup python /calibre-web/cps.py &' >> /calibre-web/cw-startup.sh chmod +x /calibre-web/cw-startup.sh ``` 9. Add the script to the crontab ```console echo '@reboot root /calibre-web/cw-startup.sh' >> /etc/crontab ``` 10. Restart the jail and go to http://[jail-ip-address]:8083 [1]:https://github.com/janeczku/calibre-web#quick-start