Create Local Domain Names With UNRAID and Pi-hole
If you are tired of using port numbers to access the WebUI's of your docker services on UNRAID, this guide will show you how to make friendly URL's for using around your internal network. This change is also nice if you have other household members that want to access the services, but their eyes gloss over when you start talking about port numbers.
The only thing you need besides your UNRAID server is a Rapsberry Pi running Pi-hole. You also need to make sure your router is using your Pi-hole as its first nameserver. If its not, I'm not sure what you are doing with it anyway.
The full write-up is below the video tutorial.
Creating (or Editing) a Container
When you create (or edit) one of your docker containers, change the
Network Type to
Custom: br0. This will give you the option to assign a fixed IP address to be used on your internal network.
Depending on which type of router you are using, it may be assigning based on
10.X.X.X. Check your router admin portal for what scheme it uses.
After changing the
Network Type, assign a
Fixed IP Address in the option directly below.
Make sure the IP you assign doesn't conflict with something already on your network.
Confirm that the container is up and working. Visit the WebUI and make sure the newly-assigned IP address is accurate.
Local DNS on Pi-hole
Now you need to assign a web address using Pi-hole's Local DNS feature.
Log into your Pi-hole's admin panel and go to Local DNS > DNS Records:
Under Add a new domain/IP combination, put the url you would like to use for the service while on your local network. Under IP Address, put the IP address assigned to the service by UNRAID in the previous step. Then hit Add.
Once complete, the new domain should show up under List of local DNS domains at the bottom of the page:
That's it! Now any device connected to your local network should be able to access the WebUI of this service by typing in the local domain listed here.
Chrome does a search of the URL in Google, rather than opening the WebUI.
Chrome handles unique URLs a little different if it doesn't fit a standard format. For example, if you use
.local at the end, it will not see that as a URL, but rather a search query in the address bar. You can address this by adding
https:// before the URL. You can also change the local name to something Google will recognize as a URL.
My Plex/Sonarr/Radarr/etc isn't working now.
Its likely that the settings need to be updated to reflect the new location of the services. Before adding unique URLs, these devices all had the same IP address with different port numbers. Revisit the settings in each service and update them accordingly.
I can't access these services from outside my network with these URLs.
These are local URLs only, assigned by your Pi-hole. They can't be seen from outside the network. However, if you can VPN into your home network, the URLs will work as intended, as long as you stay connected.
Certain devices will not recognize or find these URLs.
You may need to change the client's DNS server addresses if you had overridden them in the past. You can either have the router assign them directly, or point the first one to your Pi-Hole's IP address. Additionally, make sure your router's DNS settings list your Pi-Hole's IP address first: