[HELP][Dockers][Networking] UniFi fixed IP

Hi Everyone, first time poster here, I am 4th year software engineering student which has n’t been able to set an ip address for months … thanks in advanced btw for the help.

I am trying to set a fixed IP address for a unifi controller (running in a docker contain in Unraid, repository tried: linuxserver, brettm357), linuxserver seems more legit, but the other container has the latest server version and has been updated more often recently, regardless I haven’t been able to get either to have a fixed IP.

After the docker container is setup, and the controller is initialized with adoption of ap/router/usg. To set a fixed IP from the controller side (according to unifi support) is add client, to do this I need a mac address.

The brettm357 container’s problem is it seems not to have a network interface setup. I used “sudo docker inspect id”, mac address was “”… and I couldn’t figure out how to add one.

The linxserver container’s problem has a network interface, but the mac address is the same as my unraid server and unifi says it cannot have the same network … I included a pic.

Setting the IP address within unraid seems to work (it redirects the container to the proper address, but it doesn’t connect), I have posted about this on a few reddit post/other forums (reddit. com/r/unRAID/comments/e7gznr/unifi_controller_fix_ip_helpdockers/?utm_source=share&utm_medium=ios_app&utm_name=iossmf).
Thanks so much!!

I recommend setting up a MACVLAN network on your docker host, this will let your containers interact directly with your network. Use an adapter other than the one you use to manage your host, otherwise the host will not be able to talk to the containers on the macvlan network.

Then launch your unifi controller with --net (my_macvlan) --ip 192.168.1.xxx you can also specify a mac address if you want to, or docker will autogenerate one.

I cannot do that because I don’t have a dedicated network card for UniFi, it needs to be shared between unraid (host), VMs, and docker containers, any other way to set a container to have a mac address (a random one, I’m not even sure if that would work :man_shrugging:)

Your motherboard only has one network card? Been a long time since I’ve seen one like that. The MACVLAN adapter would not be dedicated to just unifi, you can have the other docker containers / vm’s use it. It just has the limitation of the host will be unable to talk to containers on that adapter.

You could try --net host … then your unifi will use the host’s IP as its own.

I just do this:

I have tried this, but after I set the Controller Hostname/IP, I then stop the controller, open the controller settings in unraid and change the network type to custom : br0 to 192.168.1.4.

After I restarted the container, I cannot get access to the unifi GUI.

I’ve got this set up forwarding ports to my host IP. That’s my recommendation. If you set up forwarding, you won’t encounter that issue.