Unifi Controller Self Hosted in Docker - MongoDB

Поделиться
HTML-код
  • Опубликовано: 13 дек 2024

Комментарии • 123

  • @CHLEE-ou6ub
    @CHLEE-ou6ub 11 месяцев назад +4

    Thanks again James,
    Seamless migration to new docker (now with Traefik) and successfully restored backup from old Docker. 👍

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад

      Excellent, good job 👍

  • @McPhailHunt
    @McPhailHunt 17 дней назад +2

    This video and his github code examples for the two files were perfect to help me migrate to the newest docker version to host my unifi controller. One thing important is that in my case, I migrated to a new IP address. After migrating, I was stuck in adoption mode for the APs and switches. I was able to fix this by selecting the legacy UI, navigating to Settings, Network Application, Network Application Hostname/IP and then changing that to the new IP address. After that the adoption took place and I'm fully up and running. Thank you for this.

    • @Jims-Garage
      @Jims-Garage  17 дней назад +1

      You're most welcome, I'm glad it worked out.

  • @davidhorton1277
    @davidhorton1277 3 месяца назад +2

    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!

  • @3prswe
    @3prswe 9 месяцев назад +1

    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  9 месяцев назад +1

      Thanks, glad it worked for you. Appreciate the feedback

  • @Delta-jt5hd
    @Delta-jt5hd 6 месяцев назад +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  6 месяцев назад

      You're welcome, good luck 🤞

  • @PaulLittlefield
    @PaulLittlefield 9 месяцев назад +1

    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  9 месяцев назад

      No problem, you're welcome. Thanks for commenting.

    • @PaulLittlefield
      @PaulLittlefield 6 месяцев назад

      @@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."

  • @nonamesi
    @nonamesi 11 месяцев назад +4

    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  11 месяцев назад

      Yes, that's a good idea. I should add that.

  • @stokley121
    @stokley121 2 месяца назад +1

    Thanks a lot for this video! Worked well. I used '8' for the Mongo tag since 4 seemed a bit outdated at this point. I had no idea my controller was so out of date, ultimately ended up here because I couldn't adopt the new 2.5G Flex Mini!

    • @Jims-Garage
      @Jims-Garage  2 месяца назад

      @@stokley121 ace, glad it still works well.

  • @rille47
    @rille47 4 месяца назад +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  4 месяца назад +1

      Glad it helped, thanks for dropping a comment

  • @fooch217
    @fooch217 11 месяцев назад +2

    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  11 месяцев назад

      Glad it was useful, thanks for the feedback.

  • @JensAndersson
    @JensAndersson 11 месяцев назад +1

    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.

  • @georgebobolas6363
    @georgebobolas6363 11 месяцев назад +1

    Great content as always, and even better timing, to migrate our old containers!

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад

      Thanks for the feedback

  • @euf0ria
    @euf0ria 6 месяцев назад +1

    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.

  • @markandrow4010
    @markandrow4010 11 месяцев назад +3

    Thank you James, greate again fully detailed tutorial, specially Docker configed with Traefik. 👌 👍

  • @alexander.santiago
    @alexander.santiago 10 месяцев назад +1

    This tutorial was wonderful…moved my instance off my rpi onto a unbuntu server running docker nice and easy! Thanks

  • @Vaillant44
    @Vaillant44 11 месяцев назад +3

    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  11 месяцев назад

      No worries, you're welcome

  • @jdmcivicrrr
    @jdmcivicrrr 11 месяцев назад +1

    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  11 месяцев назад

      Awesome, welcome to the hobby!

  • @93danne93
    @93danne93 Месяц назад +1

    Great video, thanks!

  • @joseossa3117
    @joseossa3117 11 месяцев назад +1

    Just what I was looking for! thanks

  • @greensheen8759
    @greensheen8759 Месяц назад +1

    LIFESAVER! Btw for old server peeps like myself, use Mongo version 4.4

    • @Jims-Garage
      @Jims-Garage  Месяц назад

      @@greensheen8759 you're welcome 😁

  • @jig1056
    @jig1056 8 месяцев назад +1

    This was so helpful, thanks a lot.

  • @bradt5426
    @bradt5426 6 месяцев назад +1

    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  6 месяцев назад

      Interesting, I'm running this on Kubernetes without issue. I had problems with overlay networks on KVM images.

  • @jerescha
    @jerescha 5 месяцев назад +1

    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  5 месяцев назад

      @@jerescha thanks 👍

  • @Ian-S.
    @Ian-S. 5 месяцев назад +1

    I love how EVERY transition is a twirl. You deserve your creative license there - because the quality is A+++. lol

    • @Ian-S.
      @Ian-S. 5 месяцев назад +1

      Whups - there are some flip transitions too.

  • @basdfgwe
    @basdfgwe 11 месяцев назад +1

    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  11 месяцев назад

      Great, it's a cool device, I just wish it had HA.

  • @alextran93
    @alextran93 11 месяцев назад +1

    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  11 месяцев назад

      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.

  • @shawn2296
    @shawn2296 11 месяцев назад +1

    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  11 месяцев назад +1

      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.

  • @poolace
    @poolace 10 месяцев назад +1

    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  10 месяцев назад

      Good spot. Possibly a caching issue

  • @rrr92462
    @rrr92462 10 месяцев назад +1

    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  10 месяцев назад

      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 10 месяцев назад +1

      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  10 месяцев назад

      @@rrr92462 Sally's yer Aunt. I believe you can also use a DNS hostname in case you ever alter the IP in the future.

  • @RajaSekar-ez2ul
    @RajaSekar-ez2ul 10 месяцев назад

    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

  • @Excited-IT-Architect
    @Excited-IT-Architect 11 месяцев назад +1

    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  11 месяцев назад

      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.

  • @synthpopper5555
    @synthpopper5555 11 месяцев назад +1

    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  11 месяцев назад

      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.

  • @JoshRogers117
    @JoshRogers117 10 месяцев назад +1

    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  10 месяцев назад

      Interesting, are there any errors in the logs? Is the database connection OK? I assume it's a local account in UI?

  • @TheBigMonsterLP
    @TheBigMonsterLP 5 месяцев назад

    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)

  • @khanhthedag7269
    @khanhthedag7269 2 месяца назад +1

    Hi Jims,
    I have a quetion, about update unifi controller application. how can i do this?

    • @Jims-Garage
      @Jims-Garage  2 месяца назад

      Shutdown the container, do a docker pull to the image you want, and restart it.

    • @khanhthedag7269
      @khanhthedag7269 Месяц назад

      @@Jims-Garage You mean, I have to change on docker-compose.yml (instead of latest, I put a new version like 8.5.6) ?
      stop the container, than docker compose up -d
      or how can I do it right, for update / upgrade ?

  • @JGNiDK
    @JGNiDK 11 месяцев назад +1

    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  11 месяцев назад +1

      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 11 месяцев назад

      @@Jims-Garage thanks

    • @try-that
      @try-that 11 месяцев назад +1

      @@Jims-Garage I'd like to see some Nginx related video's if possible.

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад +1

      @@try-that sure, I can do that

  • @khanhthedag7269
    @khanhthedag7269 10 месяцев назад +1

    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  10 месяцев назад

      You likely need to inform the devices to use the docker IP

    • @khanhthedag7269
      @khanhthedag7269 10 месяцев назад

      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

  • @todesspirale7039
    @todesspirale7039 7 месяцев назад

    Can't seem to get this working as non-root, any suggestions?

  • @SE-161
    @SE-161 11 месяцев назад +1

    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  11 месяцев назад +2

      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 11 месяцев назад +2

      @@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  11 месяцев назад +1

      @@SE-161 that's great to hear, I appreciate your feedback

  • @AndreasErikssonNet
    @AndreasErikssonNet 10 месяцев назад

    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 10 месяцев назад

      Well, thats unfortunate, MongoDB dosen't like writing to CIFS shares.

  • @JGNiDK
    @JGNiDK 10 месяцев назад +1

    Now what about updates?? How do you update through Docker??

    • @Jims-Garage
      @Jims-Garage  10 месяцев назад

      The same way you update any container. Bring it down, edit the compose, redeploy.

    • @JGNiDK
      @JGNiDK 10 месяцев назад

      @@Jims-Garage what should be edited in compose?

  • @robertkosulic4122
    @robertkosulic4122 11 месяцев назад +3

    "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 10 месяцев назад +3

      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.

  • @arslo
    @arslo 10 месяцев назад

    Does any one also run into the problem that login is not possible after restoring?
    Seems to be a common issue…

  • @khanhthedag7269
    @khanhthedag7269 10 месяцев назад +1

    @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  10 месяцев назад

      Login to each device, and set the inform IP to the new controller. Should pick right back up.

    • @khanhthedag7269
      @khanhthedag7269 10 месяцев назад

      how can I do this? and where can I do, on terminal or on on unifi-contoller ui?@@Jims-Garage

  • @khanhthedag7269
    @khanhthedag7269 10 месяцев назад

    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  10 месяцев назад

      Try with https.

    • @khanhthedag7269
      @khanhthedag7269 10 месяцев назад

      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 10 месяцев назад

      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 10 месяцев назад

      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

  • @henrikolausson7714
    @henrikolausson7714 3 месяца назад +1

    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  3 месяца назад

      @@henrikolausson7714 it'll be something ARM specific. I think the pi 4 is arm v7 but I might be wrong

  • @applebottomjeans7145
    @applebottomjeans7145 11 месяцев назад +1

    without mongodb?

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад

      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.

  • @thespencerowen
    @thespencerowen 11 месяцев назад +3

    4 videos in a week? Jim you don’t need to go this hard. Calm down 😅

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад +1

      I have about 80 videos I want to do before I can rest (before they're outdated ha)

    • @thespencerowen
      @thespencerowen 11 месяцев назад +1

      @@Jims-GarageI love it. I’m learning a ton.

    • @Jims-Garage
      @Jims-Garage  11 месяцев назад +3

      @@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.

  • @bfourney
    @bfourney 3 месяца назад +1

    Understood like 1% of this. Doesn't look like I'm gonna be using docker, way too complicated

    • @Jims-Garage
      @Jims-Garage  3 месяца назад

      I do have Docker beginner videos earlier on. Containers are well worth learning if of interest to you.

    • @bfourney
      @bfourney 3 месяца назад +1

      @@Jims-Garage I’ll check it out, but I’ll probably just hire somebody to walk me through setup

  • @JPEaglesandKatz
    @JPEaglesandKatz 7 месяцев назад +1

    did you actually delete my post? sjeez

    • @Jims-Garage
      @Jims-Garage  7 месяцев назад

      Nope, I never delete posts. I'll check and approve (typically links get auto deleted)

    • @JPEaglesandKatz
      @JPEaglesandKatz 7 месяцев назад +1

      @@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  7 месяцев назад

      @@JPEaglesandKatz
      glad it worked, that's how I did mine :)

  • @djKenpLan09
    @djKenpLan09 9 месяцев назад +1

    Super helpful! Thank you so much for sharing!