- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to run UniFi Controller on ReadyNAS
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to run UniFi Controller on ReadyNAS
Recently I ran into some trouble (Thread All snapshots disappeared + no new snapshots possible) when I tried to install the UniFi Controller on my ReadyNAS. After I have overcome two small obstacles it works now fine.
I would like to share here the solution that works for me on OS 6.6.1 (x86):
The UniFi Controller needs Java, so we have to install that first. I have choosen Java 7, because Java 8 - my first obsacle - lead me into trouble:
sudo apt-get update apt-get install oracle-java7-jdk
Then we have to add the Ubiquiti repository and the key:
echo "deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti" | tee /etc/apt/sources.list.d/100-ubnt.list apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
After that, we can install the UniFi controller:
apt-get install unifi
I copied the systemd service file, to /etc/systemd/system in the case that I have to make some tweaks:
cp -p /lib/systemd/system/unifi.service /etc/systemd/system
After the install there is the second obstacle, that the software in installed unter /var/lib on the OS partition and the included MongoDB will need 3GB under /var/lib/unifi/db, which is not available.
So we have to move the UniFi controller to a place with sufficient space, e.g. /apps:
cd /var/lib mv unifi /apps ln -s /apps/unifi unifi
And now the Unifi controller should start with:
systemctl start unifi.service
To access the User Interface of the controller navigate to:
https://<IP_of_your_ReadyNAS>:8443
If it is not working, it might be worth to look into the logs in /var/log/unifi.
Possible problems:
- Unifi needs the ports 3478, 8080, 8443, 8843, 8880, 8881, 8882 and 27117. If other Apps use these ports you have to change the settting of UniFi.
- It might be necessary to activate logrotate for the UniFi logs.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Logrotate
Logrotate seems to be installed on OS 6.6.1, so the only thing is to configure it also to rotate the logs generated by UniFi.
Thanks to this Blog, here is the configuration:
bash -c 'cat >> /etc/logrotate.d/unifi << EOF /var/log/unifi/*.log { rotate 5 daily missingok notifempty compress delaycompress copytruncate } EOF'
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Logrotate
That is some great info!
Some of the steps make it look like it could make for a nice app with the newer features in 6.7.0:
https://community.netgear.com/t5/Community-Add-ons/ReadyNAS-Apps-6-7-0-Update/m-p/1235247
My Docker app is based on some of those changes that are coming.