Unifi controller as a service
- #UNIFI CONTROLLER AS A SERVICE .EXE#
- #UNIFI CONTROLLER AS A SERVICE INSTALL#
- #UNIFI CONTROLLER AS A SERVICE UPGRADE#
- #UNIFI CONTROLLER AS A SERVICE SOFTWARE#
To access the cloud key locally you'll need to allow the following services from your management PC to the cloud key: If you're using the FortiGate for DHCP this is a little tricky, as you need to set the Additional DHCP Options to the custom option code of 43, then set the hex value to indicate the sub-type, number of bytes, and IP in hex, like so:Ġ1: suboption 04: length of the payload (4 bytes) c0a80001: 192.168.0.1 in hex Per if you put your Unifi Controller (cloud key in this case) in a different subnet/vlan, you can provide the IP of the controller to other Unifi devices by using DHCP Option 43. I found that if I moved the cloud key to a new subnet, or from a lab with one public IP to a location with a different public IP, that remote web access would stop working till I used ssh to connect and reboot the cloud key. Note that you can use "exec ssh" from remote/cloud access to the FortiGate to access the cloud key. The switches (and newer APs) can now be set to work with tagged vlans, but make sure they're getting untagged native vlans to start with. The cloud key and other Unifi devices all assume native vlans and DHCP to start. Hope this is useful, and feel free to post corrections. Let me know if this isn't appropriate for the forum.Īfter setting up a Unifi Cloud Key, switches, and access points behind a FortiGate, with vlan separation between the cloud key (controller used for management) and other Unifi devices, and with remote access to the Unifi system working through the FortiGate, I thought I'd post what I found that worked to save others some time. You will need to run PowerShell as an administrator to start and stop the services.Thought I'd post the FortiGate configs to work with some Unifi devices. #execute the java command to create the windows service Uncheck the box to start the Unifi Controller at the end" Write-Host "Please complete the Unifi Installation. #execute the java command to remove the existing service $controller_exe = Get-FileName -initialDirectory $env.userprofile\downloads
#UNIFI CONTROLLER AS A SERVICE UPGRADE#
#Use the Get-FileName function to find the UniFi Controller Upgrade file
#UNIFI CONTROLLER AS A SERVICE .EXE#
$OpenFileDialog.filter = "EXE files (*.exe)| *.exe" $OpenFileDialog.initialDirectory = $initialDirectory ::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null #Loading VisualBasic interactions to create GUI Write-Host "Make a backup of your controller before upgrading. Write-Host "Uncheck the box to start the Unifi Controller at the end of its installation!" # Directions to configure the Windows Unifi Controller to run as a Windows service the first time can be found here:
# This script assumes that you have already configured the UniFi controller to run as a service and are upgrading it with a new version that you have already downloaded to your hard drive or another location Windows Explorer can reach. \Update-UnifiControllerService.ps1 then press Enter.
Then open an elevated PowerShell console (as administrator) and run the script by typing.
#UNIFI CONTROLLER AS A SERVICE SOFTWARE#
The next time your controller console prompts to download a software update, do so. Save the file as Update-UnifiControllerService.PS1 in your documents folder, or wherever makes sense to you. I wrote the script below to automate most of the process.
#UNIFI CONTROLLER AS A SERVICE INSTALL#
You have to uninstall the service, install the update, and then re-install the service by issuing a series of commands each time. The downside of running the controller software as a service is that updates become considerably more painful to accomplish. If you haven’t already configured it to run as a service, see these instructions on the UniFi support site UniFi – Run the Controller as a Windows Service – Ubiquiti Support and Help Center. Running the controller as a service allows it to start automatically when your computer reboots, among other things. The Windows software based controller for your UniFi wireless network is more useful when run as a Windows service.