davestephens / ansible-nas

Build a full-featured home server or NAS replacement with an Ubuntu box and this playbook.
MIT License
3.26k stars 491 forks source link

Add Ubiquiti UniFi Controller docker support #153

Open bcurran3 opened 5 years ago

bcurran3 commented 5 years ago

https://hub.docker.com/r/linuxserver/unifi-controller

For those of us using UniFi equipment.

FYI: Uses the following ports: -p 3478:3478/udp -p 10001:10001/udp -p 8080:8080 -p 8081:8081 -p 8443:8443 -p 8843:8843 -p 8880:8880 -p 6789:6789

davestephens commented 5 years ago

Happy to accept a PR for this one, I don't have any UniFi gear myself so impossible for me to test / develop.

bcurran3 commented 5 years ago

Actually you don't need any of the gear to run the controller and access it via it's web interface. :)

davestephens commented 5 years ago

Maybe so, but it would be impossible fo me to test if it worked correctly.

Feel free to raise a PR and I'll merge it.

caillou commented 5 years ago

I have not yet managed to set up the linuxserver.io docker container of the UniFi controller other than with the --network=host. These are the problems I had with the default --network=bridge:

  1. The UniFi controller boradcasts its IP address to the devices. With --network=bridge, the devices try to connect to the unreachable IP of the docker container, instead of the host IP. More information on this here.
  2. There is a DHCP problem with the USG, see here

As I understand, these two problems can only be solved within the UniFi controller itself. You have to log in to the controller and click through to the settings.

@davestephens would it be ok to set this up using the host network? If not, do you see a quick solution, how these problems could be fixed?

caillou commented 5 years ago

Once the UniFi Controller is set up, we should consider using https://github.com/davidnewhall/unifi-poller to get the UniFi data into our InfluxDB.

bcurran3 commented 4 years ago

Once the UniFi Controller is set up, we should consider using https://github.com/davidnewhall/unifi-poller to get the UniFi data into our InfluxDB.

I've got this pretty much ready but will look into your suggestion before submitting.

bcurran3 commented 4 years ago

re-opened, pushing, pulling, PRing...