Unifi Controller Self Hosted in Docker - MongoDB

  Рет қаралды 21,092

Jim's Garage

Jim's Garage

Күн бұрын

Пікірлер: 111
@CHLEE-ou6ub
@CHLEE-ou6ub 9 ай бұрын
Thanks again James, Seamless migration to new docker (now with Traefik) and successfully restored backup from old Docker. 👍
@Jims-Garage
@Jims-Garage 9 ай бұрын
Excellent, good job 👍
@davidhorton1277
@davidhorton1277 22 күн бұрын
Very straightforward and to the point. Having the files available on GitHub is a bonus. I was up and running in short order. Thank you!
@Jims-Garage
@Jims-Garage 21 күн бұрын
Glad it helped!
@Delta-jt5hd
@Delta-jt5hd 3 ай бұрын
Many thanks for your detailed explanation! I used linuxserver/unifi-controller in the past, but switched to jacobalberty/unifi when linuxserver separated MongoDB into an external dependency. jacobalberty/unifi has served me well, but it seems that it's updated a lot less frequently than linuxserver. I started reading linuxserver documentation to prepare for migrating back. This video answered all of my remaining questions. I feel much more prepared to jump back (to get a more up-to-date controller)!
@Jims-Garage
@Jims-Garage 3 ай бұрын
You're welcome, good luck 🤞
@rille47
@rille47 2 ай бұрын
Thanx mate! Worked like like a charm from 7.x with internal "db" to 8.x w external mongo db , for my install I removed the networks and labels stuff from Your composer file (since i do not use it) - and 1 2 3 restore backup and it was up n running! Great video got rid of all my config/install questions and made it all so much simpler.
@Jims-Garage
@Jims-Garage 2 ай бұрын
Glad it helped, thanks for dropping a comment
@markandrow4010
@markandrow4010 9 ай бұрын
Thank you James, greate again fully detailed tutorial, specially Docker configed with Traefik. 👌 👍
@Jims-Garage
@Jims-Garage 9 ай бұрын
You're welcome
@Vaillant44
@Vaillant44 9 ай бұрын
Nice video, thank you for showing how to make it work with reverse proxy as I did not figure that one on my own.
@Jims-Garage
@Jims-Garage 9 ай бұрын
No worries, you're welcome
@nonamesi
@nonamesi 9 ай бұрын
Great video... I use newer docker compose version (3.x instead of 2.x), and unifi controller utilizes the "depends_on: unifi-mongo" command so the startup order is correct
@Jims-Garage
@Jims-Garage 8 ай бұрын
Yes, that's a good idea. I should add that.
@3prswe
@3prswe 6 ай бұрын
Finally migrated from CloudKey gen 1 to Docker on Linux. Your configuration files really helped me with the database integration. Thanks. I especially appreciate your calm and clear voice.
@Jims-Garage
@Jims-Garage 6 ай бұрын
Thanks, glad it worked for you. Appreciate the feedback
@georgebobolas6363
@georgebobolas6363 8 ай бұрын
Great content as always, and even better timing, to migrate our old containers!
@Jims-Garage
@Jims-Garage 8 ай бұрын
Thanks for the feedback
@euf0ria
@euf0ria 4 ай бұрын
Thanks for sharing this great guide! I'm now running this on a raspberry pi 4 and to get it to work i had to use mongo:4.4.18 . Other versions complained about the ARM Architechture.
@Jims-Garage
@Jims-Garage 4 ай бұрын
Glad it helped!
@PaulLittlefield
@PaulLittlefield 6 ай бұрын
Absolutely superb video. I’m just about to jump from Unifi 7 to 8 with external MongoDB and this is so useful, many thanks!
@Jims-Garage
@Jims-Garage 6 ай бұрын
No problem, you're welcome. Thanks for commenting.
@PaulLittlefield
@PaulLittlefield 4 ай бұрын
@@Jims-Garage Eeeek, I'm getting this error on an AMD quad core with 16GB RAM "There is insufficient memory for the Java Runtime Environment to continue."
@alexander.santiago
@alexander.santiago 8 ай бұрын
This tutorial was wonderful…moved my instance off my rpi onto a unbuntu server running docker nice and easy! Thanks
@Jims-Garage
@Jims-Garage 8 ай бұрын
Glad it worked 😁
@jdmcivicrrr
@jdmcivicrrr 9 ай бұрын
Thanks Jim for your videos. I'm just getting in homelabing and wanting to learn proxmox, truenas, Kubernetics, and all that jazz. Keep it up ❤
@Jims-Garage
@Jims-Garage 9 ай бұрын
Awesome, welcome to the hobby!
@JensAndersson
@JensAndersson 9 ай бұрын
Perfect video as always, thanks Jim. was gonne move my unify controller from my home assistant to its own place in docker so this is perfect timing for me.
@Jims-Garage
@Jims-Garage 9 ай бұрын
Glad it's helpful
@fooch217
@fooch217 9 ай бұрын
Thank you Jim! Really appreciate this video with the instructions making it available with Traefik. Just found your channel a few weeks ago and am enjoying everything you’re doing. Thanks for all this great content and explaining it very clearly and easily to follow.
@Jims-Garage
@Jims-Garage 9 ай бұрын
Glad it was useful, thanks for the feedback.
@djKenpLan09
@djKenpLan09 7 ай бұрын
Super helpful! Thank you so much for sharing!
@Jims-Garage
@Jims-Garage 7 ай бұрын
You're welcome 🤗
@jig1056
@jig1056 5 ай бұрын
This was so helpful, thanks a lot.
@Jims-Garage
@Jims-Garage 5 ай бұрын
Glad it was helpful!
@jerescha
@jerescha 3 ай бұрын
Just an FYI as your video pulled down Unifi Network Application 8.0.26 as latest. MongoDB 3.6 through 7 is supported as of UNA version 8.1
@Jims-Garage
@Jims-Garage 3 ай бұрын
@@jerescha thanks 👍
@Ian-S.
@Ian-S. 3 ай бұрын
I love how EVERY transition is a twirl. You deserve your creative license there - because the quality is A+++. lol
@Ian-S.
@Ian-S. 3 ай бұрын
Whups - there are some flip transitions too.
@bradt5426
@bradt5426 4 ай бұрын
I would love to see a video on using this with `docker stack deploy`. It's unable to identify the devices initially because it has to use an overlay network, when Im guessing it needs an IP on the physical network. Haven't found a solution to this issue yet, but I'm firm on hosting it within a swarm for high availability so I continue to dig.
@Jims-Garage
@Jims-Garage 4 ай бұрын
Interesting, I'm running this on Kubernetes without issue. I had problems with overlay networks on KVM images.
@basdfgwe
@basdfgwe 9 ай бұрын
I didnt realize you can use unifi access points with other hardware. I bought udm pro se for all this. But I am pretty happy with udm pro se.
@Jims-Garage
@Jims-Garage 8 ай бұрын
Great, it's a cool device, I just wish it had HA.
@Excited-IT-Architect
@Excited-IT-Architect 9 ай бұрын
Another great vidoe, JIm! Unfortunately I do not get it to work in Docker Swarm yet. Is there anything I still need to change (except the overlay network(s))?
@Jims-Garage
@Jims-Garage 9 ай бұрын
I'll have to check out swarm. Make sure you don't use the KVM image as that doesn't play nicely with network overlay.
@shawn2296
@shawn2296 9 ай бұрын
okay im glad i watched this ill update this sooner rather than later i do have a few questions i have the linux server hosting docker on a different vlan that thw switch is you mentioned about this in the video what i had to do is setinform manually by running the command i do just want to eliminate that but i cant get myself to put the server on a physical network here is my question what rules do you use to have seem-less adoption
@Jims-Garage
@Jims-Garage 9 ай бұрын
Essentially you need a rule that allows traffic from the physical device network to the management vLAN on the ports in the docker compose file.
@thespencerowen
@thespencerowen 9 ай бұрын
4 videos in a week? Jim you don’t need to go this hard. Calm down 😅
@Jims-Garage
@Jims-Garage 9 ай бұрын
I have about 80 videos I want to do before I can rest (before they're outdated ha)
@thespencerowen
@thespencerowen 9 ай бұрын
@@Jims-GarageI love it. I’m learning a ton.
@Jims-Garage
@Jims-Garage 9 ай бұрын
@@thespencerowen thanks, that's how I'm treating it. It's fun to make and as long as people find them useful I'll continue.
@RajaSekar-ez2ul
@RajaSekar-ez2ul 8 ай бұрын
Thanks Jim for the great video!! Just wondering have you configured the backup configuration post migration ? It seems moved to unifi mongo docker not able to create the auto backup. I am getting db error. Would you able to validate that it’s working ? Thanks
@alextran93
@alextran93 8 ай бұрын
Hi Jim. I am interested in using the UniFi cameras on my network. I remember hearing that the cameras run on UniFi Protect. I'm not sure if this is separate from UniFi Network. Would this docker container support the cameras as well?
@Jims-Garage
@Jims-Garage 8 ай бұрын
Unfortunately unifi protect requires ubiqiti hardware, you cannot run it with the docker image. I use unifi cameras with frigate, in my opinion it's better than protect, I have a video on it.
@JoshRogers117
@JoshRogers117 8 ай бұрын
Thanks for the video Jim, After completing the installation and restoring from a backup that I made from my cloud key, I am brought to the login screen however NONE of my logins work. I'm quite baffled by this. I'm still able to login to the cloud key that the backup was made from. I've tried "root", "admin", "ubnt" and anything else I can think of but I just can't login at all. Any ideas to help me out? Would be greatly appreciated!
@Jims-Garage
@Jims-Garage 8 ай бұрын
Interesting, are there any errors in the logs? Is the database connection OK? I assume it's a local account in UI?
@robertkosulic4122
@robertkosulic4122 9 ай бұрын
"If you're considering installing it on a Raspberry Pi 4, I advise against it. The Raspberry Pi 4 uses an ARM8 processor, and unfortunately, MongoDB no longer supports this architecture as of version 4.4. Additionally, there are persistent issues when running UniFi on Docker. Devices frequently switch between offline and online states, and there are constant problems with adapting and readapting. Sometimes, it's impossible to adapt them at all, even if you've set the correct controller address in Settings > Advanced - Overide. I've also experienced data loss on my SD card three times and once on my HDD. The last time, I couldn't even restore from a backup. Devices wouldn't adapt, even through SSH. Those that I did manage to restore ended up malfunctioning soon after. Eventually, I opted to purchase a dedicated controller, and I haven't had any issues since then."
@WimJacobs
@WimJacobs 8 ай бұрын
Had a similar issue with running MongoDB on Raspberry PI4. However I noticed that by being more specific about the Mongodb version, I got it to work. I.s.o pointing out version 4.4 I used the latest version that supports ARM8 (and not the later ARM8V2) which is 4.4.18. That did it for me.
@poolace
@poolace 7 ай бұрын
at 11:30 the version you were signing into was 8.0.26, but the dashboard at 11:40 was 8.0.24. ?¿
@Jims-Garage
@Jims-Garage 7 ай бұрын
Good spot. Possibly a caching issue
@bfourney
@bfourney Ай бұрын
Understood like 1% of this. Doesn't look like I'm gonna be using docker, way too complicated
@Jims-Garage
@Jims-Garage Ай бұрын
I do have Docker beginner videos earlier on. Containers are well worth learning if of interest to you.
@bfourney
@bfourney Ай бұрын
@@Jims-Garage I’ll check it out, but I’ll probably just hire somebody to walk me through setup
@JGNiDK
@JGNiDK 9 ай бұрын
So if I don't use proxy, I skip line 46, 60 and 61? And If I go with NGINX in the future I need to either add them again, or do something else? And thanks for the video!!
@Jims-Garage
@Jims-Garage 9 ай бұрын
Without a proxy ignore the Traefik labels (and probably the network proxy). If you use Nginx you'll need to follow their instructions for forwarding (I may cover this in future)
@JGNiDK
@JGNiDK 9 ай бұрын
@@Jims-Garage thanks
@try-that
@try-that 9 ай бұрын
@@Jims-Garage I'd like to see some Nginx related video's if possible.
@Jims-Garage
@Jims-Garage 9 ай бұрын
@@try-that sure, I can do that
@henrikolausson7714
@henrikolausson7714 Ай бұрын
Awsome, but I get this error message:WARNING: MongoDB requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that! applies to all versions ≥5.0, any of 4.4 ≥4.4.19 Im runing ubuntu on a raspberry pi 4, maybe that doesnt work?
@Jims-Garage
@Jims-Garage Ай бұрын
@@henrikolausson7714 it'll be something ARM specific. I think the pi 4 is arm v7 but I might be wrong
@synthpopper5555
@synthpopper5555 9 ай бұрын
Where in unifis documentation does it say the regular self hosted controller is deprecated? I want to update my self hosted controller to version 8, if possible.
@Jims-Garage
@Jims-Garage 9 ай бұрын
It isn't unifi's that deprecated, it's Linux IO's container that is, it's the most popular from my experience. If you're using some other image you are likely fine.
@rrr92462
@rrr92462 8 ай бұрын
Been looking for a good Unifi container vid. This looks good. I run the Unifi network application on a separate Linux box right now (not in a container). Been running for months with no problems. I’ve installed docker on another Linux machine and created the containers like in your vid. I run the up command. Everything looks good per the logs (via Portainer). I have a basic flat network. The Unifi network app web page comes up (comes up on any PC on the network). I recovered my backup from my working Unifi network app on the separate Linux box. However, the Unifi devices are just grayed out in the Unifi equipment list. Am I getting something wrong in docker networking? Does this have anything to do with the inform address?
@Jims-Garage
@Jims-Garage 8 ай бұрын
Yes, it's because the inform address (IP is different). You need to ssh into each device and change the inform address. It's a single command, very simple (check their site)
@rrr92462
@rrr92462 8 ай бұрын
That did the trick! Did the ssh to all my devices and “Bob’s your uncle”. (assuming you're a Brit).
@Jims-Garage
@Jims-Garage 8 ай бұрын
@@rrr92462 Sally's yer Aunt. I believe you can also use a DNS hostname in case you ever alter the IP in the future.
@TheBigMonsterLP
@TheBigMonsterLP 3 ай бұрын
i get an "Error: EACCES: permission denied, open '/docker-entrypoint-initdb.d/init-mongo.js'" what can i do? the file location is correct and its correctly mounted. How can i grant access to the file? My NAS is on Ubuntu OS (UGOS)
@arslo
@arslo 8 ай бұрын
Does any one also run into the problem that login is not possible after restoring? Seems to be a common issue…
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
can you say, why devices status on unifi controller are offline? i have restore file from backup. but it isnt work. alle device are offline... who can i fix this? thanks.
@Jims-Garage
@Jims-Garage 8 ай бұрын
You likely need to inform the devices to use the docker IP
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
that 's mean, i have to reset all the device? (before I have another IP. Now, I install sophos xg home. than new VM has new IP on Portaine/Traefik etc. Than, I install unifi contoller like you. The nw VM has new IP. And on backup file is als IP. That's why, all device are offline. now, I have to reset all? right@@Jims-Garage
@JGNiDK
@JGNiDK 8 ай бұрын
Now what about updates?? How do you update through Docker??
@Jims-Garage
@Jims-Garage 8 ай бұрын
The same way you update any container. Bring it down, edit the compose, redeploy.
@JGNiDK
@JGNiDK 8 ай бұрын
@@Jims-Garage what should be edited in compose?
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
@khanhthedag7269 vor 0 Sekunden that 's mean, i have to reset all the device? (before I have another IP. Now, I install sophos xg home. than new VM has new IP on Portaine/Traefik etc. Than, I install unifi contoller like you. The nw VM has new IP. And on backup file is als IP. That's why, all device are offline. now, I have to reset all? right?
@Jims-Garage
@Jims-Garage 8 ай бұрын
Login to each device, and set the inform IP to the new controller. Should pick right back up.
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
how can I do this? and where can I do, on terminal or on on unifi-contoller ui?@@Jims-Garage
@todesspirale7039
@todesspirale7039 4 ай бұрын
Can't seem to get this working as non-root, any suggestions?
@SE-161
@SE-161 9 ай бұрын
Do I need a reverse proxy? what is the benefit of using it? I'm running nginx proxy manager. how do I config this?
@Jims-Garage
@Jims-Garage 9 ай бұрын
No, you don't need one, strip the labels out if you're not using Traefik. The benefits are proper SSL certificates (albeit it's more of a nice to have than a must have for internal access). I'm not sure off hand how to use Nginx proxy manager. It might be worth using something else in lieu of all their security issues (e.g., nginx or Traefik)
@SE-161
@SE-161 9 ай бұрын
@@Jims-Garage Thank you very much for your time to explain my beginner's question. Much appreciate it a lot. Please keep up your awesome job. Btw, I learned a lot watching you videos. Such a great value
@Jims-Garage
@Jims-Garage 9 ай бұрын
@@SE-161 that's great to hear, I appreciate your feedback
@AndreasErikssonNet
@AndreasErikssonNet 8 ай бұрын
Any suggestions on why I get "***aborting after fassert() failure" in my logfiles. It only cycles through the same lines ending with "***aborting after fassert() failure". I hame my data folder mounted on a NAS using CIFS shares. When I inspect the unifi controller container it's waiting for MongoDB do be reachable.
@AndreasErikssonNet
@AndreasErikssonNet 8 ай бұрын
Well, thats unfortunate, MongoDB dosen't like writing to CIFS shares.
@applebottomjeans7145
@applebottomjeans7145 9 ай бұрын
without mongodb?
@Jims-Garage
@Jims-Garage 9 ай бұрын
To my knowledge there is no longer a docker image without MongoDB that is supported. You can run the unifi controller script made by Glenn in a VM.
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
Thanks for Tutorial. I have install. If I call the domain (or IP:8443), it show this. HTTP Status 404 - Not Found why? Can you help me.
@Jims-Garage
@Jims-Garage 8 ай бұрын
Try with https.
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
I have also try. not working. another thing. the port 8080:8080 is use by traefik. i try to change 8181:8181 on unifi docker.compose file. also not working. what wrong here?@@Jims-Garage
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
I have also try with https. Not Working. another thing. 8080:8080 is busy, used by traefik. I have change on docker-compose on unifi (8181:8080). Not working. how can I fix this, for working...?@@Jims-Garage
@khanhthedag7269
@khanhthedag7269 8 ай бұрын
Hi Jim, delete all and try again. I know why it not working. I have make first Traefik Crawdsec (change traefik.yml, than Traefik secure (change again traefikl.yml) and finally setup unifi controller. now it work. Thank you.@@Jims-Garage
@JPEaglesandKatz
@JPEaglesandKatz 4 ай бұрын
did you actually delete my post? sjeez
@Jims-Garage
@Jims-Garage 4 ай бұрын
Nope, I never delete posts. I'll check and approve (typically links get auto deleted)
@JPEaglesandKatz
@JPEaglesandKatz 4 ай бұрын
@@Jims-Garage Thanks... Well then my apologies for suggesting you did.. Must have been something at my end then.... soz... I had quiet a few issues getting this to work... Currently I'm not using a reverse proxy yet.... Installing the controller was easy.. Having it find my unifi switch was a different story... Ended up having to create a macvlan with the subnet my switch resides in.. Opening some ports on my opnsense firewall and it worked.. Cheers! Love your videos, detailed and interesting to follow...
@Jims-Garage
@Jims-Garage 4 ай бұрын
@@JPEaglesandKatz glad it worked, that's how I did mine :)
@joseossa3117
@joseossa3117 9 ай бұрын
Just what I was looking for! thanks
@Jims-Garage
@Jims-Garage 9 ай бұрын
Awesome 😎
K3S, RKE2, Rancher, Metallb, Kube-VIP - Upgrade Guide
19:31
Jim's Garage
Рет қаралды 8 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 16 МЛН
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 15 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 4,3 МЛН
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН
Single Sign On With OAuth2.0 - Authentik Is AWESOME!
18:32
Jim's Garage
Рет қаралды 43 М.
SMB Server In Docker with ZFS! Simple, Cheap, and Efficient!
23:00
Jim's Garage
Рет қаралды 49 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 133 М.
Thunderbolt Networking is FAST & CHEAP!
31:04
Jim's Garage
Рет қаралды 27 М.
This Docker Compose UI is amazing! // Dockge
13:08
Christian Lempa
Рет қаралды 105 М.
self-host the INTERNET! (before it's too late)
15:14
TechHut
Рет қаралды 281 М.
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 241 М.
Quick and Easy Local SSL Certificates for Your Homelab!
12:08
Wolfgang's Channel
Рет қаралды 796 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 16 МЛН