Skip to content

Instantly share code, notes, and snippets.

@francoisjacques
Forked from dryqin/calibre-web-on-FreeNAS.md
Last active June 10, 2024 04:13
Show Gist options
  • Save francoisjacques/bc96ec2a92628a06d2dc3a2fbe0e17df to your computer and use it in GitHub Desktop.
Save francoisjacques/bc96ec2a92628a06d2dc3a2fbe0e17df to your computer and use it in GitHub Desktop.

Revisions

  1. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    # 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.
    -- That said, I managed to get to step 7, so the worst is behind.
    ```

    ## Creating the Jail

  2. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # 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.
    -- That said, I managed to get to step 7, so the worst is behind.

    ## Creating the Jail

    @@ -62,7 +63,7 @@ pip install calibreweb
    6. Execute:

    ```bash
    python cps.py
    cps
    ```

    Open your web browser and go to http://[jail-ip-address]:8083, if everything goes fine you will see:
  3. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -56,8 +56,7 @@ git clone --depth 1 https://github.com/janeczku/calibre-web.git /opt

    ```bash
    cd /opt/calibre-web/
    # You make wish to start a screen/tmux session here - it takes a little while to complete
    pip install --target vendor -r requirements.txt
    pip install calibreweb
    ```

    6. Execute:
  4. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@
    iocage console calibre-web -f
    ```

    3. Make sure you have installed the package manager:
    2. Make sure you have updated the package manager:

    ```bash
    # switch to sh
  5. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -21,21 +21,21 @@
    ## 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.
    ```
    ```bash
    iocage console calibre-web -f
    ```

    3. Make sure you have installed the package manager:

    ```console
    ```bash
    # switch to sh
    sh
    pkg update
    ```

    3. Install git, pip, python, libxml2, libxslt, sqlite3 and rust:

    ```console
    ```bash
    # libxml2 and libxslt are missing from upstream gist, which is also outdated (py39 nowadays)
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    # strike enter to accept default
    @@ -46,23 +46,23 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

    4. Clone the calibre-web repository

    ```console
    ```bash
    mkdir -p /opt/calibre-web
    # unless you want the history of the project locally, shallow clone is good enough (`depth 1`)
    git clone --depth 1 https://github.com/janeczku/calibre-web.git /opt
    ```

    5. Follow the ["Quick start"][1]:

    ```console
    ```bash
    cd /opt/calibre-web/
    # You make wish to start a screen/tmux session here - it takes a little while to complete
    pip install --target vendor -r requirements.txt
    ```

    6. Execute:

    ```console
    ```bash
    python cps.py
    ```

    @@ -72,7 +72,7 @@ Open your web browser and go to http://[jail-ip-address]:8083, if everything goe

    8. Start the Jail, go to the jail's shell and create an startup script:

    ```console
    ```bash
    touch /calibre-web/cw-startup.sh

    echo '#\!/bin/sh' >> /calibre-web/cw-startup.sh
    @@ -83,7 +83,7 @@ chmod +x /calibre-web/cw-startup.sh

    9. Add the script to the crontab

    ```console
    ```bash
    echo '@reboot root /calibre-web/cw-startup.sh' >> /etc/crontab
    ```

  6. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,8 @@ iocage console calibre-web -f
    3. Make sure you have installed the package manager:

    ```console
    # switch to sh
    sh
    pkg update
    ```

    @@ -38,8 +40,6 @@ pkg update
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    # strike enter to accept default
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    # switch to sh, from csh
    sh
    # source rust environment in sh
    . "$HOME/.cargo/env"
    ```
  7. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,10 @@ pkg update
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    # strike enter to accept default
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    # switch to sh, from csh
    sh
    # source rust environment in sh
    . "$HOME/.cargo/env"
    ```

    4. Clone the calibre-web repository
  8. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -36,6 +36,7 @@ pkg update
    ```console
    # libxml2 and libxslt are missing from upstream gist, which is also outdated (py39 nowadays)
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    # strike enter to accept default
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    ```

  9. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -31,11 +31,12 @@ iocage console calibre-web -f
    pkg update
    ```

    3. Install git, pip, python, libxml2, libxslt and sqlite3:
    3. Install git, pip, python, libxml2, libxslt, sqlite3 and rust:

    ```console
    # libxml2 and libxslt are missing from upstream gist, which is also outdated (py39 nowadays)
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    ```

    4. Clone the calibre-web repository
  10. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,8 @@ pkg update
    3. Install git, pip, python, libxml2, libxslt and sqlite3:

    ```console
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    # libxml2 and libxslt are missing from upstream gist, which is also outdated (py39 nowadays)
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    ```

    4. Clone the calibre-web repository
  11. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ 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)
    7. Stop the 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:

  12. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -48,7 +48,8 @@ git clone --depth 1 https://github.com/janeczku/calibre-web.git /opt
    5. Follow the ["Quick start"][1]:

    ```console
    cd calibre-web/
    cd /opt/calibre-web/
    # You make wish to start a screen/tmux session here - it takes a little while to complete
    pip install --target vendor -r requirements.txt
    ```

  13. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -31,17 +31,18 @@ iocage console calibre-web -f
    pkg update
    ```

    3. Install git, pip, python and sqlite3:
    3. Install git, pip, python, libxml2, libxslt and sqlite3:

    ```console
    pkg install git && pkg install py37-pip && pkg install python && pkg install sqlite3 && pkg install py37-sqlite3
    pkg install git python sqlite3 libxml2 libxslt py39-pip py39-sqlite3
    ```

    4. Clone the calibre-web repository

    ```console
    cd /
    git clone https://github.com/janeczku/calibre-web.git
    mkdir -p /opt/calibre-web
    # unless you want the history of the project locally, shallow clone is good enough (`depth 1`)
    git clone --depth 1 https://github.com/janeczku/calibre-web.git /opt
    ```

    5. Follow the ["Quick start"][1]:
  14. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -20,8 +20,10 @@

    ## Running the Jail and setting up calibre-web

    1. Start the jail and go to the shell.
    - `iocage console calibre-web -f` --- you are doing yourself a favor and doing it over `ssh`, right?
    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:

  15. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -15,14 +15,15 @@
    * DHCP Autoconfigure IPv4 **(check)**
    * VNET **(check)**
    - My command line jail-fu isn't reached network-dan guru level. Use the GUI to tweak it.
    - Back at the shell, `iocage console calibre-web -f` --- you are doing yourself a favor and doing it over `ssh`, right?

    * Step 3 - Confirm Options

    ## Running the Jail and setting up calibre-web

    1. Start the jail and go to the shell.
    2. Make sure you have installed the package manager:
    - `iocage console calibre-web -f` --- you are doing yourself a favor and doing it over `ssh`, right?

    3. Make sure you have installed the package manager:

    ```console
    pkg update
  16. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -9,10 +9,13 @@
    * **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.
    - Back at the shell, `iocage console calibre-web -f` --- you are doing yourself a favor and doing it over `ssh`, right?

    * Step 3 - Confirm Options

  17. francoisjacques revised this gist Jun 10, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,14 @@
    # 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**: 11.3-RELEASE
    * **Release**: 13.2-RELEASE

    * Step 2 - Configure Networking
    * DHCP Autoconfigure IPv4 **(check)**
  18. @billy-idle billy-idle revised this gist Nov 3, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -53,7 +53,7 @@ Open your web browser and go to http://[jail-ip-address]:8083, if everything goe

    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 shell and create an startup script:
    8. Start the Jail, go to the jail's shell and create an startup script:

    ```console
    touch /calibre-web/cw-startup.sh
  19. @billy-idle billy-idle revised this gist Oct 13, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -39,6 +39,7 @@ 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
    ```

  20. @billy-idle billy-idle created this gist Jul 26, 2020.
    74 changes: 74 additions & 0 deletions calibre-web-on-FreeNAS.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,74 @@
    # Calibre-web on FreeNAS

    ## Creating the Jail

    * Step 1 - Name Jail and Choose FreeBSD Release

    * **Name**: calibre-jail
    * **Jail Type**: Default(Clone Jail)
    * **Release**: 11.3-RELEASE

    * Step 2 - Configure Networking
    * DHCP Autoconfigure IPv4 **(check)**
    * VNET **(check)**

    * Step 3 - Confirm Options

    ## Running the Jail and setting up calibre-web

    1. Start the jail and go to the shell.
    2. 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
    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 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