Calibre-web sqlalchemy.exc.OperationalError


I just updated the Calibre-web container

version: ‘2.1’
container_name: calibre-web
- 8083:8083
- /volume1/calibre/Library:/books
- /volume1/calibre/Data:/config
- PUID=1000
- PGID=1000
- TZ=Etc/UTC

restart: unless-stopped
network_mode: "bridge"

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation)
Traceback (most recent call last):
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/”, line 3371, in _wrap_pool_connect
return fn()
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 327, in connect
return _ConnectionFairy._checkout(self)
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 894, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 493, in checkout
rec = pool._do_get()
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 256, in _do_get
return self._create_connection()
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 273, in _create_connection
return _ConnectionRecord(self)
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 388, in init
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 690, in connect
with util.safe_reraise():
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/util/”, line 70, in exit
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/util/”, line 211, in raise

raise exception
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/pool/”, line 686, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/”, line 574, in connect
return dialect.connect(*cargs, **cparams)
File “/lsiopy/lib/python3.10/site-packages/sqlalchemy/engine/”, line 598, in connect
return self.dbapi.connect(*cargs, **cparams)
sqlite3.OperationalError: unable to open database file

It’s docker on Synology NAS.

you’re either missing the required database or have a permissions issue with accessing it.
Confirm your calibre database file exists in /volume1/calibre/Library and confirm you told calibre-web to find it in /books

Yes, I checked with Calibre app and I can open the database in


I tell Calibre-web to find it in /books by:


  • /volume1/calibre/Library:/books

The DB permissions:

-rwxrwxrwx+ 1 1000 1000 3649536 Oct 6 12:32 metadata.db

is /volume a local or remote mount?
in calibre-web, have you selected /books/metadata.db as the database location?

/volume1 is local mount

Initially yes, I’ve selected /books. The configuration was working with older version of the calibre-web container.
The issue occur when I updated the container.
Currently I can’t go to web to see the configuration - web interface is not accessible because of this error (I guess)

what is the output of uname -mr && docker version

$ uname -mr
4.4.302+ x86_64

$ sudo docker version
Version: 20.10.23
API version: 1.41
Go version: go1.19.1
Git commit: 876964a
Built: Fri Sep 8 08:19:48 2023
OS/Arch: linux/amd64
Context: default
Experimental: true

Version: 20.10.23
API version: 1.41 (minimum version 1.12)
Go version: go1.19.1
Git commit: 5fcb1cf
Built: Fri Sep 8 08:18:18 2023
OS/Arch: linux/amd64
Experimental: false
Version: v1.6.15
GitCommit: b23a389d8c181697302d163356e97dec04eb8d88
Version: v1.1.4
GitCommit: 5af893d
Version: 0.19.0
GitCommit: ed96d00

your docker version is fine, but your kernel went end of life the beginning of 2022. Im not saying this is definitely the problem, but I have pretty much the same setup as you, with a supported kernel, and i have no issues.