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

There is now an ALPHA community app that you can test if you would like to.

 

Instructions -

1) Login to current linuxserver.io unifi controller and take a backup (7 day backup seems reasonable?).

2) Turn off current linuxserver.io unifi controller and disable autostart.

3) Download and install new community app "unifi-controller-reborn" and enable autostart if desired.

4) Restore settings from backup file after logging into the app, once it stops the controller you will need to start it again.

 

Current issues:

If you change any settings whatsoever on the docker container all settings are lost and you have to restore again from backup. Im working on it.

 

You have your backup file and the old container is untouched so presumably between those 2 options you can go back if need be.

 

Many thanks :)

 

P

Edited by PeteAsking

  • Replies 1.5k
  • Views 402.7k
  • 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

35 minutes ago, PeteAsking said:

There is now an ALPHA community app that you can test if you would like to.

Are you going to start a new support thread for this?

5 hours ago, wgstarks said:

Are you going to start a new support thread for this?

Yes when its working to my standard of quality. 
 

Also if this is the direction people want to go. If everyone votes to go with 2 containers then that would be the direction instead. Have to please the community. 

Edited by PeteAsking

So made some progress but still stuck on this last part because I dont understand unraids docker enough.

 

Basically you can deploy the community app "unifi-controller-reborn" now and when you deploy it it will deploy but not start.

To fix it you have to stop the container after, then ssh and go to /mnt/user/appdata/ and do a chmod 777 unifi-controller-reborn/.

Now it can write to the directory and everything works and saves correctly and it works like a normal container.

 

What I can work out is how to get unraid to initially set the permissions on the folder when creating the docker image so this part Im stuck on now.

 

- P

59 minutes ago, PeteAsking said:

What I can work out is how to get unraid to initially set the permissions on the folder when creating the docker image so this part Im stuck on now.

Are you using PUID=99 PGID=100? I’m no docker guru but I thought that’s what these variables were for.

2 minutes ago, wgstarks said:

Are you using PUID=99 PGID=100? I’m no docker guru but I thought that’s what these variables were for.

Yes but I think that only works if the docker maintainer has actually coded to accept those variables which is not the case for this image and it tries to use 1000:1000 and is hard coded into the image.

I think you might have just helped me figure it out. I will go change something.

 

You were totally wrong but I like the way you think.

Edited by PeteAsking

20 minutes ago, PeteAsking said:

You were totally wrong

😂😂😂

Ok so for now I can see the issue but not figure out how best to resolve it. There are several ways but none are automatic. The easiest ways I found to change to this image are like this:

 

1) Take backup 7 days on current controller.

2) Stop old unraid controller and turn off autostart.

3) Go to apps and install new controller (unraid-controller-reborn)

4) Once it is installed, stop the container (it cant write files to the directory unraid creates so does not work)

5) Either ssh into the box and use chmod like "chmod 777 /mnt/user/appdata/unifi-controller-reborn" OR if you dont like that go to Tools - New Permissions then choose "shares" and "appdata" and let unraid fix the permissions (unclear why this is not done by unraid when creating a new appdata directory, also unclear if this tools-new permissions thing is safe/supported?).

6) Start container and set to autostart. Now it can write files and functions normally and you can change/update it etc as required.

 

Thoughts on this? Kind of unsure why unraid behaves like it does. Not really an expert obviously on unraid and its docker implementation :/

 

-P

 

Edit: also just waiting for unraid to update my xml settings so I have to wait for that to complete before anyone can test it.

 

Edit2: Wow so apparently unraid has a web terminal so you can just open the web terminal and copy and paste the following 1 line at a time before installing the app:

mkdir /mnt/user/appdata/unifi-controller-reborn

chmod 777 /mnt/user/appdata/unifi-controller-reborn

chown nobody /mnt/user/appdata/unifi-controller-reborn

chgrp users /mnt/user/appdata/unifi-controller-reborn

 

Instead of these 4 commands you can also try:

install -d -m 777 -o 99 -g 100 /mnt/user/appdata/unifi-controller-reborn

 

That also seems to work. Unsure how to make that happen automatically at this time.

Edited by PeteAsking

Ok will take a look, also the container has updated with unraids repository so can be tested, albeit with the instructions to fix the directory.

1 minute ago, PeteAsking said:

Ok will take a look, also the container has updated with unraids repository so can be tested, albeit with the instructions to fix the directory.

I’ll set it up this weekend and do a little testing.

I have updated the docker to post a popup message for now when installing instructing users what to do on first install.

 

As far as I can tell, so long as you follow the initial setup instructions everything works fine after that.

So summary:

 

1) Take backup 7 days on current controller.

2) Stop old unraid controller and turn off autostart.

3) Set directory permissions (can be done after deploying image if preferred, see notes).

4) Go to apps and install new controller (unraid-controller-reborn)

5) Start container and set to autostart. Ensure it can write files and functions normally and you can change/update it etc as required. Restore backup, will require you to manually start it again after backup is restored.

 

It seems pretty basic, just dont have an immediate fix for the "fix directory permissions" issue at this moment. It is a one time thing, however, not needed ever again.

 

Edited by PeteAsking

Im going to make a support thread for this new docker container option, then on this thread everyone can discuss the direction you think works best for the community without worrying about what I think. Will edit this comment when the support thread has been moved by a mod and post the link. Hopefully some people provide their opinion so its not like 3 people making a decision for 100s of people.

 

edit: 

 

Edited by PeteAsking

1 hour ago, PeteAsking said:

Im going to make a support thread for this new docker container option, then on this thread everyone can discuss the direction you think works best for the community without worrying about what I think. Will edit this comment when the support thread has been moved by a mod and post the link. Hopefully some people provide their opinion so its not like 3 people making a decision for 100s of people.

I think that’s the best plan.

 

My guess is most people that use this docker don’t have any knowledge of what’s happening with it because they don’t follow this thread. Once it’s deprecated in CA I’ll bet there will be a lot of surprised people posting. Hopefully by that time there will be several options.

5 hours ago, wgstarks said:

Once it’s deprecated in CA I’ll bet there will be a lot of surprised people posting. Hopefully by that time there will be several options.

Everyone that has it installed and FCP will start getting the notifications about the pending deprecations

On 10/28/2023 at 7:29 AM, wgstarks said:

 

  1. Open a terminal window and create a custom docker network with the following command- 

    docker network create <network name>

    Replace <network name> with the name you would like to use. I used unifi for simplicity. You will need to use this network for MongoDB and unifi-network-application so that they can communicate with each other.

 

I didn't have to create a custom unifi bridge network to have unifi container see the database container, just use the IP address of the unraid server instead of a host name, much easier.

 

MONGO_HOST: <ip-address>

 

 

7 hours ago, bmartino1 said:

Except the new docker doesn't set up mongo nor work... when will that be fixed?

You are correct that it doesn’t setup MongoDB but it does work. Instructions are here. If you read through the last two or three pages you will see that there are also other options under development.

 

You guys have to read the last few pages @bmartino1 and @kiwijunglist or you will miss what is happening. 
 

You currently have 2 options - go with linuxserver.io and 2 docker images running that communicate with each other as per @wgstarks work or a single new docker option that is the same as /similar to this current linuxserver option that I am working on. The entire hope and point of this exercise is that the community hopefully selects the most reliable/best option and eventually this is used going forward. That can only happen if you make an informed decision and post back your experience and preference after reviewing the options. Hope this makes sense. @wgstarks has been super helpful with everything so far. 

 

Can you post issues on the other thread @bmartino1? Start also by showing me an ls -l on the appdata folder so I can verify permissions are correct. 
 

Probably you also need to backup and restore like versions. As in dont try to backup on the old controller a very okd version then restore to the new docker container running a much later configuration that same backup. Forst bring the current docker into compliance and then do a backup/restore. 
 

This is the thread here:

 

Edited by PeteAsking

Thank you

 

Was mainly looking for this and the reason why:

https://info.linuxserver.io/issues/2023-09-06-unifi-controller/

 

LinuxServer.io

Unifi Controller Deprecation Notice

September 6, 2023 at 9:00 PM

Deprecations unifi-controller unifi-network-application

Due to the way in which Ubiquiti package and distribute their software, our Unifi Controller container has reached a point where we cannot upgrade to newer supported packages without making breaking changes to the image.

As a result, we have decided to deprecate our Unifi Controller container and replace it with a new Unifi Network Application container. This new container uses our current base images and a separate mongodb instance, which makes it substantially easier for us to maintain going forward.

We will continue to support our Unifi Controller image until 2024-01-01, at which point you will need to have migrated to the Unifi Network Application container to continue to receive support.

The new container is not a drop-in replacement and it is crucial that you read the entire Application Setup section of the readme before attempting to migrate an existing install

Those of you who have been using our mongoless tag for the Unifi Controller container can switch directly to the Unifi Network Application container without needing to perform any migration steps.

Last updated: September 5, 2023 at 7:21 PM

 

there is always the VM option:

https://ui.com/download/releases/network-server

 

My next test will be with a mogoless setup:

Repository: lscr.io/linuxserver/unifi-controller:mongoless

1 hour ago, bmartino1 said:

Thank you

 

Was mainly looking for this and the reason why:

https://info.linuxserver.io/issues/2023-09-06-unifi-controller/

 

LinuxServer.io

Unifi Controller Deprecation Notice

September 6, 2023 at 9:00 PM

Deprecations unifi-controller unifi-network-application

Due to the way in which Ubiquiti package and distribute their software, our Unifi Controller container has reached a point where we cannot upgrade to newer supported packages without making breaking changes to the image.

As a result, we have decided to deprecate our Unifi Controller container and replace it with a new Unifi Network Application container. This new container uses our current base images and a separate mongodb instance, which makes it substantially easier for us to maintain going forward.

We will continue to support our Unifi Controller image until 2024-01-01, at which point you will need to have migrated to the Unifi Network Application container to continue to receive support.

The new container is not a drop-in replacement and it is crucial that you read the entire Application Setup section of the readme before attempting to migrate an existing install

Those of you who have been using our mongoless tag for the Unifi Controller container can switch directly to the Unifi Network Application container without needing to perform any migration steps.

Last updated: September 5, 2023 at 7:21 PM

 

there is always the VM option:

https://ui.com/download/releases/network-server

 

My next test will be with a mogoless setup:

Repository: lscr.io/linuxserver/unifi-controller:mongoless

 

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.

 

This is the new required to use the next gen package maintainers version per the announcement. If you rather stick to one docker please use PeteAsking version found here: 

Thank you PereAsking!

 

Now then, Here is Some documentation on what users can do to stay in a package maintainers and receive continued updates and support.

 

 

Unifi Docker Application Setup:

 

Following the LinuxServer.IO group and to keep with package maintainer:

Following there GitHub for setup…

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

 

 

Lets start by Setting Up Your External Database Unraid Community App page: Mongo DB

image.thumb.png.a88aa81765da410416428b7bc60c999e.png

Maintainer Notes This is meant for mongodb 3.6 through 4.4 that are supported… but docker template works for Official mongo db image: https://hub.docker.com/layers/library/mongo/7.0-rc/images/sha256-5227c4e82658359049d86d9b87039b989e2b4e42908d93fcb6f042b8846a4cdb?context=explore 

 

Docker Hub Repository: mongo:7.0-rc

The new Unifi Docker Application requires mongodb version 6 or higher…. YOU MUST SET A MONGO TAG! Don’t use latest! Mongdb doesn’t support in place upgrades between dockers and this will break you setup!

 

 

We will also be making a  init-mongo.js file for this docker to make our database, user, and access.

THANK YOU wgstarks for you assistance on this:

 

So a template change edit would look something like this:

Install Official Mongo DB and at the template make the necessary changes:

*Advance toggle at the top to view and make changes

We will be adding a path, changing the network type and setting a mongo DB tag

Change the following:

 image.png.6000f04e472e2a256278496b78f78f2d.png

 

image.png.391c80843c45d0b5047525906f2378f2.png

 

image.png.c008fe6fea4a89b8447776dd57fc344e.png

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

The init-mongo.js via GitHub Docker Maintainer should look something like this

 

example init-mongo.js per github

db.getSiblingDB("unifidb").createUser({user: "unifi", pwd: "Change_ME_password", roles: [{role: "dbOwner", db: "unifidb"}]});
db.getSiblingDB("unifidb_stat").createUser({user: "unifi", pwd: " Change_ME_password ", roles: [{role: "dbOwner", db: "unifidb_stat"}]});

 

With these edits you now have a working mongo 7 DB with a known database, user an password. Using the Host network now means that the ip address of you unraid or hostname of you unraid will now reach the MongDB.

Example of a docker run:

 

docker run
  -d
  --name='MongoDB'
  --net='host'
  -e TZ="America/Chicago"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="BMM-Unraid"
  -e HOST_CONTAINERNAME="MongoDB"
  -e 'TCP_PORT_27017'='27017'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/jason-bean/docker-templates/master/jasonbean-repo/mongo.sh-600x600.png'
  -v '/mnt/user/appdata/unifi-controler/mongodb/db-data/':'/data/db':'rw'
  -v '/mnt/user/appdata/unifi-controler/mongodb/init-mongo.js':'/docker-entrypoint-initdb.d/init-mongo.js':'ro' 'mongo:7.0-rc'

 

I Have made folders and changed where docker will save the docker appdata and file paths...

image.thumb.png.08076a3dcf9651cb769106c441fafeee.png



We are now ready to install the NEW Unifi Docker.
image.png.39c27925e4835566212bfb3b9972d505.png

 

Now lets make some small changes.

 

I run  an advance static network as such I like to have hostnames and mac address via custom Br0 to maintain ip firewall and known traffic. This will still work in bridge mode:

example of my working docker run:

docker run
  -d
  --name='unifi-network-application'
  --net='br0'
  --ip='192.168.1.4'
  -e TZ="America/Chicago"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="BMM-Unraid"
  -e HOST_CONTAINERNAME="unifi-network-application"
  -e 'TCP_PORT_8443'='8443'
  -e 'UDP_PORT_3478'='3478'
  -e 'UDP_PORT_10001'='10001'
  -e 'TCP_PORT_8080'='8080'
  -e 'UDP_PORT_1900'='1900'
  -e 'TCP_PORT_8843'='8843'
  -e 'TCP_PORT_8880'='8880'
  -e 'TCP_PORT_6789'='6789'
  -e 'UDP_PORT_5514'='5514'
  -e 'MONGO_USER'='unifi'
  -e 'MONGO_PASS'='change+me_password!'
  -e 'MONGO_HOST'='Unradihosname/IP addrerss'
  -e 'MONGO_PORT'='27017'
  -e 'MONGO_DBNAME'='unifidb'
  -e 'MEM_LIMIT'='4096'
  -e 'MEM_STARTUP'='1024'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='https://[IP]:[PORT:8443]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/unifi-network-application-icon.png'
  -v '/mnt/user/appdata/unifi-controler/unifi_config/':'/config':'rw'
  --mac-address 02:42:C0:A8:01:5B
  --hostname UNIFI-DOCKER 'lscr.io/linuxserver/unifi-network-application'

 

lets make some tempalte edits:

add https://[IP]:[PORT:8443] so we can use the webui to open the container

image.png.cb868e1ae19a99a5a1d8dce1eb43c1ac.png

 

image.thumb.png.091a9443a3bdf915bdeee1a89380fe4a.png

 

add the username you used in the init-mongo.js

atm the above database name is unifidb, user unifi, password Change_Me_password

and the host is the ip/hostname of unraid...

 

fill in the necessary option in their correct places in the template.

as they are optional, remove the bottom 2 options about the auth method and tls option.

I have also increased the mem limit to 4 GB of ram

 

this will now connect to the mongo db 7 on the unraid IP. and give you a https web connect to the controller.

at setup click restore at bottom left and restore from the file you backed up at the very beginning.

 

You will need to stop the unifi docker after the restore to move the backup folder and firmware folder to keep old backups and old device firmware.

 

I Hope this helps other and users alike in moving and maintain their current configurations. I recommend moving sooner than later to keep back and restore files on the current unifi application version. as of writing that is: v7.5.187

 

 

image.png

  • 4 weeks later...

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!

 

3 hours ago, MonYvel said:

I know that default a init-mongo.js folder is created,

This isn’t true. Or at least it wasn’t for me. I manually created the folder and the file and the added the path to the file in the container configuration.


In my case this was-

IMG_2608.thumb.png.f81cb6844e7bb8aa6958fff0c3026c3f.png

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.