markdegrootnl / unifi-protect-arm64 Goto Github PK
View Code? Open in Web Editor NEWRun UniFi Protect in Docker on ARM64 hardware
Run UniFi Protect in Docker on ARM64 hardware
This works fine on Odroid-C4 with 16GB SD card and 250Gb USB SSD. Thanks!
However the container needs more than 16GB of storage to run so either the primary storage needs to be bigger, or the arguments:
-v /storage/srv:/srv
-v /storage/data:/data \
modified to:
-v /storage/srv:/PATH_TO_BIGGER_STORAGE
-v /storage/data:/PATH_TO_BIGGER_STORAGE \
Every time i want to start the container it gives me this error in the Log:
standard_init_linux.go:207: exec user process caused "exec format error"
docker run -d --name unifi-protect-arm64 \ --privileged \ --tmpfs /run \ --tmpfs /run/lock \ --tmpfs /tmp \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ -v /home/protect-storage/srv:/srv \ -v /home/protect-storage/data:/data \ --network host \ markdegroot/unifi-protect-arm64:latest
Any idea?
Running on a fresh Raspberry Pi 4 8 GB
200 GB SD Card
not an Issue but a question.
Do you know which ports protect is using?
i want to use port 80 on my machine.
thanks.
I don't know enough to get this running under docker on a x86 machine using qemu to emulate a arm64 but i think it would be possible, does anyone have or could make a guide?
When the container boots up I'm able to step through all the welcome screens and even authenticate to UI.com but on the final step I receive:
UNVR-4 Setup Error
An unexpected error occured during setup.
errors.log is filled with:
2021-04-13T17:18:07.574Z - error: UUM does not appear to be running: request to http://127.0.0.1:9080/api/ucore/manifest failed, reason: connect ECONNREFUSED 127.0.0.1:9080
system.log shows:
2021-04-13T16:52:50.294Z - error: Error: ENOENT: no such file or directory, open '/data/unifi-core/5fcf3809-f016-4b18-865b-550012ca4c2d'
may be related to postgresql-cluster:
systemctl status shows:
[email protected] - PostgreSQL initial setup service
Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/[email protected]
└─cluster-migrate.conf
Active: active (exited) since Tue 2021-04-13 17:15:05 UTC; 6min ago
Process: 75 ExecStartPost=/usr/bin/unifi-protect-db-cluster-cleanup (code=exited, status=0/SUCCESS)
Main PID: 56 (code=exited, status=0/SUCCESS)
Apr 13 17:14:15 docker-desktop systemd[1]: Starting PostgreSQL initial setup service...
Apr 13 17:15:05 docker-desktop unifi-protect-db-cluster-cleanup[75]: Error: Cluster 9.6 protect does not exist
Apr 13 17:15:05 docker-desktop systemd[1]: Started PostgreSQL initial setup service.
I decided to use the ipvlan driver to run the container in a separate vlan. To do this, I made a compos file with the following content:
version: '3.8'
services:
unifi-protect:
image: markdegroot/unifi-protect-arm64
container_name: unifi-protect
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /opt/unifi_protect/srv:/srv
- /mnt/1/unifi_protect/data:/data
- /opt/unifi_protect/persistent:/persistent
tmpfs:
- /run
- /run/lock
- /tmp
networks:
unifi_ipvlan:
ipv4_address: 10.1.11.3
restart:unless-stopped
/networks:
unifi_ipvlan:
driver: ipvlan
driver_opts:
parent: eth0.11
ipvlan_mode: l2
ipam:
config:
- subnet: 10.1.11.0/24
gateway: 10.1.11.1
And it starts and the address is available on vlan 11, but the web interface does not start.
This is what I see in the most running container
Does anyone have any idea how to fix this?
Pulled the latest image (markdegroot/unifi-protect-arm64:latest), created container and got it running smoothly.
But when I tried to adopt a brand new ubnt g4 instant camera (https://store.ui.com/us/en/products/camera-g4-instant), powered on and heard "welcome to... ready to adopt...", opened Protect APP on my iPhone, got prompt to add G4 instant, scrolled to select my WIFI ssid and input password, then Protect APP showed the radar-scanning animation, without error notice the animation stopped and no camera added.
Tried to do it for several times, WIFI ssid and password was input right, still failed to adopt ubnt g4 instant camera.
Is there any log File to find out what happened?
Just wondering if this is still being maintained? The update feature doesn't work to get to the latest shipping version of Uniifi OS (2.2.7) which also enables Protect 1.19.
Hi!
Using
docker run -d --name unifi-protect \
--privileged \
--tmpfs /run \
--tmpfs /run/lock \
--tmpfs /tmp \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-v /storage/srv:/srv \
-v /storage/data:/data \
-v /storage/persistent:/persistent \
--network host \
-e STORAGE_DISK=/dev/nvme0n1p1 \
markdegroot/unifi-protect-arm64
I notice the Protect only sees a 67.1MB Disk.
Could it be using /dev?
root@nvr:/# docker exec -it unifi-protect sh
# df -h
Filesystem Size Used Avail Use% Mounted on
overlay 116G 5.1G 106G 5% /
tmpfs 64M 0 64M 0% /dev
shm 64M 56K 64M 1% /dev/shm
/dev/nvme0n1p1 916G 176M 870G 1% /srv
tmpfs 3.9G 17M 3.8G 1% /run
tmpfs 3.9G 5.5M 3.9G 1% /tmp
/dev/mmcblk0p2 116G 5.1G 106G 5% /etc/hosts
tmpfs 3.9G 0 3.9G 0% /run/lock
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
tmpfs 256M 0 256M 0% /var/opt/unifi-protect/tmp
#
The problem is that it works initially, on the first setup, I can connect cameras to it, and it works great.
However, if I stop and start the container, when I try to connect to the UI it simply hangs. Dev console says the browser is able to get some files successfully as it can also be seen in the logs, but then it just hangs and I can't figure out what's wrong.
The unifi-core service just restarts every 2 minute indefinitely.
Did any of you guys experience this before?
I already set systemd.unified_cgroup_hierarchy=0
:
root@pi:/home/pi# cat /proc/cmdline
coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=DC:A6:32:FD:31:7A vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=zstd dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash systemd.unified_cgroup_hierarchy=0
Hardware: Raspberry PI 4 B, 8GB mem
OS: Ubuntu 22.04
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.148Z - [http] : https 705ms 200 GET /
Jun 14 01:30:37 pi sudo[4210]: unifi-core : PWD=/usr/share/unifi-core/app ; USER=root ; COMMAND=/sbin/ubnt-systool network-speed enp0s2
Jun 14 01:30:37 pi sudo[4210]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=998)
Jun 14 01:30:37 pi sudo[4210]: pam_unix(sudo:session): session closed for user root
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.245Z - [system] : error reading network data Error: Unexpected speed=0 received by cmd=/usr/bin/sudo -n /sbin/ubnt-systool network-speed enp0s2
Jun 14 01:30:37 pi node[1308]: at dl (/usr/share/unifi-core/app/service.js:22:6530)
Jun 14 01:30:37 pi node[1308]: at async Promise.all (index 1)
Jun 14 01:30:37 pi node[1308]: at r (/usr/share/unifi-core/app/service.js:24:986)
Jun 14 01:30:37 pi node[1308]: at async Promise.all (index 1)
Jun 14 01:30:37 pi node[1308]: at Object.s [as getClientNetwork] (/usr/share/unifi-core/app/service.js:24:1161)
Jun 14 01:30:37 pi node[1308]: at async Promise.all (index 7)
Jun 14 01:30:37 pi node[1308]: at $ (/usr/share/unifi-core/app/service.js:83:25082)
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.310Z - [http] : https 26ms 200 GET /floorplanDeps.f0b03dfbe9117a75e741.js
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.312Z - [http] : https 24ms 200 GET /icons.0ce1c9f05fceb5191a86.js
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.313Z - [http] : https 21ms 200 GET /main.0c06c61c.css
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.394Z - [http] : https 57ms 200 GET /lottie.674941a7605abf130e9c.js
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.396Z - [http] : https 49ms 200 GET /vendor.e36d615c9f4437a5f30d.js
Jun 14 01:30:37 pi node[1308]: 2023-06-13T23:30:37.397Z - [http] : https 46ms 200 GET /main.030796c94c32707d75ef.js
Jun 14 01:31:01 pi systemd[1]: systemd-timedated.service: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit systemd-timedated.service has successfully entered the 'dead' state.
Jun 14 01:32:07 pi systemd[1]: unifi-core.service: Watchdog timeout (limit 2min)!
Jun 14 01:32:07 pi systemd[1]: unifi-core.service: Killing process 1308 (node) with signal SIGABRT.
Jun 14 01:32:08 pi systemd[1]: unifi-core.service: Main process exited, code=dumped, status=6/ABRT
So i tried both version on pi5,
markdegrootnl and snowsnoot, but neither is working, the container runs but the webUI wont work.
I did get the read only error but it seems to have resolved after following the fix in the wiki, the error no longer appears in dmesg.
thing is I'm using portainer and both containers dont show any logs so i have no clue what i'm doing wrong..
Hi! I'm trying to build this image with your docs, but I'm seeing that my extracted files are all .zlib files.
I'm running binwalk 2.2.0
Raspberry Pi 3 with Ubuntu Server 20.04
When I run the command listed in Readme, it pulls and starts a container that shows "/lib/systemd/systemd" as the command. Connection is refused if I check in a browser, unifi protect app doesn't find anything on the network, and a port scan shows no ports open. I've disabled firewall to be sure.
Nothing is listed if I run "docker logs" and "attach" just seems to hang the console.
I'm relatively new at docker so there may be more I can troubleshoot; just let me know.
I also looked at building it myself. Got as far as pulling all the .deb files from the firmware when I found it doesn't have a /var/lib/version file. I tried to install unifi-protect on the machine itself and even installing every .deb from the firmware, there was always an unmet dependency.
Any help is appreciated
Hi,
Started the container using docker run
command. In web UI, after pressing Finish in the setup process I get the error.
First, I tried restarting the container and setting folder permissions to 777, did not help.
Inside the container more /var/log/postgresql/postgresql-9.6-main.log
had:
2021-10-10 14:52:20.424 UTC [330] postgres@ulp-go FATAL: database "ulp-go" does not exist
2021-10-10 14:52:21.473 UTC [353] postgres@ulp-go-syslog FATAL: database "ulp-go-syslog" does not exist
2021-10-10 15:33:34.099 UTC [82] FATAL: data directory "/data/postgresql/9.6/main/data" has group or world access
2021-10-10 15:33:34.099 UTC [82] DETAIL: Permissions should be u=rwx (0700).
So I've set the permissions to 700, the error above went away.
Then, looking into /srv/unifi-protect/logs/errors.log
:
2021-10-10T15:48:58.410Z - error: Cannot connect to database. connect ENOENT /var/run/postgresql/.s.PGSQL.5433
2021-10-10T15:48:58.420Z - error: Error: connect ENOENT /var/run/postgresql/.s.PGSQL.5433
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2021-10-10T15:49:33.274Z - error: DEVICE NOT REGISTERED unregistered-hardware
Any ideas?
Files are filled as mentioned in docs.
Error: dpkg-deb: error: archive '/ubnt-archive-keyring_1.0-1_arm64.deb' uses unknown compression for member 'control.tar.zst', giving up
Docker build fails
Hi Mark! Thank you for your work!
So I managed to start the container on RPi 3 but the container itself doesn't produce any logs (I assume because unifi-protect doesn't actually stat)
The error from containerd that I see in syslog says:
Jul 17 20:55:46 pi containerd[513]: time="2023-07-17T20:55:46.248151129+01:00" level=error msg="add cg to OOM monitor" error="cgroups: memory cgroup not supported on this system"
I'm trying to set up Unify protect. My setup: Odroid M1S, Ubuntu 20.04.6 LTS, /storage
is on a 1TB NVMe with plenty of space. 😃 The system is a fresh setup.
The installation itself went smoothly. However, when I reach the Applications dashboard, I can see that the "Protect" app is not starting:
It shows "Starting" for several seconds, then falls back to a "Start" button, and immediately tries to start again. However it never reaches a state where it is completey started and I can setup the app.
Docker logs nothing at all. Unify OS' own log shows nothing of relevance. top
shows that unify-protect
is consuming about 150% CPU power.
What can I do?
Thank you for your help and for this great Docker image!
Hello everybody,
I try to setup the Docker Image on my Debian ARM64.
I set a Link to my NAS as Storage with plenty of free space and i do see the folders being created, also the Docker container seems to be running.
But I cant access the Webinterface.
Also the Logs of the Docker container are empty.
But when I connect to the Bash of the container and look into dmesg, I see only this error
Do anybody know how to troubeshoot that?
Thank you in advance
Regards
Hi,
Thank you for creating this container! I can't seem to get this container running reliably. I did get it to start the first time but as soon as I try to load the protect application, I always get a 500error in the frontend and the application won't load at all. I did get it to load for a few seconds but it couldn't connect to the local nvm (Trying to connect to your nvm).
It looks like there are a bunch of TLS certification errors in the log files within the container but I can't seem to resolve them. I've already tried a reverse proxy with a custom certificate but to no avail...
Do you have any tips or similar experiences with this error?
I'm trying to run it on a Pi 3+ with ubuntu 20.04 x64
Thanks a lot!
The container generates 60% CPU load with 0 camera's connected. 24/7.
The container is unstoppable, there is absolutely no way to stop it. Not with docker, not with kill -9, just no way.
Trying to brute force stop the container halts the system, then it needs a power cycle.
I tried it with 3 Pi 4's with 8GB RAM running from USB 3.0 NVME disks.
Hi,
I am receiving the following output on the HDMI output when trying to run the container, even though I am running the command while connected via ssh. Nothing obvious happens on the ssh end.
Failed to create /init.scope control group: read-Only file system
Failed to allocate manager object: Read-Only file system
Freezing execution
I have very little experience with Docker but looking into this I have so far seen it may be related to some compatibility between docker and systemd
info: https://serverfault.com/questions/1053187/systemd-fails-to-run-in-a-docker-container-when-using-cgroupv2-cgroupns-priva
My system:
OS: Ubuntu 64bit server edition
hardware: Pi 3
Other: Connected to tv via HDMI, mostly using remotely via ssh. connected via Ethernet to network.
Any help is appreciated, I will update if I find out more or get to a solution.
You can change the size of the required disk size by changeing the file /usr/share/unifi-protect/app/config/config.json. This will help to start protect on small disks.
If you change the parameter mbToKeepFree to something like this:
"mbToKeepFree": 1024,
You can easily use this on a raspberry with 32GB SD Card
By default the value is around 66GB
Hello!
I saw this project here and with the raspberries i have it looks promising with higher Version numbers of protect
I wanted to start this container on a raspberry pi 4 4gb with raspberry os lite 64 bit with 128 GB sdcard and an usb disk connected with 4TB space.
Its mounted as /mnt/usb1 and i created a symlink to /storage.
I started the container with 1:1 as written on the Info Page.
It creates the folders on the usb disk and with docker ps says that unifi-protect-arm64 is started.
But on https://raspberryip there is nothing started and docker logs gives no output.
Am i missing something?
thanks
christoph
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.