Unifi controller

Is anyone available to guide me through the set up process for unifi controller app on true nas scale.

For me, the biggest downside of the App-based controller is that it cannot import a backup from a extant cloudkey to take over its duties. You will have to rebuild the whole Unifi network from scratch. This is way more time consuming than I have had time for. Maybe this winter.

you can either use the pre-build truenas app or create your own custom app via yaml.
An example for a working yaml would be this (i was playing around with unify, but ended up going the tp link and omada controller route)

---
version: "2.1"
services:
  unifi-controller:
    image: lscr.io/linuxserver/unifi-controller:latest
    container_name: unifi-controller
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - MEM_LIMIT=1024 #optional
      - MEM_STARTUP=1024 #optional
    volumes:
      - /mnt/Poolname/Datasetname/unify-controller/data:/config #change poolanem and Datasetname to your path
    ports:
      - 8443:8443
      - 3478:3478/udp
      - 10001:10001/udp
      - 8080:8080
      - 1900:1900/udp #optional
      - 8843:8843 #optional
      - 8880:8880 #optional
      - 6789:6789 #optional
      - 5514:5514/udp #optional
    restart: unless-stopped
1 Like

Import the settings on the new controller, go to the old controller, remove devices there, adopt on the new controller.

It’s not pretty, but it is no big deal either.

1 Like

Every time I try to import a backup / settings file, the app freezes on me and stops working. How did you import settings?

Just via the webGUI.
But I am running unifi in a Proxmox debian VM.

1 Like

That’s precisely what I have tried to do - make a backup of the settings of the cloudkey via its WebUI, save ist settings to my laptop, upload same to the Unifi App as a “restore”. It just hangs the WebUI and never works.

I reckon Proxmox environment is different and hence allows common-sense backup-restore. But for the App, it looks like I need to rebuild from scratch. If you or anyone else found a way to do it better in TrueNAS, I am all ears!

I am not really into TrueNAS apps (are they nowadays docker or kubernetes or podman?) but unifi feels even on bare metal debian a little bit experimental compared to Windows or macOS.

You mean Debian? I run it in a Debian VM, so from a Unifi perspective, it is a Linux installation.

1 Like

The App Is definitely different than a VM, likely the VM is better at dealing with aspects of the network stack, for example. Docker didn’t allow apps to specify a IP address until recently unless you got into the YAML or whatever weeds.

That’s one reason I’m going with a Pi to run HAOS, instead of the App. I’d love to run it as a VM on my NAS instead but I’m still waiting for the enterprise-ready hypervisor to be rolled out.

That is what I am trying to say.
Unifi is a little bit wonky even on Linux.
Add multiple layers of complexity by running it in docker instead of a VM and you get even jankier result.

One reason why I keep repeating in this forum:
TrueNAS is a great NAS but not so great Hypervisor.
Proxmox is a great Hypervisor, but not so great NAS.
Not everything has to be Docker or Kubernetes, you are not a multi billion dollar company like Google.

Just a FYI to @Sara and @Constantin, and anyone that finds this by searching later.

The Unifi cloud key and the Unifi self hosted networking application are two different things that are both capable of controlling Unifi network stuff. The docker app is based on the self hosted net app, so it was easy for myself and @Sara to import our configs into the docker app from a VM. @Constantin is using a cloud key and those backups are fundamentally different and won’t work.

Not a docker or VM problem, it’s a Unifi problem. :rofl:

The new public UnifiOS may address these problems, I don’t know, I haven’t messed with it yet.

2 Likes

Thank you for that! It was not intuitive that the app would happily ingest an incorrect backup file but then develop a tummy ache and die.

A google search suggests that I should not have used the backup function but rather an export site function followed by preparing the new server and then migrating the devices.

There are a bunch of steps involved but at least it doesn’t require rebuilding the network from scratch.

This could be the perfect way to keep my idle Server cores a bit busier. To make it easier on myself and the network, I will first have to figure out how to give the UniFi app its own IP address.

Thank you again!

2 Likes

Glad I could help. I found out about this because my friend ran into this exact problem trying to migrate from like a cloud key to a dream machine. That seems extra frustrating to be going from one Unifi product to another Unifi.

1 Like

Thanks for all the feed back guys I will try this and reply to this forum soon

I just spent about a month going through a bit of hell setting up Unifi and OPNsense. I tried running the controller on my laptop, then a pi when all of a sudden it refused to work on my laptop, then as a TN VM, then a TN App, couldn’t get anything to really work reliably as my setup required moving the controller IP back and forth from default to MGMT vlan.

I ended up buying a small cloud key gen 2 and wish I did it from the start. It would have saved me hours and hours of troubleshooting. Hard to setup your network when you aren’t starting from a configured network.

Good luck in your setup!

1 Like

I hear you and I will still try to export my cloud key and set it up as an app to reduce the power draw here. My cloud key 2 runs crispy warm despite zero HDD activity and POE Power.

If it doesn’t work, I just restore from backup and call it a day.