UniFi Support Tools

IT Pro Expert – Supporting Ubiquiti UniFi Solutions

UniFi Default Login:

Username: ubnt
Password: ubnt

UniFi Help Center Link



UniFi SSH Commands

CommandExampleFunction
infoinfoDisplays device information
set-defaultset-defaultFactory reset device
set-informset-inform http://192.168.1.1:8080/informSet URL of the controller for adoption.
upgradeupgrade https://.binUpgrade firmware
fwupdatefwupdate --url https://.binUpdate firmware
rebootrebootReboot the device
poweroffpoweroffShutdown device
uptimeuptimeShows device uptime

Network related SSH Commands

CommandExampleFunction
ifconfigifconfigShow network interface information
ip address addip address add 192.168.1.143/24 dev br0Set static IP Address
ip routeip routeDisplay current gateway
ip router addip route add default via 192.168.1.1Set default gateway
echo "nameserver 192.168.1.1" > /etc/resolv.confSet DNS Server
pingping 1.1.1.1Check network connection to device
arparp -aShow arp table
ip neighip neighShow IPv6 neighbours

UniFi OS SSH Commands

CommandExampleFunction
ubnt-systool cputempubnt-systool cputempShow CPU Temp
ubnt-systool cpuloadubnt-systool cpuloadShow CPU load
ubnt-systool portstatusubnt-systool portstatusShow port status
ubnt-systool hostnameubnt-systool hostnameSet new hostname
ubnt-systool rebootubnt-systool rebootReboot device
ubnt-systool poweroffubnt-systool poweroffShutdown device
ubnt-systool reset2defaultsubnt-systool reset2defaultsFactory reset device
ubnt-device-info summaryubnt-device-info summaryShow system information
ubnt-tools ubnt-discoverubnt-tools ubnt-discoverShow Unifi devices in the network
cat /mnt/data/udapi-config/dnsmasq.leasecat /mnt/data/udapi-config/dnsmasq.leaseShow DHCP Leases
cat /mnt/data/udapi-config/unificat /mnt/data/udapi-config/unifiShow configuration
/etc/init.d/S95unifios restart/etc/init.d/S95unifios restartRestart Unifi OS Web interface

UniFi Log files

CommandFunction
cat /var/log/messagesOutput the error log
tail -f /var/log/messagesMonitor log file
cat /mnt/data/unifi-os/unifi-core/config/settings.yamlServer settings
cat /mnt/data/unifi-os/unifi-core/logs/discovery.logDiscovery log
cat /mnt/data/unifi-os/unifi-core/logs/system.logSystem log
cat /mnt/data/unifi-os/unifi/logs/server.logServer log
cat /mnt/data/unifi-os/unifi-core/logs/errors.logHttp errors

Additional SSH Commands

Device info, uptime:

  • info

example output:

  • cat /var/sysinfo/model
  • uname -a
    • example output: Linux U6-Lite 4.4.198 #0 SMP Thu Aug 30 12:10:54 2018 mips GNU/Linux
  • uptime

CPU info:

  • cat /proc/stat | grep '^cpu '
  • cat /proc/cpuinfo
  • cat /proc/ubnthal/system.info

example output:

Memory (RAM) info:

  • free | grep 'Mem:'
  • free

Storage:

  • df -hexample output:

Log:

  • cat /var/log/messages

Get connected clients (MACs):

  • CLIENTS=`mca-dump |grep \"mac\" | grep -v ""` && echo "$CLIENTS"

Some configs:

  • cat /var/running.cfg
  • cat /var/system.cfg

Network: IP

  • netstat -rt -n (cisco: show ip route)

Show interfaces:

  • ifconfig (cisco: show interfaces)

Show config:

  • cat /mnt/data/udapi-config/unifi
  • cat /tmp/system.cfg

tcpdump:

  • tcpdump

Reset & potentially dangerous commands

Reset device to factory defaults:

  • syswrapper.sh restore-default or
  • set-default

Enter CLI:

  • mca-cli

Adopt a UniFi device into a controller device:

  • set-inform http://:8080/inform

Set password:

  • passwd

Reboot, shutdown AP:

  • reboot
  • poweroff
  • /usr/etc/rc.d/rc.softrestart save (not tested)

Manually Upgrade AP:

  • syswrapper.sh upgrade http://ip-of-controller:8080/dl/firmware/BZ2/xxxxx/firmware.bin

Upgrade AP (online):


Show other commands:

  • ubntbox

UniFi Network – Required Ports Reference

The following lists the UDP and TCP ports used by UniFi. This information mainly applies to users with a self-hosted UniFi Network Server, or users with third-party devices and firewalls. For this reason, we generally recommend a full UniFi deployment for seamless deployment and optimal native compatibility.

Local Ingress Ports (Incoming)

ProtocolPort NumberUsage
TCP/UDP53Used for DNS. This is required for Guest Portal redirection, downloading updates, and remote access.
UDP3478Used for STUN.
UDP5514Used for remote syslog capture.
TCP8080Used for device and application communication.
TCP443Used for application GUI/API as seen in a web browser. Applications running on a UniFi Console
TCP8443Used for application GUI/API as seen in a web browser. Applications running on a Windows/macOS/Linux machine
TCP8880Used for HTTP portal redirection.
TCP8843Used for HTTPS portal redirection.
TCP6789Used for UniFi mobile speed test.
TCP27117Used for local-bound database communication.
UDP5656-5699Used by AP-EDU broadcasting.
UDP10001Used for device discovery.
UDP1900Used to “Make application discoverable on L2 network” in the UniFi Network settings.
UDP123Used for NTP (date and time). Required for establishing secure communication with remote access servers.

Note: Although TCP 22 is not one of the ports UniFi Network operates on by default, it is worth mentioning that is the port used when UniFi devices or the Network application is accessed via SSH.

Ingress Ports Required for L3 Management Over the Internet (Incoming)

These ports need to be open at the gateway/firewall as well as on the machine running the UniFi Network application. This would be achieved by creating port forwards on the gateway/firewall where the application is running.

ProtocolPort NumberUsage
UDP3478Used for STUN.
TCP8080Used for device and application communication.
TCP443Used for application GUI/API as seen in a web browser. Applications running on an UniFi Console
TCP8443Used for application GUI/API as seen in a web browser. Applications running on Windows/macOS/Linux machines
TCP6789Used for UniFi mobile speed test.
TCP8880Used for HTTP portal redirection. (only needed if using Guest hotspot)
TCP8843Used for HTTPS portal redirection. (only needed if using Guest hotspot)

Egress Ports Required for UniFi Remote Access (Exiting)

In most cases, these ports will be open and unrestricted by default.

ProtocolPort NumberUsage
TCP/UPD53Used for DNS This is required for Guest Portal redirection, downloading updates, and remote access.
UDP3478Used for STUN.
TCP/UDP443Used for Remote Access service.
TCP8883Used for Remote Access service.
UDP123Used for NTP (date and time). Required for establishing secure communication with remote access servers.

Changing Default Ports

Changing default port assignments can only be done on self-hosted UniFi Network Servers (Windows/macOS/Linux). This can be accomplished as follows:

  • Close any instances of the UniFi Network application.
  • Modify the system.properties file, which can be found in the directory /data/system.properties. For example, if port 8081 was in use and port 8089 was open, you could change it by modifying unifi.shutdown.port=8081 to unifi.shutdown.port=8089
  • Restart the UniFi Network application.

Note: Make sure there are no leading or trailing spaces, comments, or other characters (i.e., #) on any custom lines. Otherwise, UniFi Network will ignore the customizations.

Download UniFi Controller:

https://ui.com/download/unifi

UniFi Firmware Download

UniFi Firmware Download:

https://www.ui.com/download/unifi

UniFi Controller V5 User Manual:

https://dl.ui.com/guides/UniFi/UniFi_Controller_V5_UG.pdf

UniFi AP User Guide:

https://dl.ubnt.com/guides/UniFi/UniFi_AP_AP-LR_User_Guide.pdf

UniFi Network Guidance/Best Practice/VLANs/Sonos/Chromecast Pages:
https://help.ui.com/hc/en-us/sections/6582310816535-Network

UniFi Chrome Device Discovery Tool:

https://chrome.google.com/webstore/detail/ubiquiti-device-discovery/hmpigflbjeapnknladcfphgkemopofig?hl=en

UniFi OS NextDNS Install:

https://github.com/nextdns/nextdns/wiki/UnifiOS

NextDNS Sign Up Account:

https://nextdns.io

Run the following command using SSH:

sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'

Note: Queries from the UDM/UXG itself won’t be routed to NextDNS nor encrypted due to current system limitation. All traffic from other devices on then network will.

Usefull NextDNS commands:
nextdns status
nextdns start
nextdns stop
nextdns restart
nextdns log
nextdns activate
nextdns deactivate
nextdns help
nextdns (run again to get remove or reconfigure)

Notes:
Make sure all DNS functions on the controller are disabled like: Content Filtering on ALL networks. Make sure DNS IP is Auto on all networks.
After firmware updates – make sure the NextDNS is still installed and functioning.

Setup script options that worked with UXG:
Report Device Name: Y
Setup as a Router: Y
Enable Caching: Y
Enable Instant Refresh: Y
Automatically setup local host DNS: Y

UniFi Controller Linux Installer Auto Script:

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

UniFi OS RAM Allocation Adjust 1Gb to 2Gb – Network Tuning:
Linux: via SSH check “top -SH” and see mem used at the top.
cd /var/lib/unifi
nano system.properties
then add the following 2 lines if not found:

unifi.xmx=2048
unifi.xms=2048

save and exit then run : service unifi restart

https://help.ui.com/hc/en-us/articles/115005159588-UniFi-How-to-Tune-the-Network-Application-for-High-Number-of-UniFi-Devices

UniFi Self Hosted Controller

https://ui.com/download/releases/network-server

sudo apt-get update
top -sh

To stop the UniFi service: sudo service unifi stop
To restart the UniFi service: sudo service unifi restart
To see the status of UniFi service: sudo service unifi status

Updating and Installing Self-Hosted UniFi Network Servers (Linux) the OLD way- See link below:
https://help.ui.com/hc/en-us/articles/220066768-Updating-and-Installing-Self-Hosted-UniFi-Network-Servers-Linux

The NEW “easy” UniFi Hosted Controller INSTALLATION AND UPGRADE scripts:
BACKUP FIRST!
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

A Massive Thank You to “Glenn R” at UniFi for all the magic coding that went into these scripts: https://glennr.nl/scripts
This script also includes upgrades to MongoDB. The script can do large leaps like from v3.6 to v7.0
Do not interrupt any of these updates – they take a long time. We have seen anything from 5 to 40 minutes for both application or database.

*** Warning – make sure you run the right script. One is for new installs and the other is for upgrades.

CHECK MongoDB VERSION - MAY NEED UPDATE TOO
mongod --version
apt-get update; apt-get install ca-certificates curl -y
NEW INSTALL:
curl -sO https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh && bash unifi-latest.sh
UPGRADE EXISTING:
curl -sO https://get.glennr.nl/unifi/update/unifi-update.sh && bash unifi-update.sh

Wireless Long Range Design Tool

https://ispdesign.ui.com

UniFi USG Comparison Chart

UDR vs UDM-Pro vs UDM-SE vs UDW vs UXG-Lite vs UXG-Pro
See below for link to source and further information.

For additional charts including switches/cloudkeys/ visit McCannTech:
https://evanmccann.net/blog/ubiquiti/unifi-comparison-charts
There are a lot of resources on this website and I highly recommend a visit.

UniFi Access Points Antenna Radiation Patterns

See all patterns here: https://help.ui.com/hc/en-us/articles/115005212927-UniFi-Network-AP-Antenna-Radiation-Patterns


UniFi Protect – CCTV Storage Calculator

UDR = Integrated 128GB SSD with SD Card Slot (Max 1x 4k Cameras or 2x 2k)
UCK-G2-Plus = 1 Drive Bay [Comes with 1TB upgradable to 5TB] (Max 7x 4k Cameras or 12x 2k)
UDM-Pro = 1 Drive Bay (Max 7x 4k Cameras or 12x 2k)
UDM-SE = 1 Drive Bay (Max 7x 4k Cameras or 12x 2k)
UNVR = 4 Drive Bays (Max 15x 4k Cameras or 25x 2k)
UNVR-Pro = 7 Drive Bays (Max 20x 4k Cameras or 30x 2k)

Step 1: https://ui.com/cloud-gateways/resource-calculator
Step 2: https://zufall.co/protect-calculator/
Step 3: https://design.ui.com/wizard

UniFi WiFi Roaming Fix – Fast Roaming for Mobiles

Ubiquiti UniFi Specialists

Please feel free to contact us for any additional services not listed on this page or if you have any queries that we can help with. Our sales lines are open 9:30 to 5:30 and critical support services are available 24/7