I've been trying to do this myself, but I'm strictly using command line tools and am experiencing some trouble. I have my systemd unit file and my certificate from letsencrypt. My unit file is below.
Code:
1 [Unit]
2 Description=Calibre Content Server
3 After=network.target
4
5 [Service]
6 Type=simple
7 PIDFile=/var/run/calibre-server.pid
8 User=jlosito
9 Group=jlosito
10 ExecStart=/opt/calibre/calibre-server \
11 --port 8081 \
12 --userdb /srv/calibre/users.sqlite \
13 --enable-auth \
14 --access-log /var/log/calibre/access-log \
15 --log /var/log/calibre/log \
16 "/run/media/jlosito/7022f255-e61e-43f3-a5a9-216d5559fc84/Calibre Library"
17
18 [Install]
19 WantedBy=multi-user.target
When I add the following two lines to the unit file in ExecStart, everything breaks.
Code:
16 --ssl-keyfile /etc/letsencrypt/live/losito.ddns.net/privkey.pem \
17 --ssl-certfile /etc/letsencrypt/live/losito.ddns.net/fullchain.pem \
I noticed an error in the logs. It reads as the following:
Quote:
Unhandled exception in state: State: do_ssl_handshake Client: 192.168.1.1:40352 Request: WebSocketConnection
Traceback (most recent call last):
File "site-packages/calibre/srv/loop.py", line 569, in tick
File "site-packages/calibre/srv/loop.py", line 177, in do_ssl_handshake
SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:590)
|
I'm really stuck and have no idea what to do. Is it required to set up a reverse proxy using nginx or apache?