Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] Linuxserver.io - Unifi-Controller

Featured Replies

9 hours ago, MonYvel said:

Thanks @bmartino1 & @wgstarks for this detailed info about the Mongo & new unifi container in unraid.

 

Unfortunately I'm not getting the init-mongo.js file to work. Every time I try to deploy mongo with the settings you provided above, it will just create some test database. Not the unifi one.

 

Could you elaborate a bit more about this: "*Unraid by default will go to folders you will need to go to where your init-mongo.js file you make is and type in the path to do a docker 1 for 1 file replacement and run."

 

What do you mean exactly? I know that default a init-mongo.js folder is created, do I just remove this folder & replace it with the .js file? Or do i need do do something else?

 

I think it is in this step that something is going wrong for me...

 

Thanks again!

 

 

Hi Yes when I said by default, you will have to know the path location. Clicking in the web gui will go to the folder. But you must maintain file name and path.

 

The container path must be: /docker-entrypoint-initdb.d/init-mongo.js

 

and the 1 for 1 file path must be

/mnt/user/appdata/unifi-controler/mongodb/init-mongo.js

 

^ Except it's where your init-mongo.js file is located.

 

But default unraid if i click the prompts will only do folders.

So I would get /mnt/user/appdata/unifi-controler/mongodb/

 

image.png.87274e1ab4d8087e665ad7ec8bb87f0d.png

 

When I need to specify the file name. to complete the 1 for 1 file passing

Edited by bmartino1

  • Replies 1.5k
  • Views 402.1k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • This is a summary of the steps I took to migrate to LSIO's unifi-network-application docker now available in CA. The only guarantee here is that this worked for me so USE IT AT YOUR OWN RISK. If you d

  • This is a must: Please make a copy of you backup and firmware folder in the old docker container. Please go to the gear system > setting > backup and download current backup of your system.

  • PeteAsking
    PeteAsking

    UniFi Network Application 7.3.83 has received multiple patches over the last 3 months and should be considered the "best" latest version for anyone who does not require a legacy version such as 5.14.2

Posted Images

I recommend using the steps in the github from the package maintainer.


See Application Setup:
https://github.com/linuxserver/docker-unifi-network-application
 

This container requires an external mongodb database instance.


Setting Up Your External Database

Formally only mongodb 3.6 through 4.4 are supported, however, it has been reported that newer versions will work. If you choose to use a newer version be aware that you will not be operating a supported configuration.
 

Make sure you pin your database image version and do not use latest, as mongodb does not support automatic upgrades between major versions.


If you are using the official mongodb container, you can create your user using an init-mongo.js file with the following contents:

 

db.getSiblingDB("MONGO_DBNAME").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME"}]});
db.getSiblingDB("MONGO_DBNAME_stat").createUser({user: "MONGO_USER", pwd: "MONGO_PASS", roles: [{role: "dbOwner", db: "MONGO_DBNAME_stat"}]});

 

Being sure to replace the placeholders with the same values you supplied to the Unifi container, and mount it into your mongodb container.

 

The default template for unifi-network-application

Mongo_User > unifi

Mongo DB > unifi

MONGO_PASS > empty

MONGO_HOST > unifi-db

 

You will need to match the Mongo_User, Mongo_Pass, and Mongo DB form your init-mongo.js
You must fill in the template to have it work.

If following my with host being the network
https://forums.unraid.net/topic/78060-support-linuxserverio-unifi-controller/?do=findComment&comment=1326226
 


the Mongo Host becomes unraids DNS name / Ip Address

following the template, this should be your init-mongo.js file:

db.getSiblingDB("unifi").createUser({user: "unifi", pwd: "MONGO_PASS-setme", roles: [{role: "dbOwner", db: "unifi"}]});
db.getSiblingDB("unifi_stat").createUser({user: "unifi", pwd: "MONGO_PASS-setme", roles: [{role: "dbOwner", db: "unifi_stat"}]});

 

Under the unifi template, you would need to change

MONGO_PASS > MONGO_PASS-setme

MONGO_HOST > unraid ip/hostname

Edited by bmartino1

@wgstarks & @bmartino1,

Thanks for your detailed answers!

So, if I understand correctly: First create the mongo-init.js file in a location of my choosing and fil it whit the correct content as stated in the github page, After this deploy the MongoDB container with the correct path configured & manually adding the file name to the host path parameter?

 

I do not need to set certain access rights? The defaults from Unraid are sufficient?

 

I will try a new deploy on Friday when I have some time, will report back with my findings.

Edited by MonYvel

4 hours ago, MonYvel said:

So, if I understand correctly: First create the mongo-init.js file in a location of my choosing and fil it whit the correct content as stated in the github page, After this deploy the MongoDB container with the correct path configured & manually adding the file name to the host path parameter?

Add the full path. I posted a screenshot of mine just a couple of posts back.

 

4 hours ago, MonYvel said:

I do not need to set certain access rights? The defaults from Unraid are sufficient?

Correct

 

Be sure to read the documentation in the GitHub page.

Thanks for your help guys!

 

Creating the path & mongo-init.js file first & then deploying the MongoDB container with added path did the trick!

 

The new Unifi controller is up and running here now. (Restoring from backup was also no issue)

 

Now I hope that having a separate MongoDB container does not complicate things to much & breaks every time an update is installed...

Good to see you guys are managing to update to 2 containers without too many issues. At some point the community needs to decide which direction they want to go so we dont have to maintain 2 different options for the same thing essentially.

3 hours ago, PeteAsking said:

At some point the community needs to decide

Do they?

 

IMHO more is better, up to a point anyway. I’m not sure having dozens of containers would be better but I think having two or three allows for some redundancy and less dependency on a single maintainer.

 

Just a thought.😁

I feel like it would be better for everyone to have a consistent way to do things rather than a mishmash of different options but thats just me. 

Still on 7.2.95 but just checking in after a little over year to see what's up.  On first read here's is my two cents opinion:

 

1. One container solution is simpler and less moving parts to break.  The unknown is an unestablished container developer?

 

2. Two containers solution sounds like it would be a nightmare for casual users (like me) to keep updated since there are now twice or more moving parts to worry about.  However, the containers are maintained by established developers.

 

Operating under the KISS mantra, I would prefer a one container solution.  Let's put it this way, if I was brand new to Unifi and looking for a way to run it on unRAID as a docker container, I would most likely opt for the one container vs the two containers solution.

Edited by mifronte

I have been using unRAID for over five years and I don't mind getting my hands dirty but when I look at bmartino1's post here it looks as gross AF!  Maybe it is not as bad as it looks, but it is going to scare a lot of people away.

14 hours ago, mifronte said:

Let's put it this way, if I was brand new to Unifi and looking for a way to run it on unRAID as a docker container, I would most likely opt for the one container vs the two containers solution.

I have been running Unraid for 12 years and a Unifi network for six years.  I have used the LSIO versions of the Unifi Network Controller containers since I started with Unifi.  When it was announced the LSIO container would be split into two containers, I thought I'd give the single container solution from @PeteAsking a try.  It installed without a hitch and I am now running it with version 8.0.7 of the controller.  PeteAsking has been very active in this particular forum and knows his stuff when it comes to the Unifi infrastructure; however, I do understand the angst of a single maintainer vs. the resources of LSIO behind their solution.

 

Personally, I plan to stick with the "controller-reborn" version.  As a backup, I will likely transition my currently inactive LSIO controller container to their new dual-container version but I personally prefer what PeteAsking has done.

Edited by Hoopster

49 minutes ago, bmartino1 said:

I entered this form due to no documentation and having to dig through this forum and 3 other websites and then be mini dev with others to help jumpstart. And reinforcing to inform from multiple sources.

Personally, I thank you for that.  I will be using your documentation to migrate my current LSIO Unifi container to their new dual-container solution.  It will only be a backup to Unifi-Controller-Reborn for me, but at least you made some sense of it when all that existed before was a bit convoluted and seemed to be missing some important information.

 

Anyone choosing to stick with the LSIO solution should be very grateful for you efforts.

4 hours ago, wayner said:

I have been using unRAID for over five years and I don't mind getting my hands dirty but when I look at bmartino1's post here it looks as gross AF!  Maybe it is not as bad as it looks, but it is going to scare a lot of people away.

I did another one a little earlier in this thread that may be more to your liking but honestly, I don’t think LSIO really cares much about unRAID users anymore (JUST MY GUESS) and I recommend switching to unifi-controller-reborn. IMHO it’s much easier to install and setup.

3 hours ago, bmartino1 said:

Yeah, but I'm just regurgitating the information and at least proved some documentation

I didn't mean any offense, and I appreciate your help.  But it just looks a bit painful compared to today where pretty much all you need to do is click on the docker that you want to install.

53 minutes ago, wgstarks said:

I did another one a little earlier in this thread that may be more to your liking but honestly, I don’t think LSIO really cares much about unRAID users anymore (JUST MY GUESS) and I recommend switching to unifi-controller-reborn. IMHO it’s much easier to install and setup.

What is LSIO? I have never heard of them, other than for building unRAID dockers and I had no idea that they did anything other than build dockers for unRAID.

2 minutes ago, wayner said:

What is LSIO? I have never heard of them, other than for building unRAID dockers and I had no idea that they did anything other than build dockers for unRAID.

LSIO is linuxserver.io. They have built many docker containers and at one time they customized them for unRAID and recommended running them on unRAID. That seems to no longer be the case. While some of the LSIO members are still shown as unRAID forum members I don’t believe any are still active here and obviously they are no longer customizing their containers for unRAID.

Short quote from the linuxserver.io landing page- 

Quote

We are a group of like-minded enthusiasts from across the world who build and maintain the largest collection of Docker images on the web, and at our core are the principles behind Free and Open Source Software. Our primary goal is to provide easy-to-use and streamlined Docker images with clear and concise documentation.

 

What's the difference in building unRAID docker images vs images for other platforms?  And what other platforms use dockers?  Plain vanilla Linux OSes like Ubuntu?  I know that you can now use Docker under Windows, but that seems to have a bunch of limitations.

4 minutes ago, wayner said:

What's the difference in building unRAID docker images vs images for other platforms?  And what other platforms use dockers?  Plain vanilla Linux OSes like Ubuntu?  I know that you can now use Docker under Windows, but that seems to have a bunch of limitations.

I’m really not the best person to answer this so my answer may not be completely correct but AFAIK pretty much any container can be manipulated to work on unRAID. How the containers are built (permissions required, network types, etc) can make it easier or harder to use the container with unRAID. I suspect that most dockers can be run on most Linux builds but I’m not a Linux user so that’s just a guess on my part. I know that docker is also supported on the most recent versions of macOS. I run all of my docker containers on unRAID though (with the help of many other unRAID users).

On 12/10/2023 at 6:51 PM, wayner said:

What's the difference in building unRAID docker images vs images for other platforms?  And what other platforms use dockers?  Plain vanilla Linux OSes like Ubuntu?  I know that you can now use Docker under Windows, but that seems to have a bunch of limitations.

Most of the differences revolve around permissions since unraid is dissimilar to other linux OS’s in that root is still used and to avoid running a docker as root the ‘nobody’ group is used. Many dockers that are created dont take this into account requiring the ‘unraid specific’ changes that makes them suitable for unraid to run. There are a few less interesting differences but this one causes the most issues as unraid cant write files to the locations the docker is being run from which causes many problems. 
 

in terms of ‘the best solution’ I do agree LSIO have a proven track record and that is a very desirable benefit. Very little anyone can do about it. If you need their track record as part of your solution then the 2 docker method is the only path forward. It does function and over time it could become easier to setup. 
 

On the other hand the single solution does provide a simpler setup which is what many unraid users use unraid for. Otherwise why not just install a vm and manage your dockers under a debian vm without the need for unraid. Unraids entire benefit is the click and install and low maintenance approach. So for this benefit the single docker does meet the general requirement of ease of use and ease of management and so on. 
 

Obviously a track record can only be built up over time and since it currently doesnt exist the only thing to do check over time how reliable/well maintained it is. There are just 2 of us involved. Af for the LSIO docker images I have no way of knowing how many people are actually working on it. Depends on how many resources that company is prepared to spend I guess. So kind of thats the situation best I can describe. 

I've been putting off the switch to the new Docker, but was wondering: is it worth moving to v8 before I make the switch, or after? Or is it still too early to trust Ubiquiti with a new major version, and I should just stick with v7 for a while longer, anyway?

Thanks for your insight!

Always stick with a lower version if you dont know why to upgrade. New features are only beneficial if you actually need to use them. The v7 recommended is working well. 

I need to upload config.gateway.json to the controller. This needs to be placed in: <unifi_base>/data/sites/site_ID, according to https://help.ui.com/hc/en-us/articles/215458888-UniFi-USG-Advanced-Configuration

 

This means I would upload the json file to user/appdata/unifi-controller/data/sites/default/

However, there is no /sites/default/ path. Do I just make the sites/default folders myself within user/appdata/unifi-controller/data/?

21 minutes ago, Wieuwzak said:

However, there is no /sites/default/ path.

This should already exist. At least it does on mine.

IMG_2615.thumb.png.beb82969692778c7710fa8cc1e854c60.png

14 hours ago, wgstarks said:

This should already exist. At least it does on mine.

lockquote widget

Screenshot_20231214_082243_Chrome~2.jpg

 

That is weird. I have no such path. Also, notice that I have appdata/unifi-controller instead of your appdata/unifi

 

Edit: Solved! The folders do show up when you upload an image for a floor plan (in the topology section). You have to enable legacy UI for this. I could have created the folders myself but I didn't want the hassle of setting the right folder permissions.

Edited by Wieuwzak

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.