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.

Guide to linking containers

Featured Replies

Hi,

 

I browsed tirelessly through the forums to try and find a way to link up containers that communicate with each other, but was disappointed to see that the preferred solution was dropping files into directories shared between containers. I wasn't satisfied with this approach and decided to find a way to link the containers so that data can be exchanged between them via network communication, like it should be. So without much further ado, here is a quick overview of how I linked up SickBeard container with NZBGet so that it can pass NZB files to it directly:

 

Forget the silly text, I used localhost instead of docker host's hostname, but here's a guide to linking containers either way :)

 

Step 1 - Add instruction to link SickBeard to NZBget in the unRAID webGUI

 

e0BRbc8.png

 

The command is

--link <container name to link with>:<alias>

Remember the alias because you will need it for...

 

Step 2 - Refer to the NZBGet container in SickBeard

 

When you perform the linking, docker will create some environment variables that specify which IP address was linked under, and what ports are available. In addition to this, it will also create a hostname in the container you created the link from, that maps alias from the --link command to the internal IP given to the container you linked to. This is probably best seen rather than explained:

 

root@Tower:/mnt# docker exec -i -t e0c4109fc635 bash
root@e0c4109fc635:/# cat /etc/hosts         
172.17.0.25	e0c4109fc635
ff02::2	ip6-allrouters
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
172.17.0.11	nzbget

 

Note the last line! We can now use this to refer to the target container directly, like so:

RC7q40f.png

 

And voila! You're done.

 

It would be nice if there was some sort of a "helper" page in the webGUI to achieve this, but this approach isn't too bad.

Hi,

 

I browsed tirelessly through the forums to try and find a way to link up containers that communicate with each other, but was disappointed to see that the preferred solution was dropping files into directories shared between containers. I wasn't satisfied with this approach and decided to find a way to link the containers so that data can be exchanged between them via network communication, like it should be. So without much further ado, here is a quick overview of how I linked up SickBeard container with NZBGet so that it can pass NZB files to it directly:

 

Step 1 - Add instruction to link SickBeard to NZBget in the unRAID webGUI

 

e0BRbc8.png

 

The command is

--link <container name to link with>:<alias>

Remember the alias because you will need it for...

 

Step 2 - Refer to the NZBGet container in SickBeard

 

When you perform the linking, docker will create some environment variables that specify which IP address was linked under, and what ports are available. In addition to this, it will also create a hostname in the container you created the link from, that maps alias from the --link command to the internal IP given to the container you linked to. This is probably best seen rather than explained:

 

root@Tower:/mnt# docker exec -i -t e0c4109fc635 bash
root@e0c4109fc635:/# cat /etc/hosts         
172.17.0.25	e0c4109fc635
ff02::2	ip6-allrouters
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
172.17.0.11	nzbget

 

Note the last line! We can now use this to refer to the target container directly, like so:

RC7q40f.png

 

And voila! You're done.

 

It would be nice if there was some sort of a "helper" page in the webGUI to achieve this, but this approach isn't too bad.

 

This is really neat and I didnt' know you could do that... curious what is the benefit of doing this over IPADDRESSOFUNRAID:6789 in the NZBGET URL

  • Author

Funny thing, I was unable to get connectivity with the unRAID host ports from the sickbeard docker container, but now I went back and tried it again just to double check... and what do you know... I can reach NZBGet through the host port without any linking  :D

 

EDIT: I used localhost instead of tower as the hostname from SickBeard. Yep, I'm an idiot. Ah well, in case you'll want to link up containers directly for some OTHER reason than stupidity, now you know how. :)

Funny thing, I was unable to get connectivity with the unRAID host ports from the sickbeard docker container, but now I went back and tried it again just to double check... and what do you know... I can reach NZBGet through the host port without any linking  :D

 

EDIT: I used localhost instead of tower as the hostname from SickBeard. Yep, I'm an idiot. Ah well, in case you'll want to link up containers directly for some OTHER reason than stupidity, now you know how. :)

 

I'm glad you found out how to do it :)

  • 2 years later...

 

Maybe this is a dumb question but.....

 

Can you link two containers? 

  1. I have linked Sonarr and NZBGet and it works fine - score!
  2. I also use "Hydra" and would like to link Sonarr and Hydra (at least I think this would be nice?)

I tried both "--link hydra:hydra --link NZBGet:nzbget" and "--link NZBGet:nzbget hydra:hydra " but neither seems to work?

 

And perhaps you are only meant to link one container to one container? 

 

Thanks!

  • 2 years later...

Not sure if this is still something that you need. I just found (Unraid 6.6.7) that if you select the 'advanced view' (change the toggle that normally says 'basic view' on the top right); you then have the option of 'Extra Parameters. This is where I was able to add the --link <container-name>.

 

965283270_ScreenShot2019-06-06at2_15_55pm.thumb.png.3106557ea2f91e54b0e25f8f8b4244d8.png

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.