Downloads:

17,571

Downloads of v 5.12.22:

256

Last Update:

10/30/2019

Package Maintainer(s):

Software Author(s):

  • Ubiquiti Networks Inc

Tags:

unifi ubiquiti wifi network admin

Ubiquiti UniFI Controller

5.12.22 | Updated: 10/30/2019

Downloads:

17,571

Downloads of v 5.12.22:

256

Maintainer(s):

Software Author(s):

  • Ubiquiti Networks Inc

Ubiquiti UniFI Controller 5.12.22

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install Ubiquiti UniFI Controller, run the following command from the command line or from PowerShell:

>

To upgrade Ubiquiti UniFI Controller, run the following command from the command line or from PowerShell:

>

To uninstall Ubiquiti UniFI Controller, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade ubiquiti-unifi-controller -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade ubiquiti-unifi-controller -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure ubiquiti-unifi-controller installed
  win_chocolatey:
    name: ubiquiti-unifi-controller
    state: present
    version: 5.12.22
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'ubiquiti-unifi-controller' do
  action    :install
  version  '5.12.22'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: ubiquiti-unifi-controller,
    Version: 5.12.22,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller ubiquiti-unifi-controller
{
   Name     = 'ubiquiti-unifi-controller'
   Ensure   = 'Present'
   Version  = '5.12.22'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'ubiquiti-unifi-controller':
  provider => 'chocolatey',
  ensure   => '5.12.22',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install ubiquiti-unifi-controller version="5.12.22" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 10/30/2019.

Description

Software for managing and controlling the following Ubiquiti products:

UAP, UAP-AC, UAP-AC-EDU, UAP-AC-HD, UAP-AC-LITE, UAP-AC-LR, UAP-AC-M, UAP-AC-M-PRO, UAP-AC Outdoor, UAP-AC-PRO, UAP-IW, UAP-LR, UAP-Outdoor, UAP-Outdoor+, UAP-Outdoor5, UAP-PRO, US-16-150W, US‑16‑XG, US-24, US-24-250W, US-24-500W, US-48, US-48-500W, US-48-750W, US-8, US-8-150W, US-8-60W, USG, USG-PRO-4
Install script also configures appropriate Windows Firewall rules (for Windows 8/Server 2008 and above)


tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop';

$packageName= 'unifi-controller'
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url        = 'https://www.ubnt.com/downloads/unifi/5.12.22/UniFi-installer.exe'
$checksum   = '4ae6ac01c465f590c4a2df9334ad86f2a45b818f088a5c675e733352f8fb33a9'

$packageArgs = @{
  packageName   = $packageName
  unzipLocation = $toolsDir
  fileType      = 'EXE'
  url           = $url
  softwareName  = 'Ubiquiti UniFi*'
  checksum      = $checksum
  checksumType  = 'sha256'
  silentArgs   = '/S'
  validExitCodes= @(0)
}

# Flag whether we're being invoked by AU module
[bool] $runningAU = (Test-Path Function:\au_GetLatest)

if (-not $runningAU) {
    Write-Verbose "Respond to 'upgrade confirmation' dialog prompt (only for upgrades)"
    $ahkScript = "$toolsDir\unifi-upgrade.ahk"

    $ahkProc = Start-Process -FilePath 'AutoHotkey' -ArgumentList $ahkScript -PassThru

    # Win8/2012 supports 'New-NetFirewallRule' - https://technet.microsoft.com/en-us/library/jj554908(v=wps.620).aspx
    $osVersion = [Environment]::OSVersion.Version

    if ($osVersion.Major -gt 6 -or ($osVersion.Major -eq 6 -and $osVersion.Minor -ge 2)) {
        # Configure firewall for UniFi - from https://community.ubnt.com/t5/UniFi-Wireless/UniFi-AP-firewall-settings-for-Windows-Server-2012-R2/td-p/1090855
        New-NetFirewallRule -Name UniFi-Mgmt-In -DisplayName "UniFi-Mgmt (TCP-In 8081)" -Description "Allows incoming UniFi management traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8081 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-Mgmt-Out -DisplayName "UniFi-Mgmt (TCP-Out 8081)" -Description "Allows outgoing UniFi management traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8081 -Direction Outbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-DvcInfrm-In -DisplayName "UniFi-DvcInfrm (TCP-In 8080)" -Description "Allows incoming UniFi device inform traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8080 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-DvcInfrm-Out -DisplayName "UniFi-DvcInfrm (TCP-Out 8080)" -Description "Allows outgoing UniFi device inform traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8080 -Direction Outbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-Ctrlr-In -DisplayName "UniFi-Ctrlr (TCP-In 8443)" -Description "Allows incoming UniFi Controller traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8443 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-Ctrlr-Out -DisplayName "UniFi-Ctrlr (TCP-Out 8443)" -Description "Allows outgoing UniFi Controller traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8443 -Direction Outbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-PrtlRdr-In -DisplayName "UniFi-PrtlRdr (TCP-In 8880)" -Description "Allows incoming UniFi portal redirect traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8880 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-PrtlRdr-Out -DisplayName "UniFi-PrtlRdr (TCP-Out 8880)" -Description "Allows outgoing UniFi portal redirect traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8880 -Direction Outbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-PrtlRdrSsl-In -DisplayName "UniFi-PrtlRdrSsl (TCP-In 8843)" -Description "Allows incoming UniFi portal redirect for SSL traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8843 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-PrtlRdrSsl-Out -DisplayName "UniFi-PrtlRdrSsl (TCP-Out 8843)" -Description "Allows outgoing UniFi portal redirect for SSL traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 8843 -Direction Outbound -ErrorAction SilentlyContinue
        #New-NetFirewallRule -Name UniFi-DB-In -DisplayName "UniFi-DB (TCP-In 27117)" -Description "Allows incoming UniFi DB traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 27117 -Direction Inbound -ErrorAction SilentlyContinue
        #New-NetFirewallRule -Name UniFi-DB-Out -DisplayName "UniFi-DB (TCP-Out 27117)" -Description "Allows outgoing UniFi DB traffic" -Group UniFi -Enabled True -Protocol TCP -LocalPort 27117 -Direction Outbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-DvcDisc-In -DisplayName "UniFi-DvcDisc (UDP-In 10001)" -Description "Allows incoming UniFi device discovery traffic" -Group UniFi -Enabled True -Protocol UDP -LocalPort 10001 -Direction Inbound -ErrorAction SilentlyContinue
        New-NetFirewallRule -Name UniFi-DvcDisc-Out -DisplayName "UniFi-DvcDisc (UDP-Out 10001)" -Description "Allows outgoing UniFi device discovery traffic" -Group UniFi -Enabled True -Protocol UDP -LocalPort 10001 -Direction Outbound -ErrorAction SilentlyContinue
    }
}

Install-ChocolateyPackage @packageArgs

if (-not $runningAU) {
    $ahkProc.Refresh()

    if (-not $ahkProc.HasExited) { 
        Write-Verbose "No upgrade prompt, so killing autohotkey process"
        $ahkProc.Kill()
    }
}
tools\chocolateyuninstall.ps1
$ErrorActionPreference = 'Stop';

$packageName = 'unifi-controller'
$softwareName = 'Ubiquiti UniFi*'
$installerType = 'EXE' 

$validExitCodes = @(0, 3010, 1605, 1614, 1641)
if ($installerType -ne 'MSI') {
  $silentArgs = '/S'
  $validExitCodes = @(0)
}

$uninstalled = $false
[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName

if ($key.Count -eq 1) {
  $key | % { 
    $file = "$($_.UninstallString)"

    if ($installerType -eq 'MSI') {
      $silentArgs = "$($_.PSChildName) $silentArgs"

      $file = ''
    }

    Uninstall-ChocolateyPackage -PackageName $packageName `
                                -FileType $installerType `
                                -SilentArgs "$silentArgs" `
                                -ValidExitCodes $validExitCodes `
                                -File "$file"
  }
} elseif ($key.Count -eq 0) {
  Write-Warning "$packageName has already been uninstalled by other means."
} elseif ($key.Count -gt 1) {
  Write-Warning "$key.Count matches found!"
  Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
  Write-Warning "Please alert package maintainer the following keys were matched:"
  $key | % {Write-Warning "- $_.DisplayName"}
}

Write-Output "Respond to 'keep settings' dialog prompt"
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
$ahkScript = "$toolsPath\unifi-uninstall.ahk"
AutoHotkey $ahkScript $packageArgs.fileFullPath

# Win8/2012 supports 'Remove-NetFirewallRule' - https://technet.microsoft.com/en-us/library/jj554908(v=wps.620).aspx
$osVersion = [Environment]::OSVersion.Version

if ($osVersion.Major -gt 6 -or ($osVersion.Major -eq 6 -and $osVersion.Minor -ge 2)) {
    Remove-NetFirewallRule -Name UniFi-Mgmt-In 
    Remove-NetFirewallRule -Name UniFi-Mgmt-Out
    Remove-NetFirewallRule -Name UniFi-DvcInfrm-In
    Remove-NetFirewallRule -Name UniFi-DvcInfrm-Out
    Remove-NetFirewallRule -Name UniFi-Ctrlr-In
    Remove-NetFirewallRule -Name UniFi-Ctrlr-Out
    Remove-NetFirewallRule -Name UniFi-PrtlRdr-In
    Remove-NetFirewallRule -Name UniFi-PrtlRdr-Out
    Remove-NetFirewallRule -Name UniFi-PrtlRdrSsl-In
    Remove-NetFirewallRule -Name UniFi-PrtlRdrSsl-Out
    #Remove-NetFirewallRule -Name UniFi-DB-In
    #Remove-NetFirewallRule -Name UniFi-DB-Out
    Remove-NetFirewallRule -Name UniFi-DvcDisc-In
    Remove-NetFirewallRule -Name UniFi-DvcDisc-Out
}
tools\unifi-uninstall.ahk
WinWait, UniFi Uninstall,,20
IfNotEqual, ErrorLevel, 0, exit 1
ControlSend,, !y, UniFi Uninstall
tools\unifi-upgrade.ahk
; Do you want to upgrade your UniFi 5.3.8 to 5.4.9?
WinWait, UniFi Setup,,90
IfNotEqual, ErrorLevel, 0, exit 0
ControlSend,, !y, UniFi Setup
WinWaitClose
; It is recommended that you create a backup before installing a new version. Do you have a backup?
WinWait, UniFi Setup,,90
IfNotEqual, ErrorLevel, 0, exit 0
ControlSend,, !y, UniFi Setup
WinWaitClose

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Ubiquiti UniFI Controller 5.11.50 645 Wednesday, October 9, 2019 Approved
Ubiquiti UniFI Controller 5.11.47 318 Wednesday, October 2, 2019 Approved
Ubiquiti UniFI Controller 5.11.46 633 Tuesday, September 17, 2019 Approved
Ubiquiti UniFI Controller 5.11.39 1065 Friday, August 23, 2019 Approved
Ubiquiti UniFI Controller 5.10.27 117 Wednesday, August 21, 2019 Approved
Ubiquiti UniFI Controller 5.10.25 1566 Saturday, July 13, 2019 Approved
Ubiquiti UniFI Controller 5.10.23 1957 Friday, May 10, 2019 Approved
Ubiquiti UniFI Controller 5.10.21 1004 Thursday, April 18, 2019 Approved
Ubiquiti UniFI Controller 5.10.20 744 Saturday, March 23, 2019 Approved

Discussion for the Ubiquiti UniFI Controller Package

Ground Rules:

  • This discussion is only about Ubiquiti UniFI Controller and the Ubiquiti UniFI Controller package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Ubiquiti UniFI Controller, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus