P2 - Automatic start Unifi Controller with Windows
🎯 Automatically start UniFi Controller on Windows is a critical setup to ensure your network management system is always online, even after a system reboot or unexpected shutdown.
By default, UniFi Controller does NOT start automatically when Windows boots, which can lead to:
❌ Network monitoring downtime
❌ UniFi APs, switches, or gateways becoming unmanaged
❌ Missed logs and statistics
In this tutorial, you’ll learn how to configure UniFi Controller to run as a Windows service, allowing it to start automatically with the operating system.
We’ll use NSSM (Non-Sucking Service Manager) to create a stable and reliable UniFi service on Windows.
👨💻 This guide is ideal for:
IT Administrators
Network Engineers
UniFi Home Lab & Enterprise users
📌 After completing this setup, your UniFi Controller will always be running, even after a reboot.
🧩 Overview – What You’ll Do
✅ Install required dependencies
✅ Create a UniFi Controller Windows service using NSSM
✅ Configure automatic startup
✅ Verify service status
✅ Cleanly remove the service if needed
🔽 Step 1: Download & Install Required Components
☕ Install Java 21 (Required)
UniFi Controller requires Java to run properly.
🔗 Download Java 21 (Temurin – Eclipse Adoptium):
https://adoptium.net/temurin/releases/?version=21
🛠 Install NSSM (Non-Sucking Service Manager)
NSSM allows you to run UniFi Controller as a true Windows service.
🔗 Download NSSM:
https://nssm.cc/download
⚙️ Step 2: Create UniFi Controller Service with NSSM
📌 Open Command Prompt as Administrator
Run the following command to create the service:
nssm install UniFi
🔧 Service Configuration Details
▶ Path:
C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot\bin\java.exe
▶ Startup directory:
C:\Users\Administrator\Ubiquiti UniFi
▶ Arguments:
--add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -Xmx1024M -jar lib\ace.jar start
📌 These parameters ensure:
Proper Java module access
Stable memory allocation
Correct UniFi Controller startup behavior
👉 Click Install service to complete the setup.
🚀 Verify UniFi Controller Startup
After installing the service:
🔁 Reboot Windows
🔍 Open Services (services.msc)
✅ Confirm UniFi service is running
🌐 Access UniFi Web UI via browser
Your UniFi Controller should now start automatically on every boot.
🧹 Optional: Remove UniFi Service (If Needed)
If the service fails or you need to recreate it, use the commands below:
sc stop UniFi
sc delete UniFi
📌 This cleanly removes the UniFi service from Windows.
✅ Final Notes
✔ UniFi Controller now runs automatically
✔ No manual startup required
✔ Ideal for production & lab environments
✔ Stable and reboot-safe configuration
🔔 Make sure Java and UniFi files remain in the same paths to avoid service errors.
See also related articles
P5 – Update UniFi Network Controller on Ubuntu
UniFi – Update UniFi Network Controller on Ubuntu (P5 Step-by-Step Guide) Keeping your UniFi Network Controller up to date is critical for security, stability, and feature compatibility—especially in production environments running on Ubuntu Server. An outdated controller may cause device adoption issues, missing features, or even security vulnerabilities. In this...
Read MoreP4 – Set Bandwidth Limit for Each Client on UniFi WiFi
Unifi – P4 Set Bandwidth Limit for Each Client on UniFi WiFi 🔍 Overview In office networks or even advanced home networks with many connected devices, a few clients consuming excessive bandwidth is a very common issue. This often leads to slow, unstable connections and directly impacts critical services such...
Read MoreP3 – How to Backup and Restore UniFi Controller v9 (Complete Guide)
🔐 UniFi – How to Backup and Restore UniFi Controller v9 (Complete Guide) 🎯 Backing up UniFi Controller v9 is a critical task to protect your entire UniFi network, including configurations, devices, and site settings.In real-world environments, backups are essential for disaster recovery, hardware replacement, system migration, or unexpected failures....
Read More