Unifi-Controller installation on Unraid
On this page
With the unifi-controller set to be deprecated on January 1, 2024, it’s essential to switch to the unifi-network-application to continue receiving updates. This guide outlines the process.
Overview #
- Create an
init-mongo.js
script for MongoDB. - Install MongoDB in a Docker container.
- Install the unifi-network-application.
1. Create the init-mongo.js
Script
#
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" }]
});
Replace placeholders (MONGO_DBNAME, MONGO_USER, MONGO_PASS, etc.) with your specific values. Save the script at /mnt/user/mongo-init/init-mongo.js
on your Unraid host system.
2. Install MongoDB Docker Container #
Install the MongoDB Docker container from the Unraid app store. Opt for a specific docker version instead of the ’latest’ to avoid issues with automatic major version upgrades. At the time of writing, versions 3.6 to 4.4 are supported.

Next, add a new path: set the container path to /docker-entrypoint-initdb.d/init-mongo.js
and the host path to your script location (/mnt/user/mongo-init/init-mongo.js
).

Start the Docker container. If the init script fails, remove the entire /mnt/user/appdata/mongodb
folder and initiate a fresh container.
3. Install unifi-network-application Container #
Install the container, updating the database connection details accordingly.
Start the container and enjoy your upgraded setup!
Note: After installation, you might need to restore a backup and manually inform the APs to adopt. For more details, see How to Manually Set Controller Endpoint on Unify AP