Skip to content
A Holt edited this page May 2, 2024 · 371 revisions

Calibre-Web

Build your own "YouTube/Vimeo[*] Learning Library" using Internet-in-a-Box!

[*] We aim to help educators download the videos and audio recordings they truly need, from almost 2000 websites.

Calibre-Web (initial release 2015) is an exceptional tool based on Calibre (initial release 2006) for organizing, converting, reading and listening to e-books. Starting in 2023/2024, this is being modified for Internet-in-a-Box (IIAB) to not only allow you to collect and organize digital books — but also the learning videos, audiocasts and images most needed by your community or family — all thanks to Calibre-Web's familiar and intuitive interface!

  1. About
    1. E-books and Audiobooks
    2. Videos and Images
    3. Don't judge a book by its Cover!
  2. Download Online Media
    1. Setting the Maximum Number of Videos to Download
    2. Tweaking Video Quality
    3. Warning about overweight videos!
  3. Back-end
    1. xklb and yt-dlp Back-end Integration
    2. Integration of xklb in Calibre-Web
    3. Key Components of editbooks.py and download.py
    4. Two evolving efforts as of 2023-11-07
    5. [TODO] Supporting redownloading videos with the same ID
  4. Installation
    1. Upgrading
    2. How do I test a pull request (PR) ?
    3. Can I transplant an old Calibre-Web and its content, to a new IIAB?
  5. Troubleshooting
    1. How do I check logs?
    2. What /tmp folders are used?
    3. Known Issues

About

E-books and Audiobooks

Calibre-Web's longstanding support for E-books and audiobooks is what makes it great!

Administrators can fine-tune which such file formats are allowed after logging in to Calibre-Web, under Admin > Edit Basic Configuration > Feature Configuration — by adding or removing file formats in the Allowed Upload Fileformats section.

🍒 GURU TIP 🍒

The Enable uploads checkbox should already be set, for the Admin account (e.g. teachers!) But feel free to also enable uploads/downloads on a per-user basis, e.g. if a student co-librarian is helping everyone manage the collection? (N.B. This checkbox might be renamed to Enable adding content in future.)

Videos and Images

Internet-in-a-Box is extending Calibre-Web's E-book and audio capabilities — by adding support for common video and image formats.

The aim is to help you organize the most meaningful learning videos, illustrations and photos — rather than just traditional books.

Below is a list of the media formats (proposed in EXTENSIONS_AUDIO, EXTENSIONS_VIDEO, EXTENSIONS_IMAGE) we've been working on to ensure full support, including upload, playback and display of associated covers a.k.a. thumbnails a.k.a. posters:

Video formats:

Video format Upload Playback Cover
MP4 Supported Supported Supported
WEBM Supported Supported Supported
... ... ... ...

As of Q4 2023, rarely used video formats (e.g. MKV, AVI... ?) are increasingly being removed from browsers. We too try to follow these norms. Design will evolve per community needs — see discussion on "Remove unsupported formats" (PR #16).

In short for video, we strongly recommend MP4 or WebM in most all cases, as these can be played without hassle in most browsers.

Image formats:

Image format Upload Display Cover
JPG Supported Supported Supported
JPEG Supported Supported Supported
PNG Supported Not yet supported Not yet supported
GIF Not yet tested Not yet tested Not yet tested
SVG Not yet tested Not yet tested Not yet tested
MPEG Not yet tested Not yet tested Not yet tested
WEBP Not yet tested Not yet tested Not yet tested

Audio Formats:

[Provide link/context for audiobook/podcast/music browser norms, mentioning those removing {ogg,wav} support for MP3 ?]

E-book Formats:

[Provide link/context around modern & evolving norms!]

Don't judge a book by its Cover!

Major websites like YouTube and Vimeo typically offer static image cover art to showcase each video/song/podcast/etc. In other cases, we will try to auto-extract cover art (a.k.a. thumbnail, a.k.a. poster) from the beginning of videos, using FFmpeg.

Whereas for illustrations, maps and photos, the image itself can automatically be turned into cover art.

We crop rectangular cover art so that it fits into a square (PR #80) allowing users to browse video/book titles, similar to the squares appearing in Google Photos' mobile app. CLARIFICATION: We avoid letter-boxing, as that "archivist's approach" shrinks cover art too much.

How is cover art chosen? The 5-step write-up below is not yet complete (e.g. it only applies to "Download to IIAB" button) but it's a start:

If a matching cover is found in the video file's directory, it is set as the cover; otherwise, a default cover is used. Here is how it's done in https://github.com/iiab/calibre-web/blob/e83c81e516257ee0625a1aea48a294d95cbcf860/cps/uploader.py#L268-L276:

  1. Check Directory Existence

The function first checks whether the directory of the video file exists:

if os.path.isdir(os.path.dirname(row['path'])):
  1. Iterate Through Files

It then iterates through each file in the video file's directory:

for file in os.listdir(os.path.dirname(row['path'])):
  1. Check for Suitable Cover Image

For each file, the function checks if it meets the criteria for a suitable cover image:

if file.lower().endswith(('.webp', '.jpg', '.png', '.gif')) and os.path.splitext(file)[0] == os.path.splitext(os.path.basename(row['path']))[0]:
  1. Set Cover File Path

If a suitable cover image is found, the cover file path is set, and the loop breaks:

cover_file_path = os.path.join(os.path.dirname(row['path']), file)
break
  1. Handle No Cover Found

If no suitable cover file is found, a default cover file path is set:

else:
    log.warning('Cannot find .webp file, using default cover')
    cover_file_path = os.path.splitext(tmp_file_path)[0] + '.cover.jpg'

Download Online Media

We support downloading from popular videos platforms like YouTube and Vimeo. For YouTube, our support extends to a wide range of URLs, making it incredibly versatile:

For Vimeo, while experimental, we can handle basic URLs. Do note that Vimeo covers are not currently working.

After you log into Calibre-Web (at http://box/books), a Download to IIAB button is displayed near the top of the page (if your Calibre-Web user's role allows for it). This works a bit like the command-line tool calibredb but in a friendlier way, allowing you to directly import the educational videos (and their metadata) that your students need.

If after clicking Download to IIAB you specify the URL for a YouTube channel or playlist or similar, a Calibre-Web bookshelf will be auto-created to store them. If the bookshelf name is already taken, a numbered suffix will be added to create a unique bookshelf name. Finally, a suitable subset of the channel or playlist's videos (e.g., 100 videos) will be added to the bookshelf, one at a time, over ensuing minutes (or hours if necessary!)

Important metadata associated with every downloaded video/playlist/channel is retained automatically, for teachers/students and all.

The xklb command-line application (summary, usage, explained further below) enables ETL-like integration / translation — building on xklb's merge feature to import useful video/playlist/channel metadata.

Setting the Maximum Number of Videos to Download

When you submit a playlist URL containing more than 100 videos, Calibre-Web automatically sorts these videos in the background based on their views per day, leveraging metadata stored in the xklb-metadata.db database. Following this sorting process, Calibre-Web proceeds to download the top 100 videos from the playlist and organizes them into a bookshelf named after the playlist title as explained in the previous section.

Even if a playlist contains 100 or fewer videos, Calibre-Web still performs sorting based on views per day. This ensures that the most relevant and popular content is prioritized for download.

To tailor this behavior according to your specific needs, such as accommodating playlists with more or less videos, you can customize the maximum number of videos to download by following the steps below:

  1. After installing Calibre-Web, locate the file constants.py in the installation directory. Typically, this file is located at /usr/local/calibre-web-py3/cps/constants.py.

  2. Open constants.py in a text editor of your choice.

  3. In constants.py, find the line that defines MAX_VIDEOS_PER_DOWNLOAD. This should be around line 52.

  4. Modify the value assigned to MAX_VIDEOS_PER_DOWNLOAD according to your preference. The default value is 100. Change it to your desired maximum number of videos to download.

  5. Save the changes to constants.py.

  6. Restart the Calibre-Web service to apply the changes. You can do this using the appropriate command for your system, such as sudo systemctl restart calibre-web.

By following these steps, you can customize the maximum number of videos that Calibre-Web will download when using the Download to IIAB button.

Tweaking Video Quality

Which video/audio compression should be chosen? Low-income educators can no longer be ignored, in every country. So our 3 goals are:

  1. Avoid Bloated Media Files that "sabotage" SD cards, drives, Wi-Fi bandwidth, personal devices AND civic action (interpersonal/family learning) in low-income communities.
  2. Vivid Learning Videos with non-blurry whiteboards/blackboards, clear illustrations, and life-like nature/science visualizations.
  3. For blind users especially, reasonably Comfortable Audio Quality.

Thanks to the discussion at yt-dlp #5169, /usr/local/bin/lb-wrapper is evolving (based on PR #60, PR #62 and PR #63) towards a target (viewing) bitrate of 1000 kbit/s.

Aligning codecs is a moving target with no perfect solution (definitely an art more than a science, evolving year by year!) If you happen to be a video/audio professional which concrete suggestions for low-income educators — we ask you to please email or post — helping us to get this right for all countries!

In the past, we've also considered yt-dlp options like:

--prefer-free-formats: Prefer video formats with free containers over non-free ones of same quality. WARNING: MP4 patents expired around 2018 (after 20 years) so this flag is currently quite flawed, regardless of its original (debatable) merits.

--format best: Requests best available quality for both video and audio, which yt-dlp defines as --format-sort lang,quality,res,fps,hdr:12,vcodec:vp9.2,channels,acodec,size,br,asr,proto,ext,hasaud,source,id as of 2023-12-14.

--format-sort 'res:720,tbr~2000': Using --format-sort allows you to change the criteria for being considered the "best" (WARNING: this behaves very differently, based on whether-or-not you ALSO include --format best !) Either Way: This particular example would instruct yt-dlp to sort the available formats based on resolution primarily, and TBR bitrate secondarily. Firstly, it prefers formats with a resolution similar to 720p: res:720 prefers larger videos, but no larger than "720p" — and the smallest video if there are no videos less than "720p" (CLARIFICATION: res:720 actually refers to the minimum dimension, e.g. allowing for vertical videos, that are 720 pixels wide instead of 720 pixels high). Secondarily, this example then favors viewing TBR bitrates of approximately 2000 kbit/s (tbr~2000).

--format 'bestvideo[height<=720]+bestaudio/best[height<=720]': To understand how this works, see yt-dlp docs and their examples.

Warning about overweight videos!

Local community videos should be compressed BEFORE uploading them to IIAB! Of course, impatient/naive educators or parents will nevertheless sometimes try to upload "overweight videos" (HD, Ultra HD, etc) directly from their phones to IIAB.

To help impatient/naive uploaders recover (after they unwittingly pollute IIAB's storage/drive, or worse jam up IIAB's Wi-Fi learning hotspot), Band-Aid workarounds like FFmpeg post-processing within IIAB might be considered in future.

Of course putting such videos on a diet is NOT easy on low-end IIAB Raspberry Pi CPU's (in low-income regions without steady electricity especially!)

So: educating educators showing them how to compress their own videos in advance (on their own phones, or even by sending their videos thru WhatsApp) is critical to keeping videos lightweight!

2024-01-01 WARNING: Long videos and large channels/playlists do not yet work (#79).

⚙️ Back-end

xklb and yt-dlp Back-end Integration

xklb must be installed, which also installs yt-dlp.

The integration of xklb and yt-dlp provides a robust back-end solution for downloading and organizing learning video downloads. These help streamline handling of media from sources like YouTube, validate URLs for download, etc:

  • Online Video Download Support: Described in #7, and implemented by PR #6.
  • Download Tasks Tracking: Described in #8 and #9, implemented by PR #10, and improved with PR #18.

🍒 GURU TIPS 🍒

If you must install them manually (xklb and yt-dlp), simply run:

sudo -i
apt update
apt install pipx -y
pipx install xklb
ln -s /root/.local/bin/lb /usr/local/bin/lb

Instead of the above 2 lines, this can also work:
(but if so, remember to prepend every subsequent pipx command with PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin)

PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install xklb

For a quick test of xklb functionality:

lb tubeadd test.db https://youtu.be/6GI0zANA3S4

If you upgrade xklb, its internal dependencies (such as yt-dlp) also need to be updated. This (fast) approach almost always works:

pipx upgrade --include-injected xklb

Alternative method: (slower but guaranteed!)

pipx uninstall xklb
pipx reinstall xklb

To revert to a prior version, e.g. 2.7.009:

pipx install --force xklb==2.7.009

Alternative method: (slower but guaranteed!)

pipx uninstall xklb
pipx install xklb==2.7.009

To check xklb version:

lb --version
pipx list | grep xklb

To check yt-dlp version:

yt-dlp --version                                           # e.g. if /usr/local/bin/yt-dlp symlink exists
/root/.local/pipx/venvs/xklb/bin/yt-dlp --version          # e.g. on Ubuntu 23.10 and Debian 12
/root/.local/share/pipx/venvs/xklb/bin/yt-dlp --version    # e.g. on Ubuntu 24.04

Finally, you can verify that your yt-dlp version roughly corresponds with the version specified in xklb's pdm.lock file, for example yt-dlp version 2024.4.9 as of April 30, 2024.

Integration of xklb in Calibre-Web

xklb is integrated (as an external subprocess) into Calibre-Web, enabling the creation of a database (/library/calibre-web/xklb-metadata.db) to store media information in metadata fields or indices. This integration facilitates the management of media content within Calibre-Web by gathering data and organizing it effectively for easy access and retrieval.

ASIDE: Two associated database files (xklb-metadata.db-shm for shared memory and xklb-metadata.db-wal for rollback journal) are temporary and can generally be ignored.

1. Creating a Database for Media Information

The integration process involves the automatic setup of xklb-metadata.db within Calibre-Web to store information related to the media content when a URL is provided via the Download to IIAB button. In the background, an external script (lb-wrapper) is run, ensuring the following command is run on behalf of the user, creating and updating the database: lb tubeadd <database> url -vv. This database is designed to catalog metadata fields or indices that encompass essential details about the media, such as title, description, duration, and more.

2. Updating the Database upon Download Requests

Upon receiving download requests for media files with lb dl <database> --video --search <url> --prefix <download_directory> --write-thumbnail --format best --format-sort 'tbr~1000' -vv (example) the integration enables automatic updating of the database. This update process involves registering information about the downloaded media, including paths to the downloaded files. The database is structured to accommodate this new data.

3. Implementing Custom Code for Information Extraction and File Management

The integration allows users to implement custom code to extract specific information from the media and manage the associated files. By leveraging user-defined scripts or code snippets, it becomes possible to extract targeted details from the media content and efficiently move the files to the Calibre-Web library directory: /library/calibre-web/

Key Components of editbooks.py and download.py

When a user initiates a download, a task is triggered calling xklb in the background. This task is set up in download.py which is [can also be?] called from editbooks.py. It is executed through a Python subprocess, using bash script: /usr/local/bin/lb-wrapper

Two evolving efforts as of 2023-11-07

[TODO] Supporting redownloading videos with the same ID

Currrently our fork of Calibre-Web doesn't support redownloading videos with the same ID because xklb will not attempt to download something if it has been downloaded before (see February 2024 discussion on PR #125). However, here are some good reasons why we must work on implementing this feature:

  1. Dynamic Content: Video content on platforms like YouTube can be subject to change due to various reasons such as updates, edits, or revisions by the content creator or platform administrators. Users may want to ensure they have the most up-to-date version of the content.

  2. Metadata Updates: Video metadata, including titles, descriptions, and tags, may be altered over time. Users may need to fetch the latest metadata associated with the video, ensuring that their local copies remain synchronized with changes made on the platform.

  3. Bookshelf Management: Videos often belong to multiple bookshelves, and users may want to download or update these videos individually or as part of a bookshelf.

  4. Error Handling and Recovery: Sometimes, downloads may fail due to network issues, server errors, or other technical reasons. We need a mechanism for error recovery, allowing users to retry failed downloads.

  5. Archival and Preservation: For archival purposes or personal collections, it's important to have a reliable mechanism to update and maintain local copies of online content. Users should be able to preserve the integrity of their collections and access the latest versions of the content they care about.

🔧 Installation

As of May 2024, the Multipass virtual machine (VM) system is the easiest way to install everything!

  1. Install Multipass 1.13.1+ onto a Linux, Windows or macOS computer with at least 8 GB RAM.

    Pre-releases of Multipass 1.14 also work well. Either way, verify you have a very recent version of Multipass by running:

    multipass version
    

    WARNING: Many Windows PCs and laptops require that you turn on Hardware "VIRTUALIZATION" in your computer's BIOS. To change your BIOS settings, turn on your computer and IMMEDIATELY (as black screen appears!) hit DEL, ESC, F1, F2 or F10 or similar.

    WARNING: Windows 10+ "Pro" should definitely work. Windows 10+ "Home" might also work, starting in 2024. Either way, IF YOU DO NOT FULLY UPDATE WINDOWS, EXPECT MULTIPASS TO FAIL (it might ask you to install Oracle VM VirtualBox, instead of Microsoft's Hyper-V, and other nightmares!) RECAP: BEFORE INSTALLING MULTIPASS, use Windows Update to fully update your PC/laptop.

  2. If you're on Linux, run:

    curl https://raw.githubusercontent.com/iiab/calibre-web/master/scripts/omg.yml > omg.yml
    

    Or if you're on Windows or macOS, create a text file called omg.yml and copy/paste the contents of omg.yml into that file.

  1. If you're on Linux, install everything by running:

    multipass launch 24.04 -c 2 -m 2G -d 20G -n box --cloud-init omg.yml
    

    (If you see launch failed: Remote "" is unknown or unreachable, run sudo multipass find --force-update per #3464.)

    Or if you're on Windows or macOS, install everything by running:

    multipass launch -c 2 -m 2G -d 20G -n box --cloud-init omg.yml
    

    🍒 GURU TIPS 🍒

    WARNING: Keep the VM named box on Windows, to simplify your life! Why? In 2024 Multipass requires that /etc/hostname (within any VM on Windows) never deviate from the original name of the VM (#3346) otherwise the VM can never be rebooted!

    So if you must create a 2nd IIAB VM on Windows, then you MUST during first boot of the VM: (1) set iiab_hostname: in the VM's /etc/iiab/local_vars.yml to the exact same hostname set by Multipass, AND (2) verify that /etc/hostname is likewise correct.

    ASIDE: Windows continues for years to regularly damage its own networking file C:\WINDOWS\System32\drivers\etc\hosts.ics creating a related nightmare for Multipass. To further troubleshoot VM networking on Windows, please see Multipass's tips.

  2. It should return you to the command-line within about 1-5 minutes. That's your indication that a Multipass VM was just created.

    Get used to checking the VM's IP Address(es) regularly, by running: (as IP Addresses can change every time a VM is rebooted!)

    multipass list
    

    🍒 GURU TIP 🍒

    WARNING: If you're on Windows, avoid the top-most IP Address (in the output above) after rebooting the VM, as it's stale and useless! (#3354)

  3. IIAB and its new video-enhanced version of Calibre-Web are now beginning to install (within your VM!) To monitor its install progress, log into your VM:

    multipass shell box
    

    And then run:

    sudo tail -f /var/log/cloud-init-output.log
    

    You'll know it's done (e.g. 2-to-20 minutes later) when (A) the scrolling output stops, and (B) you see "INTERNET-IN-A-BOX (IIAB) SOFTWARE INSTALL IS COMPLETE" with IP Address(es) ~10 lines below, and then ~10 more lines below that (C) you see at the very bottom an entirely bogus message, falsely claiming: "HIT [Enter] TO REBOOT, CONFIRMING YOU'VE "photographed" THE ABOVE PARAGRAPHS: /usr/sbin/iiab: line 615: /dev/tty: No such device or address"

  4. After software install is complete, use <CTRL-C> to break out of the above scrolling output. This puts you back at your VM's Linux command-line interface.

    🍒 GURU TIPS 🍒

    The 7 IIAB-related commands below are 100% OPTIONAL — just if you're curious about other ways to monitor install progress — and confirm software install is complete:

    sudo -i                           # Change to superuser (root)
    pgrep iiab -a                     # Are IIAB installer programs still running?
    iiab-apps-to-be-installed
    cat /etc/iiab/iiab_state.yml
    tail -f /opt/iiab/iiab/iiab-install.log    # A watched pot never boils, so use <CTRL-C> to break out! 🫖
    ls -lt /etc/iiab/install-flags    # LOOK FOR "iiab-complete" (which confirms software install is complete)
    iiab-summary
    
  5. Open a browser and visit: http://box/books

    Change "box" in the URL above, to one of your VM's IP Addresses that appear near the bottom of /var/log/cloud-init-output.log or iiab-summary output above. Likewise you can run hostname -I within your VM to do the exact same thing, showing your VM's IP Address(es).

    Alternatively, your VM's IP Address(es) can be obtained from a completely separate Terminal window on your Host PC or Mac, by running multipass list or the more-detailed-but-less-reliable multipass info box.

  6. Try it out!

    1. Click on Guest in the top-right of the web page to log in:

      Username: Admin
      Password: changeme

    2. Click the Download to IIAB button on top, and paste in the URL of a short YouTube video (or URL of a very small YouTube channel/playlist). 2024-01-01 WARNING: Long videos and large channels/playlists do not yet work (#79).

      Respect authors and creative people who are publishing learning content for your students. Contact them directly if you have any doubts! As with a school photocopier, it's your responsibility to learn about what Educational Fair Use is allowed (and is not allowed) in your country.

    3. After your download has begun, click the Tasks button on top, to monitor your ongoing downloads.

      The page will update itself as downloads progress (so you don't need to reload/refresh your browser).

    4. Finally, click Internet in a Box in the top-left, to explore books/videos as a student. Check out the Shelves (left side of page, near the bottom) if you've downloaded any YouTube channels or playlists.

      Get to know Calibre-Web using IIAB Tips — more tips will be added very soon, based on your feedback!

Upgrading

Do you have an Internet-in-a-Box with any recent version of Calibre-Web already installed ?

If so, you can upgrade it to IIAB's latest video-enhanced version of Calibre-Web:

sudo -i
cd /usr/local/calibre-web-py3
git pull https://github.com/iiab/calibre-web --no-rebase --no-edit
cd /opt/iiab/iiab
git pull https://github.com/iiab/iiab --no-rebase --no-edit
./runrole --reinstall calibre-web

How do I test a pull request (PR) ?

  1. Start with any Internet-in-a-Box where a very recent version of Calibre-Web is already installed.

  2. Let's say you want to test PR #96 (just as an example!) among other pull requests.

  3. Browse to the PR's website. Example: https://github.com/iiab/calibre-web/pull/96

  4. Right-click on the BLUE link on the RIGHT side, then click "Copy link address" (or similar). Example: image

  5. Paste the URL into any blank document. Example:

    https://github.com/deldesir/calibre-web/tree/deldesir-database
    
  6. Remove /tree/ from the middle of the URL. Replace those 6 characters with one single blank space. Example:

    https://github.com/deldesir/calibre-web deldesir-database
    
  7. Copy your own results from STEP 6 (both parts, including the space in the middle!) so that you're ready to paste this, as part of STEP 9 below.

  8. Shell into your IIAB (e.g. run multipass shell box). Or use ssh if you prefer.

  9. Run these 7 commands within your IIAB VM: (the bold part below is just an example... paste in your own results from STEP 6 above, INSTEAD OF THE BOLD PART!)

    sudo -i
    cd /usr/local/calibre-web-py3
    git pull https://github.com/iiab/calibre-web --no-rebase --no-edit
    git pull https://github.com/deldesir/calibre-web deldesir-database --no-rebase --no-edit
    cd /opt/iiab/iiab
    git pull https://github.com/iiab/iiab --no-rebase --no-edit
    ./runrole --reinstall calibre-web

Can I transplant an old Calibre-Web and its content, to a new IIAB?

The safest approach is to transplant the older Calibre-Web and all of your content together.

WARNING: Do not upgrade Calibre-Web!

  1. Install the latest IIAB Calibre-Web onto your NEW IIAB. (Ironically, it won't actually be used. Most crucially, this installs xklb and yt-dlp.) Then:
    1. Run sudo systemctl stop calibre-web
    2. Run sudo mv /library/calibre-web /library/calibre-web.bkp
  2. On your OLD IIAB, run sudo systemctl stop calibre-web
    1. Copy the older /library/calibre-web (including all of its contents) to your NEW IIAB, ideally using rsync -av to carefully preserve all permissions etc.
  3. Reboot your NEW IIAB, and try it!

Troubleshooting

If the Download to IIAB button (or similar features) fail for you, in a repeated way:

  • Please open your browser's console by pressing F12 (or CTRL+SHIFT+J, or +OPTION+J) and then click Console.

  • Please post screenshots of BOTH (1) what is not working, and (2) the console's error messages — into a New issue (click the green button) after you log into: github.com/iiab/calibre-web/issues

  • You can also inspect Network activity, in your browser console's Network tab:

    • Look for requests related to the download process.
    • Check for any requests marked as failed or with error status codes (4xx or 5xx).
    • Pay attention to the response headers and content for potential error messages.

How do I check logs?

First, click the Tasks button (to the right of Download to IIAB) to see error messages from particular downloads that might have failed.

Also, look into these log files:

  • /var/log/calibre-web.log (tips below, if you want to change this)
  • /var/log/xklb.log
  • Run journalctl -u calibre-web
  • See also Calibre-Web's -o <logfile> command-line option, that's officially part of Calibre-Web 0.6.21+ since 2023-10-21
  • See also Calibre-Web's logging documention as mentioned within github.com/iiab/iiab/tree/master/roles/calibre-web#backend
    1. To change Calibre-Web logging, log in to Calibre-Web (e.g. http://box.lan/books) then click Admin (by Tasks button, on top) > Configuration / Edit Basic Configuration > Logfile Configuration
    2. Then change these 2 settings:
      1. Log Level: DEBUG
      2. Location and name of logfile: /var/log/calibre-web.log

What /tmp folders are used?

For now:

  • /tmp/calibre_web/ e.g. for covers/thumbnails, and possibly also eBooks like test.pdf or test.epub etc, using hash-like filenames [e.g. random-sequence of characters] initially?
  • /library/downloads/calibre-web/ e.g. to download larger items like videos, before moving them into /library/calibre-web/*

Known Issues

Please if you possibly can, help us work on these important known issues !