information on versions found here: https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776#answer/1a8d17ec-c9fa-4a5f-b758-5bbb969a683b


Step 1 : Go the following website https://console.cloud.google.com/ and login


Step 2: Once you have your account up and running you can provision a Linux Instance clicking on the big “Compute Engine” and VM instances 

Step 3: After you selected the Virtual Machine just give to it a name,, choose a data center near to where you live, pick the size you want, as OS you can pick debian or ubuntu


Step 4: Set the a network tag for this Instance it will be used later and set ssh keys if needed  (very important not to miss this step)


Step 5: In the additional settings leave everything to the default values and finally hit the create button!


Step 6: After few seconds your Instance is ready and you should be able to see it running , write down the Public IP Address because you will need it shortly.


Step 7: Now we have to setup the open ports in order to have the Controller working correctly.


First go the the VPC network tab of your account and select Firewall Rules:


Here add a firewall rule specific for your controller instance using the Target tag that we defined early, put 0.0.0.0/0 as IP range to allow connections from any IP and set those ports to be open:


tcp:8443;tcp:8080;tcp:8843;tcp:8880;tcp:6789;udp:3478


Step 8: Connect with the web console ssh and install the Unifi controller software: 


sudo passwd- and type in root password of your choice. Once password set then type su to login as root


Ubuntu | sudo -i | Debian | su )


2a) Make sure the ca-certificates package is installed.


apt-get update; apt-get install ca-certificates wget -y


3) Download the script by executing the following command. ( change it to your wanted version )


wget https://get.glennr.nl/unifi/install/unifi-5.14.23.sh


bash unifi-5.14.23.sh (version of controller you downloaded in previous step.