This article will show users where to find their log files and how to view them for the different UniFi elements: Access Points, Switches, Security Gateways and Controller. Log files are essential to any support or troubleshooting needed, so it is important to know how to find them for all devices.
Table of Contents
- Log File Location
- How to view files: UniFi AP and Switch
- How to view files: UniFi Security Gateway
- How to view files: UniFi Controller
- How to download encrypted log files from UI
- Related Articles
Log File Location
NOTE: The symlink directory for Linux is mentioned below as it is the consistent folder location on the officially supported distros. It is the same whether you install the controller on your own installation of Debian or Ubuntu, or if it's on the UniFi Video NVR appliance or UniFi Cloud Key. Depending on the platform being used, and how it is configured, there will be other locations, but no matter what, on the supported distros, /usr/lib/unifi/logs will always contain the files.
There are three locations where you can view log files related to UniFi devices and the controller:
- UniFi AP: contains info local to UAP, like 802.11 info
- UniFi Switch: contains info local to the switch, like port link state changes, spanning tree events, etc.
- UniFi Security Gateway: contains USG’s local logs, including DHCP, VPNs and more
- UniFi Controller
- Contains information about controller software, communication with UAPs, etc.
- Contains information about UniFi software local to PC controller.
How to view log files: UniFi AP & Switch
To view log files under UAP and USW:
1. Connect to UAP or USW via SSH
3. View output
To view the live logs, with output updating in your SSH session as new logs are appended, run the following instead of the above cat command.
tail -f /var/log/messages
How to view log files: UniFi Security Gateway
To view log files under USG:
1. Connect to the USG via SSH
2. In the EdgeOS CLI, the log can be viewed by running:
3. It can also be viewed from the Linux shell using cat or tail as described above for UAP and USW. Run the following from the EdgeOS CLI to reach a Linux shell.
4. Then the cat and tail commands listed above for UAP can be used.
How to view log files: UniFi Controller
Path to view logs on UniFi Controller is dependent on platform:
- Windows: C:\Users\<username>\Ubiquiti UniFi\logs\
- Mac OS X: /Users/<username>/Library/Application\ Support/UniFi/logs/
- UniFi Cloud Key and Debian/Ubuntu Linux*: /usr/lib/unifi/logs/
In controller versions 5.6 and up logs can be viewed under Insights, then by clicking the dropdown in the top left and selecting "controller logs." Once the logs start populating there are options to fetch more logs or download the log file.
How to Download Encrypted Log Files from UI
The UniFi controller also allows users to download log files to share with Ubiquiti support, but these logs are encrypted (for security reason), so as the user, you wouldn't be able to view the logs. For viewing we continue to suggest all the options described above. This support file also does not include device logs.
1. In the UniFi Controller go to Settings > Maintenance and under the Support Info section you can click the Download Support Info button.