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.

Port Mapping

Featured Replies

Hello,

 

I apologize if this should be posted in the specific container support port. I'm pretty sure this is a general docker question though.

 

I'm going to explain a little bit about what I'm trying to do, to give some context. I'm attempting to connect my Amazon Alexa Echo Dot to Node Red and to do that I need my node red docker to listen on port 80. Well, this requires that I run node red as root user and I really would like to avoid that. I'm able to change the port that my node on node red is listening to from 80 to 1885 (can be random). When my echo dot tries to connect to my node red server it is going to reach out on port 80 so I need some mechanism to forward that port from 80 at the host to 1885 in the container.

 

Here is my docker run command

run -d --name='nodered' --net='br0' --ip='192.168.50.12' --log-opt max-size='50m' --log-opt max-file='1' --privileged=true -e TZ="America/Anchorage" -e HOST_OS="Unraid" -e 'TCP_PORT_1880'='1880' -v '/mnt/user/docker/appdata/nodered':'/data':'rw' --publish 80:1885 'nodered/node-red-docker:v8'

 

To do this, I assumed docker port forwarding would be my solution. On my Container configuration page I've add the following to extra parameters

-p 80:1885

and restart the docker container. When the docker page refreshes this is what is now showing in my port mappings (port 1880 is the port for the node red ui). 

192.168.50.12:1880/TCP <-> 192.168.50.12:1880
192.168.50.12:1885/TCP <-> 192.168.50.12:1885

This stand out to me right away as being incorrect, shouldn't it show 1885/TCP <-> 80/TCP?

 

When I navigate to 192.168.50.12:1885/description.xml I'm served with the contents that I'm expecting to be served at 192.168.50.12:80. 

 

When I run the command 

docker port nodered

I don't see any results...should I expect to see my port mapping here? (again, I'm a novice and don't even know where to begin with this). 

 

When I run the command 

docker inspect nodered

there is a block under  HostConfig that shows the following (which seems correct to me?)

"PortBindings": {
                "1885/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "80"
                    }
                ]
            },

 

I'm not sure if this is an unraid issue or a docker issue or a docker container issue so I'm being jerked around all over the place trying to solve this on my own, I'm not sure where I should focus my attentions. Any help would be greatly appreciated.

 

Thank you

Edited by AKSnowman
Added docker run command.

  • Community Expert

Post your docker run command as explained in the very first link in the Docker FAQ pinned near the top of this same subforum. 

  • Author

I'm so sorry. For some reason when I looked at the FAQ for this exact thing (posting rules) I somehow skipping the first link.

  • 3 months later...
  • 2 months later...

Sorry to wake an old thread, But was there ever any headway made on this. I'm facing the same issue.

Port mapping works (and always has).  The OP's problem is that he's running on a custom IP address so port mapping is irrelevant and doesn't make sense in the first place.  

Hey Squid,

 

So does that mean that if your using br0 you cant change port mappings on the host side? Say for example using something like cloudflared for DNS over HTTPs and need to use port 53 instead of 5053, that its impossible. 

You need to create a custom docker network bridge via the command line, which I cannot help you with to be able to map ports if you're using separate IP addresses.

👍 Thanks that is plenty to go off

  • 1 month later...

I'm going to revive this thread as there is a similar amazon node that i would like to install.

BUT, in order to do so, it requires node-red to be running on the host network, for alexa to be listening on Port 80

 

Since i have my dockers on br0 with individual assigned IP's, is there anyway to have br0 listen to port 80 on the host network?

 

This is my run cmd

1833987453_dockerruncmd.thumb.png.d35b57f7a279443d7cf032074c73021b.png

 

Thanks

  • 7 months later...

i would like to know the answer to this too

On 6/11/2020 at 9:41 AM, bdydrp said:

I'm going to revive this thread as there is a similar amazon node that i would like to install.

BUT, in order to do so, it requires node-red to be running on the host network, for alexa to be listening on Port 80

 

Since i have my dockers on br0 with individual assigned IP's, is there anyway to have br0 listen to port 80 on the host network?

 

This is my run cmd

1833987453_dockerruncmd.thumb.png.d35b57f7a279443d7cf032074c73021b.png

 

Thanks

 

  • 1 year later...

did anyone solve this....

Basically Im moving from smarththings to home assistant.  There is only one thing left for me to do with Home Assistant before I throw away smartthings!

That's issue a voice command to instruct HA to do something.

 

I dont want to pay the monthly subscription to use allow HA to work with amazon, I want to keep things local rather than via the cloud.

There are several palettes in node-red, but they require you to listen on port 80, and I cant work out how to listen on port 80.

Can someone give an indication on how this would work on node-red.

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.