This article describes how to install a fresh copy of UNMS on your server, or update an existing installation. This is a guide for a Linux installation, see the following note for Windows and OS X users:
NOTES & REQUIREMENTS:
Unfortunately, Docker does not provide full support for Windows and OS X systems, so we can't ensure proper operation of UNMS, smooth backups and upgrades. At this time we recommend that you install VirtualBox with the latest version of Ubuntu 16.04.1 LTS (Xenial Xerus) 64 bit and then follow the Linux instructions provided below.
Table of Contents
- Supported Distros:
- Ubuntu 16.04.1 LTS (Xenial Xerus) 64-bit
- Debian 9 64-bit
- Debian 8 64-bit with Docker 17.10.0
- Container Linux formerly CoreOS thanks to woopstar since UNMS 0.11.1
- 2 GB RAM (Minimal)
- 16 GB storage (Minimal)
- 64-bit (x64) CPU
- Local Ports: 80 and 443
- Allow ping (see 11. Devices Latency and Outage Statistics)
- bash, curl, sudo
Run the command below on the host to install and start UNMS (it will automatically install Docker if it is not installed already). If a UNMS installation already exists, it will be overwritten, but all data will be kept. When the process is complete, you can access UNMS at http://server_hostname_or_ip/. Please don't use localhost. Use server hostname or its IP address. You can register your devices to UNMS by following this article: UNMS - The UNMS Key and the Device Registration Process .
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh && sudo bash /tmp/unms_install.sh
Additionally, we recommend that you make the following changes to your server configuration as recommended in the Redis database documentation:
echo "vm.overcommit_memory=1" >> /etc/sysctl.conf sysctl -p
- Disable Transparent HugePages and update your /etc/rc.local or /etc/grub.conf to make the change permanent:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
These configuration changes are not required to run UNMS, but will prevent issues related to insufficient memory. Unfortunately it is not possible to isolate them to a single Docker container.
Manual update Instructions (optional)
Starting with UNMS version 0.7.14, we have introduced a one-click update option in the UI. When a new version is available, you will be able to install the update by clicking a button in the new version notification dialog or under Settings/Maintenance.
But you can also run this command on the host to reinstall/update to the latest version manually:
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh && sudo bash /tmp/unms_install.sh --update
Updating the app will preserve all configuration (custom ports, SSL certificates, etc.). If you wish to change those settings, please follow the Installation Instructions above and specify all settings again.
Managing the SSL certificate for access via HTTPS (optional)
By default, UNMS uses Let's Encrypt to automatically create and manage an SSL certificate for its domain name. The certificate is saved under
. Use installation script arguments
to manage the certificate manually. Argument
is temporarily not available in version 0.11.0. It will be fully supported in version 0.11.1+.
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh $ sudo bash /tmp/unms_install.sh --ssl-cert-dir /etc/certificates --ssl-cert fullchain.pem --ssl-cert-key privkey.pem
Make sure that the UNMS has read permission on the certificate directory and all files.
Changing the HTTP and HTTPS ports (optional)
Use installation script arguments
to configure the UNMS server to listen on non-standard ports. Defaults are 80 (HTTP) and 443 (HTTPS).
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh $ sudo bash /tmp/unms_install.sh --http-port 8080 --https-port 8443
|Please be aware that UNMS must be accessible from the internet via HTTP port 80 if you want to use automatic SSL certificate management via Let's Encrypt.|
Changing the device inform port (optional)
|Inform port is the port that your devices use to connect to UNMS.|
Using a separate inform port is useful when you need to expose the port outside your private network, but don't want to expose the UNMS GUI.
Use installation script argument
to configure the UNMS WebSocket server to use a separate port for communication with your devices.
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh $ sudo bash /tmp/unms_install.sh --ws-port 8444
Running UNMS behind a reverse proxy (optional)
Use installation script arguments
if you plan to run UNMS behind a reverse proxy server. Setting
is only necessary if the proxy listens for HTTPS on a different port than UNMS. Setting
is only necessary when you use
(as mentioned in the section above) to separate the inform port form the HTTPS port.
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh $ sudo bash /tmp/unms_install.sh --behind-reverse-proxy --public-https-port 443 --http-port8080 --https-port 8443
Please be aware that this puts the responsibility of managing an SSL certificate on the reverse proxy and disables the automatic certificate management via Let's Encrypt. The reverse proxy must still use HTTPS for communication with UNMS, optionally with a custom SSL certificate. HTTP-only communication between UNMS and the reverse proxy is not supported.
The UNMS - Reverse Proxy Examples article (coming soon) shows working reverse proxy configurations for Nginx and Apache.
Changing the UNMS container's IP address (optional)
Use installation script argument
to change the UNMS container's subnet if you experience IP address conflicts.
$ curl -fsSL https://raw.githubusercontent.com/Ubiquiti-App/UNMS/master/install.sh > /tmp/unms_install.sh $ sudo bash /tmp/unms_install.sh --subnet 22.214.171.124/24
You may also wish to change the IP address of the docker0 bridge created by Docker. See the docker user guide for more information. Please note that this may affect containers other than UNMS running on your system.
We recommend using the latest version of Ubuntu 16.04.1 LTS (Xenial Xerus) or Amazon AMI. Here are examples of suitable cloud services:
- AWS, EC2 instance, t2.small (2 GB RAM), Ubuntu 16.04.1 LTS (Xenial Xerus)
- DigitalOcean, basic droplet (2 GB RAM), Ubuntu 16.04.1 LTS (Xenial Xerus)
| For a detailed tutorial on DigitalOcean see: UNMS - How to Deploy on DigitalOcean.
By default, the installation script ensures that the application settings and data (logs, site images, encryption key, etc.) are stored outside of the docker container (
). This will enable you to back up that data, and more importantly, this will enable you to perform any future UNMS upgrades without any data loss.
Devices Latency and Outage Statistics
By default, all connected devices to UNMS will ping the UNMS host to check for latency and if any devices are being reported as offline which will result in outage statistics being generated. Ping must be allowed to the UNMS Host for this to work properly.
Run the following commands on your Ubuntu or Debian system to ensure that all required tools are installed:
sudo apt-get update sudo apt-get install curl sudo bash
UNMS - Reverse Proxy Examples article (coming soon)