Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 11-13-2025, 05:19 PM   #1
Venia Legendi
Member
Venia Legendi began at the beginning.
 
Venia Legendi's Avatar
 
Posts: 17
Karma: 10
Join Date: Apr 2013
Device: lots of, frequently changing
Connecting calibredb to running content server using SSL (self signed)

Hello, I run a content server in docker with

Code:
/usr/bin/calibre-server --port 8081 \
--enable-local-write --enable-auth --userdb /ebook/server-users.sqlite \
--ssl-certfile /config/ssl/cert.pem --ssl-keyfile /config/ssl/cert.key \
--url-prefix /ebook /ebook/eBooks
works great, thanks.

But when I try to connect from docker shell with:
Code:
calibredb --with-library https://localhost:8081/#eBooks \
--username Huh --password Buh list --limit 10
I get an somewhat explainable "urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate", it's self signed.

I have no idea how to provide calibredb with the certificate it seems to miss, any one has?

Thanks.
Venia Legendi is offline   Reply With Quote
Old 11-13-2025, 10:00 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,626
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
caliredb uses python which in turn uses openssl. There are env vars that control where openssl gets its certs from. Presumably you could use those, though havent actually tried.
kovidgoyal is offline   Reply With Quote
Old 11-14-2025, 04:07 PM   #3
Venia Legendi
Member
Venia Legendi began at the beginning.
 
Venia Legendi's Avatar
 
Posts: 17
Karma: 10
Join Date: Apr 2013
Device: lots of, frequently changing
Quote:
Originally Posted by kovidgoyal View Post
caliredb uses python which in turn uses openssl.
OK, that's it - THANK YOU.

If someone is interested, using docker with linuxserver's calibre
Code:
# Get all info on domain:
echo | openssl s_client -servername 127.0.0.1 -connect 127.0.0.1:8081
# Up, running, only certifacate missing

# Any environment?
env | grep -i ssl
# None for me

# SSL Config Directory
openssl version -d
# is /usr/lib/ssl, there
# /usr/lib/ssl/certs -> /etc/ssl/certs

# get the subject hash of the cerficate
openssl x509 -subject_hash -in myRoot.crt | head -1

# copy it, "normally" file with name, symlink with hash, easy going here:
cp myRoot.crt /etc/ssl/certs/[subject hash].0
# Check again with openssl, calibredb connects flawlessly
# I mapped the file in my compose.yaml
Venia Legendi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL when running Calibre as local server passegua Server 0 01-07-2021 10:57 AM
calibredb does not work with content server running (content server is using --enable Irvin Server 3 01-08-2019 03:47 AM
Accessing Calibre running SSL via HTTP breaks the server Naenyn Calibre 12 03-19-2018 12:47 AM
How to use SSL on Mac running Server paul55391 Devices 3 08-13-2017 11:18 PM
calibredb cannot add with content server running apiontek Calibre 10 08-04-2017 05:50 AM


All times are GMT -4. The time now is 12:53 PM.


MobileRead.com is a privately owned, operated and funded community.