How to install Unifi Network Application on Portainer

I’ll guide you through the process of installing Unifi Network Application step by step on Portainer.

Maybee somebody can help me, im running portainer at a virtualized debian 12.

The bash script fails, gives me “Error downloading the file. Check your Internet connection or the URL.”
I have make this file/script myself, but i dont seems to be executed.

I was trying to deploy the stack, it goes ok, but with mongodb 6.0.11, the db container, gives an error “requires a CPU with AVX support”
If i remove everything, and deployed with mongo 4.4.7, the db container gives me “error”:“UserNotFound: Could not find user "unifi" for db "unifi"”}

I will be happy for your help :slight_smile:

  • Check Internet Connectivity: Make sure your Debian system has proper internet access. You can test this by running ping or a similar command.
  • Verify the URL: Ensure that the URL in your script is correct and accessible. You can test this by trying to access the URL from a browser or using curl or wget from the command line.

Did you run the script before installing unifi network application?

Thanks for your reply!

I already tested internet, i can ping google, both IP and domain.
If i open the link to in a browser, on the portainer host, its give me the raw file, where it should create the db user, and gives it permission.

Yes the script was runned, before deploying and start of the containers, i have also remove the containers, images, unused volumes several times.

Have you tried running the curl command by itself?

curl -L "" -o "/DATA/AppData/unifi-network-application/db/init-mongo.js"

Also, you can download the contents of ini-mongo.js and create the file:

Then use nano to create the file or vim.


Thanks again, for helping me :slight_smile:

Yes, i also tryed this ways, altso manually, i think maybee i will try and fresh installation without old deploys, because i’ve got the feeling, somethings i saved from the many tries that I have done

t={“$date”:“2024-01-18T17:46:00.283+00:00”} s=I c=ACCESS id=20249 ctx=conn477095 msg=Authentication failed attr={“mechanism”:“SCRAM-SHA-256”,“speculative”:true,“principalName”:“unifi”,“authenticationDatabase”:“unifi”,“remote”:“”,“extraInfo”:{},“error”:“UserNotFound: Could not find user "unifi" for db "unifi"”}