Installing SSL Certificates and Enabling HSTS on Ubiquiti UniFi

Author:Lars Nyström
Updated:Aug 5, 2025

To enable SSL security features on your UniFi controller, follow these steps:

  1. Enable HSTS:

    • Open system.properties and uncomment the lines for HSTS settings.
    • Set unifi.https.hsts=false to enable HSTS.
    • Adjust unifi.https.hsts.max_age to set the cache duration (e.g., 31536000 seconds for one year).
    • Enable preloading by setting unifi.https.hsts.preload=true if you won't remove it later.
    • Set unifi.https.hsts.subdomain=false unless you want HSTS applied to subdomains.
  2. Configure Cipher Suites and SSL Protocols:

    • Uncomment the lines for unifi.https.ciphers and unifi.https.sslEnabledProtocols.
    • Specify allowed cipher suites and protocols in their respective fields.
  3. HTTPS Redirect:

    • Ensure HTTPS redirect is enabled by default, so accessing the admin panel via http://hostname:8080 will redirect to https://hostname:8443.
  4. Restart UniFi:

    • Save changes to system.properties, then restart your UniFi controller.