UniFi Controller on DreamHost VPS

I recently purchased a UniFi UAP-PRO for my home wireless. I choose it because it is commercial grade hardware with good management software for a low price (comparatively). It then occurred to me that I could take advantage of my DreamHost VPS that I barely use to host the controller software so I don’t need to bother having it on any of my local computers. The EdgeRouter Lite makes it trivial to automatically point your access points to a place in the cloud with a given IP address, so the hardest part was going to be getting the software running on my VPS.

Once I got on a newer version of DreamHost’s VPS offering (I was on something running Debian 5 before I switched to one running Ubuntu 12.04), I had a bit of a rocky start. Some instructions I found online were outdated and had me install a very old version of the controller software. I was trying to import the settings I had done on my local controller so I didn’t have to set everything up again, and that import process wasn’t going to work out with that old controller software. I’ve got it working now, so I wanted to share the steps that worked for me so hopefully nobody else has to go through the pains I did.

Step One: Get a newer version of MongoDB

We’ll want to get a newer version than what is installed by default, so simply follow the instructions from MongoDB (version 2.4).

Step Two: Follow the release instructions to install the controller

As of this writing, 4.6.6 is the latest version. In the announcement thread for that version, search for “UniFi Controller APT howto”, and follow those instructions (skipping step two since we did that in step one from this blog post).

Step Three: Load our controller and import our config

I exported my local controller’s config (Settings -> Maintenance -> Download Backup Settings) before doing this next step. When we navigate to our server’s address (over https on port 8443), we’re given the option to import a config. Once we’ve imported it, the service will restart, and then we’ll be able to point our access points to our controller. Note: we can also create a completely new config.

Step Four: Set the Controller Hostname/IP

The last step is to open the Settings pane, clicking the Controller tab and entering the hostname or IP address of our controller.

sdwilsh Status Update: 2011-12-04

Done:

  • Reviewed bug 699051 - Track slow sql queries on main thread + send them in via telemetry
  • Reviewed bug 465299 - mozStorageStatementWrapper::Initialize should check statement state/validity
  • Reviewed bug 702815 - Maintain a list of open SQLite connections
  • Reviewed bug 703143 - Use a memory multi-reporter for SQLite's per-connection reporting
  • Reviewed bug 557047 - Replace mailnews specific ifdef (MOZ_MAIL_NEWS) in cookie code with tests for a protocol flag

sdwilsh Status Update: 2011-11-19

Done:

  • Reviewed bug 658303 - mozIStorageConnection::Clone() should copy over #pragmas
  • Reviewed bug 692487 - Decrease SQLITE_DEFAULT CACHE_SIZE
  • Reviewed bug 691662 - Update shipped Growl framework to 1.2.2 for compatibility with Growl 1.3
  • Reviewed bug 693667 - Track time from requesting an async query to completion via telemetry
  • Reviewed bug 699051 - Track slow sql queries on main thread + send them in via telemetry
  • Reviewed bug 465299 - mozStorageStatementWrapper::Initialize should check statement state/validity
  • Reviewed bug 701607 - Download annotations are not stored for files without a custom name
  • Reviewed bug 702815 - Maintain a list of open SQLite connections
  • Reviewed bug 703143 - Use a memory multi-reporter for SQLite's per-connection reporting

sdwilsh Status Update: 2011-11-06

Done:

  • Reviewed bug 682676 - urlbar performance regression with SQLite 3.7.7.1
  • Reviewed bug 678977 - Teach sqlite to use jemalloc directly when applicable
  • Reviewed bug 676064 - Lockup in mozStorage component/SQLite
  • Reviewed bug 674957 - mochitests-5: test_alerts.html | application timed out after 330 seconds with no output
  • Reviewed bug 663075 - FileUtils.jsm should have an easy way to create an nsILocalFile with a path
  • Reviewed bug 567585 - TB3 fails to raise an error when it tries to save an attachment to write-protected directory.
  • Reviewed bug 686025 - nsNavHistory::AsyncExecuteLegacyQueries uses synchronous createStatement call instead of async createAsyncStatement call, blocks main thread
  • Reviewed bug 658303 - mozIStorageConnection::Clone() should copy over #pragmas
  • Reviewed bug 566489 - Enable inline autocomplete again, but make it smarter (perceived performance)
  • Caught up on my massive backlog of newsgroups and bugmails