Local Controller Commands
Commands that connect directly to your UniFi Controller. Use ./ui local or the shorthand ./ui lo.
Prerequisites
UNIFI_CONTROLLER_URLconfigured in.envUNIFI_CONTROLLER_USERNAMEandUNIFI_CONTROLLER_PASSWORDconfigured- Network access to your controller
Health
Check site health status.
Shows status of WAN, LAN, WLAN, and VPN subsystems.
Clients
Manage network clients.
List Clients
./ui lo clients list # Connected clients
./ui lo clients list -w # Wired only
./ui lo clients list -W # Wireless only
./ui lo clients list -n Guest # Filter by network
./ui lo clients list -g kids # Filter by group
./ui lo clients list -v # Verbose
./ui lo clients all # Include offline clients
Get Client Details
./ui lo clients get my-iPhone # By name
./ui lo clients get AA:BB:CC:DD:EE:FF # By MAC
./ui lo clients get iPhone # Partial match
Client Status
Comprehensive client information including signal, experience, and data usage.
Block/Unblock Client
./ui lo clients block my-iPhone # Block (with confirmation)
./ui lo clients block my-iPhone -y # Skip confirmation
./ui lo clients unblock my-iPhone # Unblock
# Bulk actions with groups
./ui lo clients block -g kids-devices -y # Block all in group
./ui lo clients unblock -g kids-devices -y # Unblock all in group
Disconnect Client
./ui lo clients kick my-iPhone # Force reconnect
./ui lo clients kick -g kids-devices -y # Kick all in group
Count Clients
./ui lo clients count # By connection type
./ui lo clients count --by network # By network/SSID
./ui lo clients count --by vendor # By manufacturer
./ui lo clients count --by ap # By access point
./ui lo clients count --by experience # By WiFi quality
./ui lo clients count -a # Include offline
Find Duplicates
Identify devices with multiple NICs or naming conflicts.
Devices
Manage network devices (APs, switches, gateways).
List Devices
Get Device Details
./ui lo devices get UDM-Pro # By name
./ui lo devices get 70:a7:41:xx:xx:xx # By MAC
./ui lo devices get device-001 # By ID
Restart Device
Upgrade Firmware
Locate Device
Toggle the locate LED for physical identification.
./ui lo devices locate Office-AP # Turn on LED
./ui lo devices locate Office-AP --off # Turn off LED
Adopt Device
Adopt a new device into the controller.
Networks
View network configuration.
List Networks
Get Network Details
Firewall
Inspect firewall configuration.
List Rules
./ui lo firewall list
./ui lo firewall list --ruleset WAN_IN # Filter by ruleset
./ui lo firewall list --ruleset LAN_IN
./ui lo firewall list -v # Verbose
List Groups
View address and port groups.
Port Forwarding
View port forwarding rules.
Vouchers
Manage guest hotspot vouchers.
List Vouchers
Create Vouchers
./ui lo vouchers create # Single voucher, 24h
./ui lo vouchers create -c 10 # Create 10 vouchers
./ui lo vouchers create -d 60 # 60 minute duration
./ui lo vouchers create -q 1024 # 1GB data quota
./ui lo vouchers create --up 5000 # 5 Mbps upload limit
./ui lo vouchers create --down 10000 # 10 Mbps download limit
./ui lo vouchers create -n "Conference" # Add note
Full Example:
# Create 10 vouchers: 2 hours, 500MB quota, 5/10 Mbps limits
./ui lo vouchers create -c 10 -d 120 -q 500 --up 5000 --down 10000 -n "Event"
Delete Voucher
DPI (Deep Packet Inspection)
View traffic analytics.
DPI must be enabled
DPI statistics require DPI to be enabled in your controller settings.
Site Statistics
./ui lo dpi stats # Top applications
./ui lo dpi stats -l 20 # Top 20
./ui lo dpi stats -v # Verbose
Client Statistics
Statistics
View traffic statistics.
Daily Stats
./ui lo stats daily # Last 30 days
./ui lo stats daily --days 7 # Last 7 days
./ui lo stats daily -o csv # CSV export
Hourly Stats
Events
View recent events.
./ui lo events list # Recent events
./ui lo events list -l 50 # Last 50 events
./ui lo events list -v # Verbose
Config
Export running configuration.
Show Config
./ui lo config show # All sections
./ui lo config show -o yaml # YAML export
./ui lo config show -o json # JSON export
./ui lo config show -v # Include IDs
./ui lo config show --show-secrets # Include passwords
Specific Sections
./ui lo config show -s networks # Networks and VLANs
./ui lo config show -s wireless # SSIDs and WiFi settings
./ui lo config show -s firewall # Firewall rules
./ui lo config show -s devices # Device inventory
./ui lo config show -s portfwd # Port forwarding
./ui lo config show -s dhcp # DHCP reservations
./ui lo config show -s routing # Static routes