Skip to content

Manual Installation

Ozzie Isaacs edited this page Nov 16, 2024 · 52 revisions

Manual Installation on Linux

If you want to manually install Calibre-Web (“from source”), follow the instructions below.

These instructions assume a Debian-based Linux distribution (Ubuntu, Raspberry Pi OS, Linux Mint, ...)

  1. Switch to user root:

    • sudo -i
  2. Install git, imagemagick, netifaces, pip, and venv:

    • apt install git imagemagick python3-pip python3-venv
  3. Download and extract Calibre-Web:

    • cd /opt
    • git clone https://github.com/janeczku/calibre-web
    • cd calibre-web
  4. Create a virtual environment:

    • python3 -m venv venv
  5. Install dependencies:

    • ./venv/bin/python3 -m pip install -r requirements.txt
  6. Run Calibre-Web: (FYI the command below does NOT come back to the prompt, and that's OK!)

    • ./venv/bin/python3 cps.py

    PRO TIP:

    • Or use nohup ./venv/bin/python3 cps.py if you want it to come back to the prompt, allowing you to exit the terminal window, as Calibre-Web continues running in the background.
  7. Browse to try it out!

Additional Issues and Considerations: (several below appear old, or no longer relevant!)

  1. Raspberry Pi (Raspberry Pi OS):

    1. Depending on your version of pip, the installation might fail with Failed to build cryptography.
      • If you encounter this issue, try updating pip:
        • ./venv/bin/python3 -m pip install --upgrade pip
      • If the error persists, install cargo:
        • apt install cargo
      • Then, try installing Calibre-Web again.

    PRO TIPS:

    • If the above procedure still fails (e.g. as Raspberry Pi OS evolves, failing here almost every year!) then a valuable workaround can be to start over (from the beginning!) and run apt install python3-cryptography then python3 -m venv venv --system-site-packages — to give the virtual environment access to your OS's python3-cryptography.
  1. Ubuntu:

    1. On some Ubuntu versions, you may encounter the error can't combine user with prefix. This is a known bug and can be resolved by installing the requirements with the --system flag:
      • ./venv/bin/python3 -m pip install --system -r requirements.txt
  2. Configuration Files:

    1. All configuration files (settings database, log files) are stored in the Calibre-Web root folder (in this example, /opt/calibre-web). Additional config files, such as those for Google Drive or Gmail integration, should be placed there as well.

Manual Installation on Windows

On Windows, pip and venv are included with the basic Python installation. Follow the steps below:

  1. Download and install the newest Python version for Windows from python.org.

  2. Open a command prompt (cmd) and navigate to the folder where you want to install Calibre-Web, e.g., c:\calibre-web.

  3. Create a virtual environment for Calibre-Web in the folder venv:

    • c:\python\python.exe -m venv venv
      (This example assumes Python is installed in c:\python.)
  4. Download and extract Calibre-Web into the current folder (in this example, c:\calibre-web) from the releases page on Github.

  5. Install dependencies by running:

    • .\venv\Scripts\python3.exe -m pip install -r requirements.txt
      (Executed from the c:\calibre-web folder.)
  6. Run Calibre-Web with the command:

    • .\venv\Scripts\python3.exe cps.py

Configuration Files: All configuration files (settings database, log files) are stored in the Calibre-Web root folder (in this example, c:\calibre-web). Additional config files (e.g., for Google Drive or Gmail) should also be placed here.