I just went through the experience to find out by trial and error that the unifi controller and domoticz are in each others way. I just documented the solution for myself, so I thought, I'd share it with your guys:
I started of with the available guide online:
https://lazyadmin.nl/home-network/insta ... -in-5-min/
CAUTION: when you read this after you got stuck with a non working Unifi controller due to this port usage, skip the steps here below until the "stop domoticz service" . Also replace the next command "install unifi controller" (since you installed it before and you need to reinstall), by this one instead: sudo apt-get install --reinstall unifi -y
Install OpenJDK (instead of Java):
sudo apt-get install openjdk-8-jre-headless -y
Download repository:
echo 'deb
http://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
Install GPG-key:
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg
https://dl.ubnt.com/unifi/unifi-repo.gpg
Stop domoticz (because unifi tries to use port 8080 and install fails when 8080 is in use):
sudo service domoticz stop (use Monit when this is installed, otherwise Domoticz restarts within minutes!)
Install Unifi Controller:
sudo apt-get update; sudo apt-get install unifi -y
Stop and disable mongodb, it is not needed:
sudo systemctl stop mongodb
sudo systemctl disable mongodb
check which ports are in use:
sudo netstat -ntpl
Switch to super user to be able to change the unifi config file:
sudo -i
nano /usr/lib/unifi/data/system.properties
change # unifi.http.port=8080 to: unifi.http.port=8083 (remove the hash sign, port number 8080->8083, or whatever suits you)
Stop super user:
exit
Restart Domoticz:
sudo service domoticz start (or use Monit)