Hello, I have a pretty large docker-compose file that has many services running through a VPN tunnel. I have tried to add the Package calibre · GitHub image, but am having issues accessing its web UI.
The following is the portion of my docker-compose for Calibre:
calibre:
image: ghcr.io/linuxserver/calibre:latest
depends_on:
vpn:
condition: service_healthy
network_mode: "service:vpn"
environment:
- PUID=1011
- PGID=1001
- TZ=America/New_York
- SUBFOLDER=/calibre/
volumes:
- ./docker-calibre:/config
My vpn service looks like this:
vpn:
image: dperson/openvpn-client
command: openvpn.sh -f ""
cap_add:
- NET_ADMIN
dns:
- 127.0.0.1
- 10.9.0.1
devices:
- /dev/net/tun:/dev/net/tun
networks:
app_net:
ipv4_address: 172.21.5.2
read_only: false
restart: always
security_opt:
- label:disable
tmpfs:
- /tmp
tty: true
working_dir: "/vpn"
volumes:
- ./vpn:/vpn
I have nginx and network definition running as a reverse proxy like so:
web:
image: mcgriddle/nginx-self-cert
depends_on:
vpn:
condition: service_healthy
calibre:
condition: service_started
networks:
- app_net
environment:
- PUID=1011
- PGID=1001
- TZ=America/New_York
- DH_SIZE=2048
volumes:
- ./docker-web:/config
links:
- vpn:calibre
ports:
- "443:443"
networks:
app_net:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.21.5.0/24
My nginx calibre.subfolder.conf looks like so:
## Version 2022/09/08
# In calibre docker arguments, set an env variable for SUBFOLDER=/calibre/
# for the content server, go into calibre preferences / sharing over the net / advanced and
# set the first option for prefix url to '/content-server', save and restart the container
# the content server will be accessible at 'https://domain.com/content-server/'
location /calibre {
return 301 $scheme://$host/calibre/;
}
location ^~ /calibre/ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app calibre;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
location /content-server {
return 301 $scheme://$host/content-server/;
}
location ^~ /content-server/ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable for ldap auth (requires ldap-server.conf in the server block)
#include /config/nginx/ldap-location.conf;
# enable for Authelia (requires authelia-server.conf in the server block)
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app calibre;
set $upstream_port 8081;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
When I go to localhost/calibre I do see the following:
This seems to be like a VNC window, but I’d expect to see the Calibre setup wizard. I saw this after I added the ENV var to calibre as noted in the reverse proxy comments SUBFOLDER=/calibre/.
Before adding this ENV var I would see this error when going to localhost/calibre: Cannot GET /calibre/
I do see the following logs in the Calibre container, which may be errors?
[2022-11-14 11:47:42] [Connection 1] Closing connection with error: Error: WS was inactive for too long
at ClientConnection.checkActivity (/gclient/node_modules/guacamole-lite/lib/ClientConnection.js:154:24)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
[2022-11-14 11:47:42] [Connection 1] Closing guacd connection
[2022-11-14 11:47:42] [Connection 1] Client connection closed
guacd[262]: ERROR: User is not responding.
guacd[262]: INFO: User "@e91d0198-9086-409c-8d40-6ec50ee53dd0" disconnected (0 users remain)
guacd[262]: INFO: Last user of connection "$7597d97a-8ca0-4d72-96fa-5fb84b8eb517" disconnected
guacd[262]: INFO: Internal RDP client disconnected
guacd[208]: INFO: Connection "$7597d97a-8ca0-4d72-96fa-5fb84b8eb517" removed.
Sorry for the very long post, I wanted to try to put in as much info as possible.