Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can't get port assignments to work on container

Featured Replies

I am running the linux-server/calibre-web container and want it to run on its own IP address on the default 80 port instead of its standard 8083.

 

I've configured the docker three different ways to use that port as you can see in the attached screenshot. No luck. Any thoughts on what is going wrong here?

Screen Shot 2019-07-28 at 11.02.01.png

  • Author

Is this just broken? If I give it its own IP address and change the port - it sends different arguments than if I leave it on the bridge and change the port. Why?

 

Change port in Basic Config:
 

Quote

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='calibre-web' --net='br0' --ip='10.0.1.38' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'TCP_PORT_8083'='80' -e 'DOCKER_MODS'='linuxserver/calibre-web:calibre' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/user/ebooks/library/':'/books':'rw' -v '/mnt/user/appdata/calibre-web':'/config':'rw' 'linuxserver/calibre-web'

d506648f955d20519798e69ea9076397970d91a7cf3f439f7707f47c312ed8ec

 

 

This command doesn't do anything to the port at all. The container still runs at 8083.

Versus bridge:
 

Quote

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='calibre-web' --net='bridge' --log-opt max-size='50m' --log-opt max-file='1' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'DOCKER_MODS'='linuxserver/calibre-web:calibre' -e 'PUID'='99' -e 'PGID'='100' -p '8088:8083/tcp' -v '/mnt/user/ebooks/library/':'/books':'rw' -v '/mnt/user/appdata/calibre-web':'/config':'rw' 'linuxserver/calibre-web'

fb7bb7671040ca73303db023f229d2574ddf159c17e36c1f9190baeef062954a

 

This one works to change the port. But can't be used in combination with an assigned IP.

  • Author

If I try and send it that parameter in extra

 

Quote

-p '8088:8083/tcp'

 

It doesn't work either.

When you assign a unique IP to a container, it negates any mappings set, and forces the app to manage all the ports. If you wish to change the listening port you will need to do that in the application itself, however that particular app does it. The unraid interface no longer has any control over what ports the app uses.

  • Author

OK. I can try that again, but when I change the port on the app, it just becomes inaccessible. I will give it another go.

  • Author

Okay - so narrowed it down. I switched the application port to 8081 to try a different one. Worked fine if I changed the advanced setting to [IP]:[PORT:8081].

 

I tried port 80. Didn't work.

 

Console shows:

[2019-07-29 16:29:08,995] INFO in web: Starting Calibre Web...
[2019-07-29 16:29:09,377] INFO in server: Starting Gevent server
[2019-07-29 16:29:09,378] INFO in server: Unable to listen on '', trying on IPv4 only...
[2019-07-29 16:29:09,379] INFO in server: Error starting server: Permission denied: ('0.0.0.0', 80)
Error starting server: Permission denied: ('0.0.0.0', 80)

So it doesn't like 80 for some reason, but has no problem with other ports. Since the application has its own IP address, not sure what the next step is.

9 hours ago, tknx said:

Is this just broken? If I give it its own IP address and change the port - it sends different arguments than if I leave it on the bridge and change the port. Why?

When giving a container its own IP address, all port mapping is ignored and whatever the app itself wants to use it uses. Basically the same thing as host network.  IE: Port mapping only works in Bridge mode.

 

To get it to use 80 instead of 8083, you have to modify file(s) within the container.  

Edited by Squid

  • Community Expert
40 minutes ago, Squid said:

When giving a container its own IP address, all port mapping is ignored and whatever the app itself wants to use it uses. Basically the same thing as host network.  IE: Port mapping only works in Bridge mode.

 

To get it to use 80 instead of 8083, you have to modify file(s) within the container.  

Won't OP hit the problem of trying to open privileged ports with a non-privileged user (non-root)?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.