UniFi controller on pfSense
-
Hey guys,
I've been using the UniFi controller on a pfSense machine in the last few months, but yesterday I had to poweroff the pfSense machine for a few minutes. Today I saw that the UniFi controller installed on the pfSense machine has no UniFi device assignated to it.
My question is: if I reboot/poweroff the pfSense machine that has the UniFi controller installed, when the pfSense machine comes back on, I have to assign the AP every time? Is there any way I can avoid this?
I've searched on google and I haven't found anything useful.
Thanks!
PS: I'm running pfSense 2.2.6 and UniFi 4.7.6.
-
so you just powered it OFF, you did not do a controlled shutdown and then power on or restart?
You might get better help on the unifi forums, Pretty sure unifi controller on pfsense is not a supported config from pfsense.
-
If I reboot the pfSense machine, I also lose the UniFi device assignated to it.
I'll try on unifi forums too :)
-
Sounds like wherever it's keeping the database files is getting lost on each reboot. If you have /var and /tmp in RAM disks, try disabling that option. If you're on NanoBSD, there is likely no proper fix for that.
It's best to not run that on pfSense anyhow, it's a very bloated Java app (but I repeat myself…)
-
If you can not run it on a vm, you do know they sell a little cloud key https://www.ubnt.com/unifi/unifi-cloud-key/
Or you could run it on a pi for example. I don't think pfsense is the best place to run that application to be honest.. I run my on its own vm.. what is great about vms is the ability to take snapshots when moving to new versions, etc..
the db should not be stored in var or tmp on a normal install.. Default place for the db would be /usr/lib/unifi/data/db
-
Looks like it's /usr/local/share/java/unifi/data/db on FreeBSD, no reason that should be removed on reboot. Unless it's on NanoBSD and never gets written in the first place, though I'd expect a different error in that case.
I run the unifi controller from my FreeBSD workstation and it's fine, though I only start it when I need it and then stop it.
-
VM, Cloud Key, PI.
I wonder no-one even mentions what Netgate has to offer to run the Unifi controller software on.
Helps pay the rent for some, doesn't it? ;) -
Minnowboard is what $139… Can get the new Pi3 for $35, the unifi key is only $79 so maybe that is why they don't suggest them ;)
-
You have neither worked in marketing nor sales; you are a technician, right? I'm with you, just trying to escape sometimes. :)
-
No never worked in marketing or sales, that sort of stuff never interested me.. Techy all the way for sure.. And that board looks good, have been meaning to pick up one to play with.. Sure it would rock running unifi controller for sure, prob make a pretty good plex server as well with that nice gig interface that pi3 is lacking..
-
I see, you're trying hard now! ;D
-
I'm not using NanoBSD and /var and /tmp aren't in RAM disk. I need to run it on a machine that is always up, so this way it can store all logs. If I use it on a machine that isn't always on, it saves logs only when the machine with the controller is on and I prefer to use it on the pfSense machine, since this is the only machine (at least, at the moment) that other users don't have access to :)
I've searched and I have no unifi dir in /usr/local/share/java/ so… this should be the problem :) Any ideas?
-
not having db there is not really an issue, where unifi controller install on your pfsense box? This is where the db should be under the unifi folder in data/db folder.
-
Yep. It's /usr/local/UniFi/data/db I guess. So now I just have to figure out how to make sure I won't lose data if I reboot the machine or if it shutsdown due to power failure or stuff like that.
-
so your saying when you do a normal shutdown, or even power loss those files are deleted, or their size changes to new files?
-
After a reboot, those files are gone.
-
Most likely whatever startup script/action you're running is wiping all that out then. Those aren't in a place that would be removed by the firewall itself.