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 Log Files: UniFi APs and Switches
- How to View Log Files: UniFi Security Gateways
- How to View Log Files: UniFi Network Controller
- How to Download Encrypted Log Files from UI
- Related Articles
Log File Location
There are three locations where you can view log files related to UniFi devices and the Controller: /var/log/messages, server.log, and mongod.log. See below what you will find in each.
1. UniFi Dream Machines
2. UniFi AP: contains info local to UniFi Access Points, like 802.11 info
3. UniFi Switch: contains info local to the switch, like port link state changes, spanning tree events, etc.
4. UniFi Security Gateway: contains USG’s general logging.
5. UniFi Network 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 APs and Switches
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 Gateways
To view log files under a USG:
1. Connect to the USG via SSH.
2. In the EdgeOS CLI, the log can be viewed by running the following commands:
IPsec VPN Logging
show vpn log
sudo cat /var/log/freeradius/radius.log
sudo cat /var/log/dnsmasq.log
IPS/IDS Engine Logging
sudo cat /var/log/suricata/suricata.log
3. View live logging.
To view the live logs, with output updating in your SSH session as new logs are appended, run the following instead of the cat command above.
tail -f /var/log/messages
sudo tail -n 10 /var/log/freeradius/radius.log
How to View Log Files: UniFi Network Controller
Logs can be viewed under the Insights section within the Controller. Click the drop-down in the top left and select "Controller Logs." Once the logs start populating there are options to fetch more logs or download the log file.
The path to view logs on UniFi Controller is dependent on the controller host:
- Windows: C:\Users\<username>\Ubiquiti UniFi\logs\
- macOS: /Users/<username>/Library/Application\ Support/UniFi/logs/
- UniFi Cloud Key and Debian/Ubuntu Linux*: /usr/lib/unifi/logs/
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. It is important to note that this support file does not include device logs.
In the UniFi Controller go to Settings > Maintenance and under the Support Info section, you can click the Download Support Info button.