Portainer Templates logo

Portainer Templates

Calibre Web Calibre Web

Container

Books

Calibre-web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself. This software is a fork of library and licensed under the GPL v3 License.

Image details

Pulls: 202.3M
Architecture: amd64, arm64
Image size: 248 MB
Latest: 0.6.27
User: linuxserver
Created: Jul 17, 2017
Updated: 3 hours ago
Status: active

Source details

Stars: 17.9k
Forks: 2k
Language: Fluent
License: GPL-3.0
Updated: 16 hours ago

Configuration

Type
Container
Platform
linux
Image
linuxserver/calibre-web:latest
Ports
8083/tcp
Volumes
/config : /opt/mediadepot/apps/calibre-web/config/books : /media/storage/ebooks
Env vars
PUID=15000PGID=15000TZ=America/Los_AngelesDOCKER_MODS=linuxserver/mods:universal-calibreOAUTHLIB_RELAX_TOKEN_SCOPE=1
Labels
traefik.enable=truetraefik.http.services.calibreweb.loadbalancer.server.port=8083traefik.http.routers.calibreweb.entrypoints=websecuretraefik.http.routers.calibreweb.tls.certresolver=mydnschallenge
Restart
unless-stopped

Template by mediadepot

Notes

Portainer App Templates by Technorabilia based on data provided by LinuxServer.io.

Don't forget to create the volume directories on the host file system.

mkdir -p /volume1/docker/calibre-web/config
mkdir -p /volume1/docker/calibre-web/books

Standalone Install

Select an install method, to see config/commands for deploying Calibre Web

Installation method

Install on Portainer

Import all app templates into your Portainer instance, for easy 1-click deploys

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select Calibre Web, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

More install options in our documentation, or see janeczku/calibre-web for app-specific guidance.

linuxserver.io
Blog Discord Discourse GitHub Open Collective
The LinuxServer.io team brings you another container release featuring:
  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:
  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

linuxserver/calibre-web

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI
Calibre-web is a web app providing a clean interface for browsing, reading and downloading eBooks using an existing Calibre database. It is also possible to integrate google drive and edit metadata and your calibre library through the app itself.
This software is a fork of library and licensed under the GPL v3 License.
calibre-web

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.
Simply pulling lscr.io/linuxserver/calibre-web:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
The architectures supported by this image are:
ArchitectureAvailableTag
x86-64amd64-\
arm64arm64v8-\

Version Tags

This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
TagAvailableDescription
latestReleases of Calibre-Web
nightlyCommits to the master branch of Calibre-Web

Application Setup

Webui can be found at http://your-ip:8083
On the initial setup screen, enter /books as your calibre library location.
Default admin login: Username: admin Password: admin123
If you lock yourself out or forget a password, you will need to specify the app.db similar to this: docker exec -it calibre-web python3 /app/calibre-web/cps.py -p /config/app.db -s <user>:<pass> If you fail to specify the proper db, it will appear to succeed, but it will not work.
Unrar is included by default and needs to be set in the Calibre-Web admin page (Basic Configuration:External Binaries) with a path of /usr/bin/unrar
64bit only We have implemented the optional ability to pull in the dependencies to enable ebook conversion utilising Calibre, this means if you don't require this feature the container isn't uneccessarily bloated but should you require it, it is easily available. This optional layer will be rebuilt automatically on our CI pipeline upon new Calibre releases so you can stay up to date. To use this option add the optional environmental variable as shown in the docker-mods section to pull an addition docker layer to enable ebook conversion and then in the Calibre-Web admin page (Basic Configuration:External Binaries) set the Path to Calibre E-Book Converter to /usr/bin/ebook-convert on versions 0.6.21 and lower. For 0.6.22 and higher, set the directory, /usr/bin/ only.
This image contains the kepubify ebook conversion tool (MIT License) to convert epub to kepub. In the Calibre-Web admin page (Basic Configuration:External Binaries) set the Path to Kepubify E-Book Converter to /usr/bin/kepubify

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.
>!NOTE >Unless a parameter is flagged as 'optional', it is mandatory and a value must be provided.

docker-compose (recommended, click here for more info)

---
services:
  calibre-web:
    image: lscr.io/linuxserver/calibre-web:latest
    container_name: calibre-web
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - DOCKER_MODS=linuxserver/mods:universal-calibre #optional
      - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional
    volumes:
      - /path/to/calibre-web/data:/config
      - /path/to/calibre/library:/books
    ports:
      - 8083:8083
    restart: unless-stopped

docker cli (click here for more info)

docker run -d \
  --name=calibre-web \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e DOCKER_MODS=linuxserver/mods:universal-calibre `#optional` \
  -e OAUTHLIB_RELAX_TOKEN_SCOPE=1 `#optional` \
  -p 8083:8083 \
  -v /path/to/calibre-web/data:/config \
  -v /path/to/calibre/library:/books \
  --restart unless-stopped \
  lscr.io/linuxserver/calibre-web:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.
ParameterFunction
-p 8083:8083WebUI
-e PUID=1000for UserID - see below for explanation
-e PGID=1000for GroupID - see below for explanation
-e TZ=Etc/UTCspecify a timezone to use, see this list.
-e DOCKERMODS=linuxserver/mods:universal-calibre

optional & x86-64 only Adds the ability to perform ebook conversion

-e OAUTHLIBRELAXTOKENSCOPE=1Optionally set this to allow Google OAUTH to work
-v /configWhere calibre-web stores the internal database and config.
-v /booksWhere your preexisting calibre database is located.

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.
As an example:
-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:
id your_user

Example output:
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods
We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:
```bash
docker exec -it calibre-web /bin/bash
```
  • To monitor the logs of the container in realtime:
```bash
docker logs -f calibre-web
```
  • Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' calibre-web
```
  • Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/calibre-web:latest
```

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.
Below are the instructions for updating containers:

Via Docker Compose

  • Update images:
* All images:

    ```bash
    docker-compose pull
    ```

* Single image:

    ```bash
    docker-compose pull calibre-web
    ```
  • Update containers:
* All containers:

    ```bash
    docker-compose up -d
    ```

* Single container:

    ```bash
    docker-compose up -d calibre-web
    ```
  • You can also remove the old dangling images:
```bash
docker image prune
```

Via Docker Run

  • Update the image:
```bash
docker pull lscr.io/linuxserver/calibre-web:latest
```
  • Stop the running container:
```bash
docker stop calibre-web
```
  • Delete the container:
```bash
docker rm calibre-web
```
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images:
```bash
docker image prune
```

Image Update Notifications - Diun (Docker Image Update Notifier)

>!TIP >We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:
git clone https://github.com/linuxserver/docker-calibre-web.git
cd docker-calibre-web
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/calibre-web:latest .

The ARM variants can be built on x8664 hardware and vice versa using lscr.io/linuxserver/qemu-static
docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 28.10.25: - Add libxfixes3 and libasound2t64 to support epub to pdf conversion; also set --no-sandbox for qtwebengine.
  • 07.01.25: - Set kepubify path by default.
  • 05.12.24: - Rebase to noble.
  • 26.08.24: - Add new dep, xdg-utils.
  • 07.07.24: - Add new dep, libmagic1.
  • 17.10.23: - Remove some packages that are required by the calibre mod but not the base container.
  • 07.10.23: - Install unrar from linuxserver repo. Switch to Python virtual environment.
  • 13.04.23: - Deprecate armhf.
  • 27.03.23: - Add cmake as build dep for Levenshtein.
  • 27.12.22: - Add ghostscript, libxtst6, libxkbfile-dev.
  • 20.12.22: - Improve init script and prevent harmless error.
  • 19.10.22: - Rebase to jammy. Upgrade to s6v3. Clean up build dependencies.
  • 04.11.21: - Update pip arguments to ignore distro installed packages.
  • 24.06.21: - Add note on optional OAUTHLIBRELAXTOKENSCOPE for Google OAUTH support.
  • 17.05.21: - Add linuxserver wheel index.
  • 10.02.21: - Add libxrandr2
  • 25.01.21: - Add nightly tag
  • 19.01.21: - Add python3-pkg-resources
  • 13.01.21: - Rebase to Ubuntu Focal, see here for troubleshooting armhf.
  • 12.10.20: - Add libxi6
  • 12.07.20: - Add kepubify for arm64v8
  • 05.06.20: - Add kepubify for x86-64 and arm32v7
  • 06.05.20: - Add libxslt1.1 and update ImageMagick policy
  • 19.01.20: - Adding LDAP libs.
  • 13.10.19: - Migrate to Python3.
  • 01.08.19: - Add libxcomposite1.
  • 13.06.19: - Add docker mod to enable optional ebook conversion on x86-64. Add unrar.
  • 02.06.19: - Rebase to Ubuntu Bionic & add Gdrive support.
  • 23.03.19: - Switching to new Base images, shift to arm32v7 tag.
  • 23.02.19: - Rebase to alpine 3.9, use repo version of imagemagick.
  • 11.02.19: - Add pipeline logic and multi arch.
  • 03.01.19: - Remove guest user from default app.db.
  • 16.08.18: - Rebase to alpine 3.8.
  • 03.07.18: - New build pushed, all versions below 67 have vulnerability.
  • 05.01.18: - Deprecate cpucore routine lack of scaling.
  • 06.12.17: - Rebase to alpine 3.7.
  • 27.11.17: - Use cpu core counting routine to speed up build time.
  • 24.07.17: - Curl version for imagemagick.
  • 17.07.17: - Initial release.

Serve Calibre Web on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.

Proxying calibre-web.example.com to http://calibreweb:8083

Add this to your Caddyfile

calibre-web.example.com {
	reverse_proxy http://calibreweb:8083
}

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs calibreweb
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Published on a random port

This template exposes 8083/tcp without setting a host port, so Docker picks a random free one on every deploy.

  • Find it in the Ports column of Portainer's container list, or with docker port calibreweb

Permission denied on volumes

If the logs show "permission denied", the app can't write to its data folder on the host.

  • Fix the ownership: sudo chown -R 15000:15000 /opt/mediadepot/apps/calibre-web/config (and the same for the other mapped folders)
  • Or set the PUID and PGID variables (defaults 15000:15000) to match your own user, found with id $USER

Image won't pull

Test the pull directly on the host: docker pull linuxserver/calibre-web:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect calibreweb --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

A single container

Calibre Web runs as one container, the simplest kind of app here. Just the one image to pull and nothing else wired up alongside it.

The app image

An image is the app packed up ready to go, everything Calibre Web needs bundled into one download. This template pulls linuxserver/calibre-web:latest, which Docker fetches once (about 248 MB) and then starts your own copy from.

Where the image comes from

Docker pulls its images from registries, public libraries of ready-built apps. Calibre Web's comes from Docker Hub, published by linuxserver.

Version tags

The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is 0.6.27. Pin a specific tag if you would rather stay on one version.

Which machines it runs on

Every image is built for particular CPU types. This one ships for amd64, arm64, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.

Ports

A port is the door the app answers on. Here the app exposes a port but leaves the host side blank, so Docker picks a free one for you. It opens:

  • 8083, published on a random host port

Volumes

A volume is where Calibre Web keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:

  • /config from /opt/mediadepot/apps/calibre-web/config on the host
  • /books from /media/storage/ebooks on the host

Environment variables

Environment variables are the settings you hand over when you deploy, things like a password or a timezone. Calibre Web takes 5 of them, all with defaults you can leave alone or tweak:

  • PUID, defaults to 15000. For UserID
  • PGID, defaults to 15000. For GroupID
  • TZ, defaults to America/Los_Angeles. Specify a timezone to use for example Europe/Amsterdam
  • DOCKER_MODS, defaults to linuxserver/mods:universal-calibre. #optional & x86-64 only Adds the ability to perform ebook conversion
  • OAUTHLIB_RELAX_TOKEN_SCOPE, defaults to 1. Optionally set this to allow Google OAUTH to work

Restart policy

The restart policy here is unless-stopped, so Docker restarts Calibre Web after a crash or reboot, but leaves it off when you stop it on purpose. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).

Users and permissions

The PUID and PGID settings tell it which user and group to act as on your host. Point them at your own account (find yours with id $USER) so the files it writes into your mounted folders come out owned by you rather than root.

Networking

Nothing custom is set, so Calibre Web sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.

Container name

Once it's deployed, Portainer names the container calibreweb. That's what you'll spot in the containers list and use in commands like docker logs calibreweb.

Labels

Labels are small notes pinned to the container. They don't change how Calibre Web behaves, but other tools read them, most often a reverse proxy like Traefik working out which apps to route where. This template sets:

  • traefik.enable=true
  • traefik.http.services.calibreweb.loadbalancer.server.port=8083
  • traefik.http.routers.calibreweb.entrypoints=websecure
  • traefik.http.routers.calibreweb.tls.certresolver=mydnschallenge

Platform

The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.

Open source license

Calibre Web is open source, released under the GPL-3.0 license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.

Portainer app templates

Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Calibre Web up. Add the template list to Portainer once, then deploying Calibre Web is a click rather than a wall of config.