Calibre is an e-book management desktop application available on many platforms. Calibre-Web is a web front end for your e-book library maintained by your Calibre Desktop. This will potentially make your desktop into a self-hosted web e-book reader. We will install Calibre-Web as a Docker container and add an existing Calibre library to it in this tutorial.
Installing Calibre-Web Docker container
Make sure you have installed Portainer & Docker before proceeding. We will add a docker stack of Calibre-Web and mount the existing Calibre library to the container.
1. On Portainer, add a new stack with name CalibreWeb. Leave the Build method as Web Editor.
2. Copy the below compose file content into the Web editor. Do not deploy the stack yet, I’ll explain what some of the important configurations do in the following steps. You can customize if needed.
--- version: "2.1" services: calibre-web: image: linuxserver/calibre-web container_name: calibre-web ports: - 8083:8083 environment: - PUID=1000 - PGID=1000 - TZ=America/Denver volumes: - /opt/container/calibre-web/config:/config - /opt/container/calibre/data/Calibre Library:/books restart: unless-stopped
3. The default Container port is 8083, and it can be mapped onto a different host port. Here I set that also to the same 8083 on host.
4. Now set your user id and group id from the host to run this container with. Make sure this user has full access to the folders it’s going to use on the host.
5. Next, add a location for storing the Calibre-Web data. To do that map the /config container folder to a host folder of your choice.
6. Map the existing Calibre library location to the container’s /books folder. This is all you need for Calibre-Web to read the library.
7. Deploy Stack once everything above is done, portainer will install the container and start it.
8. After it starts, go to http://localhost:8083 on your browser. It will go to first time library configuration page. Enter /books here and save (that is where mapped the library onto).
9. Next, click login with the default admin credentials (username: admin, password: admin123).
All done! Now you can browse, read, and upload books to your Calibre library via web browser itself.