Docker - Calibre-web Container Setup with New Calibre Database

I use Calibre-web to sync e-books to my Kobo eReader. Here I describe my setup of the Docker Calibre-web container.


I run this Docker container on a Ubuntu VM that runs via [[ Proxmox VE ]]. I perform the following on the CLI.

Docker pull command:

docker pull linuxserver/calibre-web

Within my home folder I have created a Docker folder where I create a subfolder for each container:

cd ~
mkdir -p docker/calibreweb
cd docker/calibreweb

Also create the folders where the calibre-web books and config can be stored:

mkdir books
mkdir config

I use the Nano text editor to create a shell script:

sudo nano

With this shell script we are going to create the container. Copy the following into

IDu=$(id -u $(logname)) # Saves the logged in user id in the IDu variable
IDg=$(id -g $(logname)) # Saves the logged in user group in the IDg variable

docker run -d \
 --name=calibreweb \
 --hostname=calibreweb \
 -p 8083:8083 \
 -e PUID=$IDu \
 -e PGID=$IDg \
 -e TZ=Europe/Amsterdam \
 -e DOCKER_MODS=linuxserver/calibre-web:calibre \
 -v $PWD/config:/config \
 -v $PWD/books:/books \
 --restart unless-stopped \

If necessary, adjust the following:

-p 8083:8083
Choose a port that is still available. Check this with netstat

-e TZ=Europe/Amsterdam
Pick the right timezone

-e DOCKER_MODS=linuxserver/calibre-web:calibre
(optional) x86-64 only. Adds the ability to perform ebook conversion

-v $PWD/config:/config
Choose the location for the Calibre-web configuration. In this example it is the config map we created.

-v $PWD/books:/books
Choose the location for the Calibre-web books and metadata/database. In this example it is the books map we created.

Exit Nano (CTRL-X) and save the changes.

Now create the container:

sudo sh

Check if the container is running properly.

See also my notes about updating containers with Portainer or via the CLI. With Synology’s Docker Application, updating a container is also very easy.

Create the Calibre Database

Below is described how you can create a new Calibre database. This is a one time thing and the container can be safely updated because the database is stored outside the container via the /books mapping.
You can skip this step if you are using an existing Calibre database.

Go to the shell inside the container (make sure the container is running):

docker exec -it calibreweb sh #open shell in the container

And do the following:

cd /app/calibre/bin #go to the bin folder
calibredb restore_database --really-do-it --with-library /books #create a new db
chmod a+w /books/metadata.db #add write privileges

Calibre-web Configuration

Calibre-web can now be accessed via the following URL:

http://<IP DOCKER HOST>:8083
  1. Enter /books as your Calibre library location.
  2. Login with the default username admin and password admin123.
  3. Now go to the profile of admin by clicking on Account (top right) and admin or by going to http://IP:8083/me (use the IP of your docker host). Change the username, password and other settings if desired.
  4. Now open the Settings and click Edit Basic Configuration, expand External Binaries and add the following:
    • Location of Unrar binary: /usr/bin/unrar
    • Path to Kepubify E-Book Converter: /usr/bin/kepubify
    • Path to Calibre E-Book Converter: /usr/bin/ebook-convert (only when you have enabled book conversion when creating the container via DOCKER_MODS=linuxserver/calibre-web:calibre)

Make sure Enable Uploads is checked under Feature Configuration so that you can upload e-books. Under Feature Configuration you can also enable Kobo Sync, but I have described that in detail here.

Click Save when you are done configuring.

Read other notes


    No comments found for this note.

    Join the discussion for this note on this ticket. Comments appear on this page instantly.


    Notes mentioning this note

    Notes Graph