Unifi OS server as a virtual machine

Hi All,

Has anyone set up Unifi OS as o vm on TrueNAS Scale?

I’ve been using the unifi network controller to manage my wifi acess points as an app on my truenas box but wanted to look at using the Unifi OS server instead as it also supports thier cctv/security features which you can’t do locally with the app.

My TrueNAS is installed on bare metal with a quad core xeon-d and 64Gb ram. So in theory shouldn’t have a problem with a VM.

I’ve done a lot of googling but seem to be going round in circles partly as I don’t understand half of what I’m reading…

Anyone got any experience doing this?

All help appreciated!

As far as I know, Unifi “OS” is not an OS in the traditional sense but simpy a piece of software that you install on a OS. It seems to be containerized with podman.

So where exactly are you going in cicles ?

2 Likes

Honestly also kinda looking into this - so best to run some lightweight linux VM & run their Unifi whatever on it I guess?

That seems to be the way to do it.

1 Like

You can run it inside a VM, or LXC, there’s a thread here → Installing UnifiOS in a container (incus) on Goldeye
I personally run it in a Docker Container, runs perfect for me, just updated the Network Component independently of the main Docker container being updated

2 Likes

The canonical way is to run a Linux VM (Debian 13 is fine) and install their Unifi OS download on top of it. This should just work. I think they need a CPU that is not ancient (i.e. supporting AVX instructions), but I think Xeon-D is recent enough for that, just make sure the host CPU type is passed to the VM. See https://help.ui.com/hc/en-us/articles/34210126298775-Self-Hosting-UniFi .

Linux Container is possible after some tweaks (see e.g. GitHub - kam821/Unifi-OS-Server-on-LXC-Proxmox: UniFI OS Server on LXC / Proxmox container · GitHub) - I am running it this way on Proxmox. Should be possible with TrueNAS but frankly, I’d avoid using something that is marked as experimental for a critical part of the networking infrastructure, and with 64 GB RAM you probably don’t need to run as lightweight as possible.

Containers are maybe possible as their “OS” also uses containers (podman) but there is no support whatsoever from Unifi, so you need to rely on a 3rd party (or yourself) to provide and maintain such setup.

It is possible to transfer your existing setup via backup & restore - I’ve had some hiccup there but finally it somehow worked, unfortunately I don’t remember the details.

1 Like

I run UnifiOS, on top of Debian, but under proxmox. Just install your Nix OS of choice, then install UnifiOS.

Anything in there worth the effort vs unifi app on docker for a simple home lab with a few switches & aps?

Unifi made it clear that the only supported way of self-hosting is their Unifi OS. No one knows what exactly and when they are up to, so it is more a heads up. If you have a working install and can live with say updates of the network app being dropped at some point, there is no reason to update immediately. If you are doing a new install, I’d use the supported path.

3 Likes

I’ve been running UniFi OS in a VM for a while now. Seems to work well.

I used Ubuntu Server as the Base OS.

Ensure you setup automatic updates.

I do recall that using the unifiapp would often fail to update when i did my sudo dnf update -y && sudo dnf upgrade -y, usually something to do with postgres or the hash or cert for the unifi being old or some other weird reason..

Not had that issue with UnifiOS yet knock on wood

1 Like

I have run UnFi OS for years, on Windows Server, on a Debian VM and on their Dreamachine appliance. It should run fine in a VM and I don’t see why it would be any different in SCALE either. Folks above has posted nice guides. I wish you luck

We run Unifi in Docker: image: jacobalberty/unifi. It’s been working great for years. Should be run with a static IP (macvlan).