UniFi - Check UniFi device count from SSH

Alex Lowe

Last updated: October 9, 2026

You can use our script to check the number of UniFi devices connected to your server.

If you want fast and reliable UniFi hosting, check out HostiFi with expert support, regular backups, managed updates and prices from $19 per month.

To learn more about our hosting plans, create an account or book a free demo to get started.

First, you'll need to get SSH access to your server: https://support.hostifi.net/en/articles/3437198-how-to-ssh-or-sftp-into-your-unifi-server

Then, run this:

mongo ace --eval "db.device.count();" --port 27117 --quiet

It will output the UniFi device count to the terminal.

Alternatively, you can check UniFi device count from network.unifi.ui.com:

https://support.hostifi.net/en/articles/4805668-check-unifi-device-count-from-network-unifi-ui-com

About HostiFi

HostiFi provides hosting for Ubiquiti software platforms, with servers for UniFi and UISP. We also offer network consulting, with HostiFi Professional Services.

Get the Ubiquiti Top 20

Each month our team sifts through Ubiquiti news and content from around the web and delivers 20 of our favorite links to your inbox.

View recent issues

No spam. Unsubscribe anytime.

🤩

Discovered 3+ things that I did not know and will have a material impact on my business.

Newsletter Subscriber

🤩

All the info I want/need in a single clean thread! Perfect!

Newsletter Subscriber

🤩

Providing super valuable information to keep the community in the know. Awesome links page, Thank You.

Newsletter Subscriber