docker-calibre-web icon indicating copy to clipboard operation
docker-calibre-web copied to clipboard

[FEAT] Possibility to change the web GUI port of an existing container with existing DB?

Open ihaddy opened this issue 1 year ago • 9 comments

Is this a new feature request?

  • [X] I have searched the existing issues

Wanted change

I've been migrating an existing calibre-web container that i've used for years and needed to change the port to reduce conflicts with other services already running on the same host. Is it possible to do this without a fresh install of the entire application?

If i need to remove certain ephemeral files, would anyone know which ones? like blowing away the calibre-web config volume?

Reason for change

reduce the need for a clean install of an existing deployment and wiping out its database and other related info.

Proposed code change

No response

ihaddy avatar Jun 17 '24 18:06 ihaddy

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

github-actions[bot] avatar Jun 17 '24 18:06 github-actions[bot]

You shouldn't need to change the webui port inside the container, you just change the bridged port on your deployment.

j0nnymoe avatar Jun 17 '24 18:06 j0nnymoe

So i'm actually using this in a docker compose where the network of the web container gets routed through a VPN container, so on the calibre-web container itself there's no ports exposed in the compose at all because i expose those on the linked vpn container

so my compose looks like this

version: "3"
services:
  iptables-vpn:
    container_name: iptables-vpn
    restart: unless-stopped
    image: iptables-vpn
    cap_add:
      - NET_ADMIN
    ports:
      - "8083:8080"
      - "8118:8118"
      - "3231:3000"
      - "5076:5076"
      # - "54321:5432"
      - "5800:5800"
      - "5801:5801/tcp"
      - "5801:5801/udp"
      - "5802:5802/tcp"
      - "5802:5802/udp"
      - "6379:6379"
      - "6789:6789"
      - "6881:6881/tcp"
      - "6881:6881/udp"
      - "9696:9696"
      - "8917:8989"
      - "54323:54323"
      - "8283:8083"
      - "8380:8080"
      - "8381:8081"
      - "6902:6901"

    volumes:
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VPN_ENABLED=yes
      - VPN_PROV=custom
      - VPN_CLIENT=openvpn
      - VPN_INPUT_PORTS=5800,3231,6379,54321,3000,5076,5801,5802,5076,6789,9696,5432,54323,8917,5433,8989,8283,8083,8380,8080,8081,8381,6902,6901
      - VPN_OUTPUT_PORTS=8083,8080,8181,8081,6789,6901,6902
      - DEBUG=true
      - WEBUI_PORT=8080
      - UMASK=000
      - PUID=1000
      - PGID=1000
      
  calibre-web:
    container_name: calibre-web-compose
    restart: unless-stopped
    image: lscr.io/linuxserver/calibre-web:latest
    depends_on:
      - iptables-vpn
    network_mode: iptables-vpn
    environment:
      - TZ=America/New_York
      - PUID=1000
      - PGID=1000
      - CALIBRE_PORT=8084
    volumes:
      - /home/rancher/calibre/calibre-web-config:/config
      - "/home/rancher/calibre/Calibre Library:/calibre-db"
      - /home/rancher/calibre/calibre-books:/books

I know it's unorthodox, but it's worked amazingly well for me so far, the only issue is another container in my stack uses the same port calibre web was using, and moving it outside of the stack and changing the exposed ports actually doesn't have any effect since the container already exists so i was wondering if there's a saved config for calibre-web that makes it remember the port that i'd need to change.

ihaddy avatar Jun 17 '24 19:06 ihaddy

Ah I see what you mean. Ok you'd need to edit the nginx config within the containers /config mount. It's not something we plan to add as an ENV option to our containers.

j0nnymoe avatar Jun 17 '24 19:06 j0nnymoe

yeah i figured it'd involve that since this is a little off the beaten path for normal use cases.

However does the calibre-web image use nginx by default? when i check the directory i have the /config bind mounted too, i only see a


calibre-web-config$ tree 
.
├── app.db
├── calibre-web.log
├── calibre-web.log.1
├── client_secrets.json
└── gdrive.db

0 directories, 5 files

i was wondering if the port parameter was saved in the app.db but i haven't opened it up yet

ihaddy avatar Jun 17 '24 19:06 ihaddy

Whoops, I thought it was. Looks like you'd need to deploy it then edit the server settings from within the webui.

j0nnymoe avatar Jun 17 '24 19:06 j0nnymoe

Hey sorry to revisit, but is this editable within the webui settings? all i can see if settings regarding meta data views. searched for a while and i didn't see any "server config" but maybe there's clickable buttons that i missed.

If you don't know, that's fine too, just figured i'd ask before closing this out :)!

ihaddy avatar Jun 18 '24 21:06 ihaddy

As I mentioned, you can edit it via the server settings in the webui.

j0nnymoe avatar Jun 18 '24 21:06 j0nnymoe

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

LinuxServer-CI avatar Jul 19 '24 02:07 LinuxServer-CI

closing as solution was provided and is documented by the project dev.

drizuid avatar Sep 11 '24 12:09 drizuid