Reply
New Member
Posts: 3
Registered: ‎11-29-2017

Installing UniFi Controller on Linux with external Mongo

Hello all,

 

I am hoping the community might be able to point me in the right direction on a few things I am working on.  I am attempting to setup a new UniFi Controller on Linux with an external Mongo DB.  I have a few questions/issues.

 

Maybe I am crazy, but I don't see any installation documentation for installing the controller on Linux.  The user guis simply says to see the blog, and the blog simply has releases with release notes, but no installation or configuration documentation.  This leads me to believe there is none, and that the procedure is simply install the deb package on Ubuntu/Debian, and install the dependancies it complains about when trying to install (e.g. mongo, OpenJDK, etc.).  This is kind of lame since I am hoping to avoid having mongo on this server, and I'd prefer to use Oracle's JDK over the OpenJDK.

 

So is there any documentation on the Linux install, and is it possible to do this without a deb so I can tell it to use my existing Oracle JDK and not to worry about Mongo not being there?

 

I have seen posts where people are using external Mongo clusters, and I saw the system properties options to enable that, but am I to assume that the only way I can make this work is by installing the deb the way it wants to, and reconfiguring for external DB after?  Also, would this require an export of the locally created Mongo DB to the external cluster, or would it populate an empty DB on a cluster when I configure it to use the external Mongo?

 

Any help is greatly appreciated.

 

Thanks!

Veteran Member
Posts: 4,839
Registered: ‎06-13-2015
Kudos: 1313
Solutions: 229

Re: Installing UniFi Controller on Linux with external Mongo

@psynor-solvit Correct, install vanilla controller with local MongoDB first, then follow the instructions found in the solution here:

https://community.ubnt.com/t5/UniFi-Wireless/External-MongoDB-Server/td-p/1305297

Art of WiFi
Check out our UniFi API browser tool on GitHub. The PHP API client which it uses, can be found here on GitHub.
The thread on our UniFi Device Search tool can be found here, also check out our Captive Portal solutions for UniFi.
New Member
Posts: 3
Registered: ‎11-29-2017

Re: Installing UniFi Controller on Linux with external Mongo

[ Edited ]

@slooffmaster

 

Thanks.  Do I need to export the DB from the local installation to my cluster, or will it populate an empty DB on the cluster when I point it at the cluster?

Veteran Member
Posts: 4,839
Registered: ‎06-13-2015
Kudos: 1313
Solutions: 229

Re: Installing UniFi Controller on Linux with external Mongo


@psynor-solvit wrote:

@slooffmaster

 

Thanks.  Do I need to export the DB from the local installation to my cluster, or will it populate an empty DB on the cluster when I point it at the cluster?


You did read that thread from start to end...? Then you would have noticed that the data is NOT migrated automatically.

Art of WiFi
Check out our UniFi API browser tool on GitHub. The PHP API client which it uses, can be found here on GitHub.
The thread on our UniFi Device Search tool can be found here, also check out our Captive Portal solutions for UniFi.
New Member
Posts: 3
Registered: ‎11-29-2017

Re: Installing UniFi Controller on Linux with external Mongo

@slooffmaster

 

Thanks, however that was not the question, but maybe it wasn't clear in my post.  The question is whether the application will detect an empty database and populate the necessary schema, or if the application will try to connect to the cluster and fail due to the required schema not being present.

 

This is a new installation, so I dont have any data to migrate.  My question is whether I can simply install the controller with the local Mongo, shut it down, point it at my empty cluster, and start it up.  I am wondering if the application will create the schema on the cluster, or if I need to do that before pointing the application at it.

Highlighted
Veteran Member
Posts: 4,839
Registered: ‎06-13-2015
Kudos: 1313
Solutions: 229

Re: Installing UniFi Controller on Linux with external Mongo

Basically same answer I guess; dump and import. Just to be sure...

Art of WiFi
Check out our UniFi API browser tool on GitHub. The PHP API client which it uses, can be found here on GitHub.
The thread on our UniFi Device Search tool can be found here, also check out our Captive Portal solutions for UniFi.
Reply