1. Preparation
-
A UniFi online account is needed.
-
A PoE adapter is needed if the switch does not have a PoE port.
-
The cloud keys run Debian 8.11.
2. Factory Reset
-
Press and hold the Reset button for more than five seconds.
-
The UniFi Cloud Key is set to DHCP by default.
-
The default fallback IP address of the UniFi Cloud Key is 192.168.1.30.
-
The default password of the ubnt account is ubnt.
-
The default hostname is UniFi-CloudKey.
3. Cloud Key Configuration for Air Conditioners
-
Type
systemctl disable nginxand press Enter. -
Type
systemctl disable unifiand press Enter. -
Type
systemctl stop nginxand press Enter. -
Type
systemctl stop unifiand press Enter. -
Type
sed -e "s/UniFi-CloudKey/smru-ac24-mrm/" -i /etc/hostnameand press Enter. -
Type
sed -e "s/UniFi-CloudKey/smru-ac25-mrm/" -i /etc/hostnameand press Enter. -
Type
sed -e "s|US/Pacific|Asia/Bangkok|" -i /etc/timezoneand press Enter. -
Contents of the /etc/systemd/network/eth0.network file.
[Match] Name = eth0 [Address] Address = 10.10.1.211/24 10.10.1.212/24 [Route] Gateway = 10.10.1.170 [Network] DNS = 10.10.1.170 DNS = 10.10.1.1 DNS = 127.0.0.1
4. UniFi Controller configuration
-
Connect the UniFi Cloud Key to the switch.
-
Login to the computer that in the same network with UniFi Cloud Key.
-
Browse to https://unifi.ui.com with Google Chrome.
-
Type
SMRUin the Email or Username field. -
Type the password in the Password field.
-
Type the 2FA in the 2FA Token field.
-
Click Sign in.
-
Click OFF to turn on Discover Cloud Key.
-
Add the Ubiquiti Device Discovery Tool extension to Google Chrome.
-
Click ADD TO CHROME.
-
Click Add to Chrome.
-
Click Add app.
-
Close the unwanted tabs.
-
-
Click UniFi CloudKey v3 | UPGRADE FIRMWARE.
-
Click UPGRADE FIRMWARE to confirm.
-
Wait about 5 mintues for the upgrade to finish and for UniFi Cloud Key v3 to show up.
-
Click ADOPT.
-
Click OPEN CONTROLLER WIZARD to confirm.
-
Click Advanced.
-
Click Proceed to <IP address> (unsafe).
-
Type
SMRU-<Site>in the Controller Name field. -
Check By selecting this you are agreeing to end user license agreement and the terms of service.
-
Click Next.
-
Type
SMRUin the Username field. -
Type the password in the Password field.
-
Click Next.
-
Type the 2FA in the 2FA Token field.
-
Click Next.
-
Enable Automatically optimize my network.
-
Enable Enable Auto Backup.
-
Click Next.
-
Optional: Select UniFi AP-AC-Lite.
-
Click Next.
-
Type
<WiFi-SSID>in the WiFi Name field. -
Type the WiFi password in the WiFi Password field.
-
Enable Combine 2 GHz and 5 GHz WiFi Network Names into one.
-
Click Next.
Controller Name SMRU-<Site> Remote Access Enabled Use Ubiquiti account for local access Yes Ubiquiti Account SMRU WiFi Name <WiFi-SSID> Country or territory Thailand Timezone (UTC+07:00) Bangkok
-
Click Finish.
-
Optional: Click Don’t Send on the Security & Analytics message.
-
Select SMRU > Logout.
-
Close the UniFi Network tab.
-
Close the CLOUD KEY SETUP popup window.
-
Close Google Chrome.
5. UniFi Cloud Key login
-
Browse to https://<IP address>[^].
-
Log in as ubnt with the default ubnt password or the password in the KeePass Password Manager.
6. UniFi Cloud Key configuration
-
Browse to https://unifi.ui.com with Google Chrome.
-
Type
SMRUin Email or Username field. -
Type the password in Password field.
-
Click Sign in.
-
Click OFF to turn on Discover Cloud Key.
-
Click MANAGE on UniFi CloudKey v3.
-
Click CONFIGURE on Configure your UniFi Cloud Key.
-
Type
ubntin Username field. -
Type the password in Password field.
-
Click LOGIN.
-
Click Configuration.
-
Type
SMRU-<Site>in Device Name field.BASIC SETTINGS Device Name tbhf-unf-<site> Timezone (UTC+07:00) Bangkok Reset Button ON NETWORK SETTINGS Configuration Mode ● Static ○ DHCP IP Address 192.168.xx.16 Netmask 255.255.255.0 Gateway 192.168.xx.170 Primary DNS 192.168.xx.170 Secondary DNS 8.8.8.8
-
Click APPLY CHANGES.
7. Upgrade from Debian 8 to Debian 9
-
See https://phoenixnap.com/kb/how-to-upgrade-debian-8-jessie-to-debian-9-stretch.
# Backup. cd / tar -cpzf /data/backup0.tgz --one-file-system / ls -al /data apt-get update apt-get upgrade apt-get dist-upgrade cat /etc/debian_version cat /etc/os-release dpkg -l | grep -i java dpkg -l | grep -i unifi cp -a /etc/apt/sources.list /etc/apt/sources.list.org sed -i 's/jessie/stretch/' /etc/apt/sources.list # The default action is to keep your current version. # securetty # /etc/default/rcS # /etc/systemd/resolved.conf # /etc/kernel/postinst.d/apt-auto-removal # Keep the local version currently installed. # /etc/apt/apt.conf.d/50unattended-upgrades.ucftmp # /etc/ssh/sshd_config # Restart services during package upgrades without asking? # No # cron apt-get update apt-get upgrade apt-get dist-upgrade
-
Restart the UniFi Cloud Key.
root@UniFi-CloudKey:/# apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up freeradius-ldap (3.0.12+dfsg-5+deb9u1) ... A dependency job for freeradius.service failed. See 'journalctl -xe' for details. invoke-rc.d: initscript freeradius, action "force-reload" failed. dpkg: error processing package freeradius-ldap (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: freeradius-ldap E: Sub-process /usr/bin/dpkg returned an error code (1) root@UniFi-CloudKey:/#