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.

Container Port/Host Port

Featured Replies

I'm trying to set up my first container (CalibreServer2) but I'm having a great deal of trouble getting a laymans explanation of how to set the container port and host port.  There is little resource available for the "code challenged".  Do I simply apply 8080 as it is a server, do I have to make adjustment to my router? I currently tried 8080/tcp = 192.168.1.11:8088 port mappings but can't go anywhere with this.  Will I even be able to access my server outside of my network once I'm running?

Access outside your network is unrelated to your subject. You need a VPN for that. Whatever you do don't just blindly forward ports on your router.

 

I'm trying to set up my first container (CalibreServer2) but I'm having a great deal of trouble getting a laymans explanation of how to set the container port and host port.  There is little resource available for the "code challenged".  Do I simply apply 8080 as it is a server, do I have to make adjustment to my router? I currently tried 8080/tcp = 192.168.1.11:8088 port mappings but can't go anywhere with this.  Will I even be able to access my server outside of my network once I'm running?

 

It appears that you are getting confused between ports on your router, ports on your server and ports within the container.

 

Essentially the container that is running within docker works similar to a VM in that it has it's own set of ports. From within the docker config you "map" via bridge mode (or Host mode if you are happy for the containers' default port to be mapped to the same port on your unRAID Server) a container port to a port on your unRAID Server. You would then (if you are trying to expose this to the internet) map a port from your router to the port on your unRAID Server.

 

Read here for a short explanation I wrote:

 

http://lime-technology.com/forum/index.php?topic=43317.msg458864#msg458864

 

To put things into an example for you lets say we are installing a docker app with a web gui (e.g. sabnzbd or similar):

 

## internal to docker and transparent to you ##

- Container default port set to run on 8080

- Container "internal" IP address is 172.17.0.6

- Inside Docker the container web guy is accessible (on 172.17.0.6:8080)

 

## what you see from unRAID web guy and LAN ##

- Container - via Docker Settings in unRAID web gui - is set (via Bridge mode) to map the internal container port of 8080 to 7070

- Container web gui is accessible on your LAN (assuming the container is using http and your unRAID Server is called Tower and has IP of 192.168.1.2) via http://Tower:7070 OR http://192.168.1.2:7070

 

## you want to have it accessible via the web on port 6060 ##

- You log onto your router and find your NAT / Port Forwarding section and assign a rule forwarding port 6060 to port 7070 on 192.168.1.2

- Router has an external IP of 115.777.666.1

- Container is now accessible outside the LAN on http://115.777.666.1:6060 OR if you had a domain name assigned to your IP it could be http://www.example.com:6060 OR if you have dynamic dns set-to point to your IP it could be something like http:://my-sample-dns-name.dyn-dns.org:6060

 

So in summary what you have is this (note this is exaggerated for effect):

 

Container:8080>Host:7070>Router:6060>Domain:6060

 

As a side note this is NOT normally the recommended way of giving yourself remote access to web applications which (in the main) are only really intended to be access from your LAN. An example of the sort of web gui you do NOT want to expose to the Internet via port forwarding or otherwise is your unRAID web GUI. DON'T DO IT. DON'T EVEN TRY!!

 

There are however some applications that have some sort of in-built security and many people DO expose those applications to the Internet either via port forwarding (as we describe above) or via Reverseproxy.

 

Setup reverse proxy to access these applications remotely without the need for utilising a port number. This is done very well via the linuxserver.io Apache Docker (with pre-configured reverse proxy):

 

http://lime-technology.com/forum/index.php?topic=43858.0

 

This is an apache web server docker with reverse proxy services enabled. Reverse proxy gives the ability going to www.domain.com:8351 for a service, you can go direct to www.domain.com/service and also enable HTTPS.

 

I won't go into how to do this as there is a VERY comprehensive guide to doing this here by our own CHBMB here:

 

https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/installation-of-apacheweb-docker/

 

MANY people use this method and consider it to be secure enough for them. I DID do this but decided that there was a much more secure approach and that was to install a VPN server service on my unRAID Server and attach my devices to the VPN when I want to access local resources from a non LAN / Remote location. I advise wherever possible to use this method over any other.

 

I use this excellent linuxserver.io OpenVPN-AS Docker:

 

http://lime-technology.com/forum/index.php?topic=43317.0

 

OpenVPN Access Server is a full featured secure network tunneling VPN software solution that integrates OpenVPN server capabilities, enterprise management capabilities, simplified OpenVPN Connect UI, and OpenVPN Client software packages that accommodate Windows, MAC, Linux, Android, and iOS environments. OpenVPN Access Server supports a wide range of configurations, including secure and granular remote access to internal network and/ or private cloud network resources and applications with fine-grained access control.

 

One of the GREAT benefits of doing this is you ONLY need to open 1 port on your router to facilitate the VPN connection and once connected you can access ALL services that are accessible on your LAN as if you were at home INCLUDING in this instance your unRAID web gui.

 

Please remember that to facilitate an easy installation of any Docker (or Plugin for that matter - but we haven't talked about Plugins) you should install the Community Applications Plugin:

 

http://lime-technology.com/forum/index.php?topic=40262.0

 

This plugin will allow you to easily search for and add any of the unRaid docker or plugin applications.

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.