-
-
Notifications
You must be signed in to change notification settings - Fork 506
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Software | Unifi Controller #3708
Comments
I would to bring this topic up again. Here comes the Steps to Install Unifi on Dietpi. To add this to the Software Catalouge should be not a big deal: Install correct openJDK
Add Repo
Install Unifi |
Hi, many thanks for your request. Just one comment from my side. I don't think it will be implemented if a dependency is |
there is a work around for this. I am running the unifi controller on my dietpi raspberry pi 4, but it has to be done very early in the dietpi setup. I found the reference to this install script on the Ubiqui forums here: https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776
|
@rhkean Thanks for sharing your Script. I would prefer to using the standard-way with Board-Instruments of Linux as desribed above. Then with this solution, an But I agree: without any additional customizings (like reducing the |
well the script is still trying to install JAVA8. Not sure if this is an option for nonRPi systems |
I would prefer that, too. Unfortunately, Ubiquiti's controller code
requires java 8 and there are several other packages that I ran into
problems with... This script worked, though.
To be clear, this is not my script. I found it on Ubiquiti's users forum.
…-rob
On Tue, Nov 17, 2020, 12:36 PM Gill Bates ***@***.***> wrote:
@rhkean <https://github.com/rhkean> Thanks for sharing your Script. I
would prefer to using the standard-way with Board-Instruments of Linux as
desribed above. Then with this solution, an apt dist-upgrade will also
auto-upgrade the Unifi-Controller - without additional Scripts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3708 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTEBBDKXKOKQ5DL643XF7TSQKYDFANCNFSM4PZJ7GOA>
.
|
I'm not certain about what boards are supported, tbh.
You would have to read the scripts to find out. I do recall from my quick
glance a while back, that it does as much 'apt-get' as it can without
breaking anything.
…On Tue, Nov 17, 2020, 1:10 PM Joulinar ***@***.***> wrote:
well the script is still trying to install JAVA8. Not sure if this is an
option for nonRPi systems
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3708 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTEBBGYC2WR4SF2G6LF3BLSQK4A5ANCNFSM4PZJ7GOA>
.
|
I know. I just tried to highlight that the script will not change the requirement of JAVA8. And this limit the possible use case. Currently I'm trying to run the script on one of my VM's but it seems to be stuck somewhere during all the apt install steps 🤔 EDIT:
|
Good find. That is somehow an issue as we already dropped several other software titles from Buster on, which depend on Java 8. Yes Raspbian contains it, but with upcoming Raspberry Pi OS 64-bit (and my in production testing Debian-based ARMv7 image), there will be mostly only RPi 1 and Zero left (+existing systems of course) which use Raspbian. And using binaries from old-old-stable (from summer on) repositories is not something I'm keen to do, although we did in other cases (e.g. libssl1.0.0). Would be interesting if there are any plans to make it Java 11 compatible? |
Agreed.. for as popular as their devices are, I'm a bit dumbfounded that
they haven't brought it current, especially since they've brought other
dependencies current like mangodb.
…On Wed, Nov 18, 2020, 9:06 AM MichaIng ***@***.***> wrote:
Good find. That is somehow an issue as we already dropped several other
software titles from Buster on, which depend on Java 8. Yes Raspbian
contains it, but with upcoming Raspberry Pi OS 64-bit (and my in production
testing Debian-based ARMv7 image), there will be mostly only RPi 1 and Zero
left (+existing systems of course) which use Raspbian. And using binaries
from old-old-stable (from summer on) repositories is not something I'm keen
to do, although we did in other cases (e.g. libssl1.0.0).
Would be interesting if there are any plans to make it Java 11 compatible?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3708 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTEBBEK7HZVNKUTAAHOS5TSQPIHBANCNFSM4PZJ7GOA>
.
|
Or only applications that are compatible for the installed platform appear in the software catalog. :-) |
Jep, that is how it is currently. However, to implement software for a very limited set of platforms is less of a pleasure of course, specially when it's about outdated dependencies which will break them on even the small left platforms earlier or later 😄. So for now it would be all Stretch platforms and Raspbian. Since it is famous for RPi which in combination which Raspbian still covers ~50% of our users, that should be worth enough to implement. |
Does anyone know if the Unifi Controller has been resolved to work with the latest version of DietPi? Also, would it be possible to run PiHole and PiVPN/WireGuard on the same unit (RPi 3 B+) with the Controller or should I keep the controller separate? Thanks in advance! |
Well if I'm not mistaken, issue was the requirement of JAVA8 which is quite old and outdated. |
So if I install Openjdk8, I should be able to run all 3 on one device with DietPi? I'm a noob, so just trying to understand... |
PiHole + WireGuard shouldn't have any influence on Unifi Controller software. Means for you to mange is the installation of Unifi Controller software 😉 |
Avoid using Pihole. I strongly recommended to use AdGuard!
OR JUST USE THE SOFTWARE CATALOG:
Here my installation steps for UniFi
For VPN I‘m using WireGuard on a VPS, due to the fast Upstream. Check out vultr.com or netcup.de |
AGH is available via DietPi software catalogue. There is no need to install it manually. As well why not using PiHole? What is the relation to Unifi?? |
AGH is much better than Pihole. Here is a comparison matrix: https://github.com/AdguardTeam/AdGuardHome the Google Safe-Search enforcement and the parental control feature is a life-saver, especially with little kids in your house. |
well there is no relation to Unifi so to say. You probably would need to make this clear. Otherwise it could confuse people. Next to this you are referring a comparison done by AGH themselves. I guess they never will come to a point where PiHole wins. Both AdBlocker have their pros and cons. It depends on your personal opinion at the end. |
Of course AGH likes AGH more than Pi-hole. I had closer looks into both and clearly prefer Pi-hole for its use/inclusion of well maintained separate open software solutions and related higher customisation possibilities. AGH is an all-in-one single binary, which may be preferred by and looks more streamlined for less experienced users, but is means that more experienced users' or custom needs are more difficult to achieve. Also they partly need to re-invent the wheel, which means potentially higher risk of security issues related to that. The matrix mainly contains features which are extremely easy to add to Pi-hole, via well-known trusted long-existing software:
I can assure anyone who is reading this, that there is no objective/substantial preference possible, the core features are identical. It is finally a matter of taste, and whether you have specific network/webserver setup needs (then use Pi-hole) or not. And do not trust developers own comparison tables: They don't aim to lie of course, but naturally such tables are one-sided and not objective. |
I guess we are moving away from original topic. Let's close the discussion on AGH and PiHole at this point. |
I have PiHole set up currently, so migrating to another PiHole would be easier especially since I have Samsung TVs that were a nightmare to set up and get its TVplus working correctly. My main goal is to get as few devices running on my network as possible (I'm currently running four Pi 3B+'s). My main questions are is it possible to get all 3 on one device (which it appears it it) and is it SMART to have the Unifi Controller, Wireguard, and network-wide ad blocking on the same device... |
yes that should be possible to run all on the same RPi. |
Yes, they should not interfere at all and Pi-hole is extremely lightweight (AGH as well, for completeness, DNS generally is pretty light, compared to HTTP/PHP web applications e.g.), so does not add relevantly to system load, even on RPi Zero. Btw, the Java runtime environment should be sufficient: apt install openjdk-8-jre-headless This works on RPi 32-bit/Raspbian images only, since Debian Buster and above ships only Java 11 and above. Would be interesting to test it with Java 11 btw, probably they shipped some update regarding this? |
I guess the nagging question for me now is should I run all 3 on one device or should it be broken into multiple devices from a network stability/security standpoint. I really appreciate everyone's assistance!! |
@MichaIng Good point on the Java version as I was planning on using the new bullseye release from you when available, so if it only works on the 32bit version that might be a problem??? |
Main issue is MongoDB as you are not able to install it on Raspberry Pi at all. Doesn't matter if it is Buster or Bullseye. Because the MongoDB repository does not support ARM platform. |
How can I fix? What do I need to do? |
Maybe I was not clear enough. You can't install MongoDB on ARM as it is not supported. Maybe you can use a search engine to find a guide describing a way around. |
OK, no reason to be rude, I know very little about Linux... I guess installing a version other than bullseye? Just trying to figure all this out... There must be a way since I'm running a controller on stretch on a pi 3. simply trying to upgrade... And by the way, I have been using a search engine. I'd much rather do that than ask for help... |
Well Stretch is quite old and maybe condition changed in meantime. Means, maybe MongoDB was not required before but is it now. |
I'm pretty sure MongoDB has always been required, kinda like Java 8... All the tutorials I've found reference the same install procedures that now don't work... Just trying to understand. Maybe I need Raspian Lite vs dietpi? not sure, just grasping at straws... I really like the performance from dietpi... |
DietPi is not an own OS, it is a set of shell scripts on top of base image. In case of Raspberry Pi, base image used is Raspberry OS. If you have a running Stretch system, you should be able to update to Buster as a first step. |
I read thru the internet and it seems older version of MongoDB are able to run on Raspberry OS but somewhere in 2000 this changed. There are a couple of entries on MongoDB support forum requesting support for ARM64. found this as well https://www.mongodb.com/community/forums/t/mongod-4-4-on-rpi4-aarch64-arch-for-unifi/10378 There is another guide on Raspberry forum going same way https://www.raspberrypi.org/forums/viewtopic.php?t=300028 Whatever you do, you need to compile it yourself it seems. |
Maybe this could help? |
This is a Debian 9 (Stretch) package, something I would not recommend on Buster or Bullseye. To install Java 8 you could use https://adoptopenjdk.net/installation.html?variant=openjdk8&jvmVariant=hotspot#linux-pkg |
Java 8 is btw still available on Raspbian Bullseye, hence our ARMv6 RPi image, as newer Java versions are not supported on ARMv6. Else AdoptOpenJDK, respectively now named Adoptium is an alternative. About MongoDB: Isn't is possible to compile it for ARM? |
Should be possible according the 2 guides I posted above |
OK, I really appreciate the assistance. I'll see if I can understand the guide. Thanks! |
@MichaIng |
As I edited into my post above, just note that you should compile it on an external drive (not an SD card!), have a large swap file in place (also not on an SD card), turn off all other services/software running on that RPi and let it running over night. At best attach an SSD via USB3 for swap file and building, so the disk I/O at least won't be a bottleneck. I not yet found a definit statement that MongoDB at its core does not support 32-bit, but rather that they stopped to ship 32-bit binaries. Else this would further complicate and limit the abilities to run Unifi Controller, as long as they do not support newer Java versions, as only Raspbian (32-bit) still ships Java 8 natively. Btw, did someone already try the MongoDB 64-bit ARM Ubuntu package (on our 64-bit image, of course)? https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/5.0/multiverse/binary-arm64/mongodb-org-server_5.0.2_arm64.deb |
@Fireman1224 Try it stupid simple. Don't mess around with compling if you don't have any clue about Linux. It will end up in wasting time and a lot of frustration (but you will learn a lot!) We were all Rookies once. :-)
|
Ah nice, a Docker container exists. Not the implementation we'd add to |
So I've never played around with docker, but from what little I have read, it seems like it will be easy enough to try. I had ended up just going back with Raspberry OS and then installing the Unifi Controller on that, but I need a second controller for another location that I have to configure, so I'm going to try the Docker approach. If I can make it work, I may re-do my current site with Docker instead. I appreciate the continued support and advice!! Question 1: If I set up the USB flash drive on a Pi 4, could I then use it in a Pi 3B+ or do I need to make some adjustments because of the RAM difference? Question 2: Will I have to run Question 3: How are the controller version updates handled within Docker? I apologize for the question bombardment, but this is a new area for me... Thanks! @ |
A1: No adjustments required, but probably a swap file needs to be created or its size increased when the system on the RPi 4 used it, or used more than 1 GiB physical memory. A2: The Docker/containerd service itself starts all containers, after having them deployed once. A3: At least you need to remove the old container, before calling # Remove Docker container
docker rm "$(docker ps -a | mawk '/linuxserver\/unifi-controller/{print $1;exit}')"
# Remove Docker image
docker rmi "$(docker images -a | mawk '/linuxserver\/unifi-controller/{print $3;exit}')" |
usually the image can be removed as well as a new version will be download. Depending on the Docker application you would need to check if personal data are stored on a location outside the container to ensure not starting from scratch. |
If settings/data are stored within the Docker image, is removing the container actually sufficient to have it updated, or does this only remove the "image" from being started/controlled by the parent Docker service? |
Removing the container will have no impact on the image as it will not be updated. Creating a new container will reuse the old image again. That's why The image provider ( https://hub.docker.com/r/linuxserver/unifi-controller
|
Thanks for clarification. So then the two commands I provided above should do the job, followed by |
Basically JAVA8 should not be the issue as you could install it from AdoptOpenJDK repository https://adoptopenjdk.net/installation.html?variant=openjdk8&jvmVariant=hotspot#linux-pkg It's still MongoDB not being available that simple on ARM boards. Therefore, using Docker container seems to be the easiest solution currently. Regarding memory consumption, I guess it would be similar without docker. At least on my test, nearly 600MB are used by JAVA 😉 Below a view from my Docker installation for Unifi. BTW: version running inside the container
|
And this still works with the ARMv6 image. @Joulinar But no APT repository exists yet, so install needs to be done manually: curl -sSfLO https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u-2021-09-02-03-07-beta/OpenJDK8U-jre_arm_linux_hotspot_2021-09-02-03-07.tar.gz
tar xf OpenJDK8U-jre_arm_linux_hotspot_2021-09-02-03-07.tar.gz -C /opt
ln -s /opt/jdk8u312-b03-jre/bin/java /usr/local/bin/java |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
The Unifi Controller is a very popular tool on the Raspberry. I found a guide on the net how to install it:
https://smarthome-training.com/de/unifi-controller-raspberry-pi/
Does anyone have the time and inclination to add the Unifi controller to the software archive so that it can be easily installed via
dietpi-software
?PS: Be aware of the missing JAVA_HOME-Bug: https://community.ui.com/questions/Java-Home-Directory-Fail-Issue-on-Ubuntu-RESOLVED/1faea5fd-6eda-4be9-a12f-676ef6be2529
The text was updated successfully, but these errors were encountered: