The net/unifi/6.0 port

unifi-6.0.45p19 – controller for Ubiquiti uniFi (wifi/routing/switching/voip) (cvsweb github mirror)


This package contains controller software for Ubiquiti UniFi access points,
switches, gateways and phones.

This branch 6.0 contains the newest version of the controller that still
officially supports the original Atheros-based UniFi 11n AP and some

UAP-Outdoor		UAP-Outdoor+
UAP (v1+v2)		UAP-LR (v1+v2)

However, at the time of writing the current 7.4 releases do still support
these devices, so you may prefer to try those first as 6.0 is quite outdated.
No homepage


| Running ${PKGSTEM} on OpenBSD

After installing and starting UniFi, connect to https://localhost:8443/ to
configure. (Additional UDP and TCP ports are used for AP<>controller
communications; check the documentation if you are configuring firewalls).

Importing CA-signed certificates (optional)
If you would prefer to replace the auto-generated self-signed certificate
with a CA-signed certificate, you can import it like this:

# rcctl stop unifi
# cd ${TRUEPREFIX}/share/unifi/data
# openssl pkcs12 -export -in /etc/ssl/server.crt \
   -inkey /etc/ssl/private/server.key \
   -certfile /etc/ssl/intermediate.crt -out unifi.p12 \
   -name unifi -password pass:aircontrolenterprise
# $JAVAHOME/bin/keytool -importkeystore -srckeystore unifi.p12 \
   -srcstoretype PKCS12 -srcstorepass aircontrolenterprise \
   -destkeystore keystore.new -storepass aircontrolenterprise
# rcctl start unifi

Migrating between MongoDB versions
Unifi uses MongoDB to store its database. Databases can only be updated
directly across one major MongoDB version (3.4->3.6, 3.6->4.0, 4.0->4.2,

If you need to update MongoDB across a larger gap, the simplest way to
move Unifi data across is to make sure you have an up-to-date Unifi .unf
backup (check /usr/local/share/unifi/data/backup and maybe trigger one
from the web interface). Then stop Unifi and move the old MongoDB
database out of the way (the directory /usr/local/share/unifi/data/db),
restart Unifi and open the web interface; it will create a new database
and allow restoring from a backup file.

Alternatively "mongodump" (in the mongo-tools package) can be used.
You probably won't need it, but here are some instructions that worked
for the port maintainer and may be useful.

Backup with the old mongodb version installed and unifi running -

$ mkdir unifi-backup; cd unifi-backup
$ mongodump --port=27117
$ doas rcctl stop unifi
$ doas cp -rp /usr/local/share/unifi /usr/local/share/unifi.backup

Then after installing the newer mongodb you can restore - the steps
below increase the number of file handles from the default to avoid

# su -m _unifi -i
$ ulimit -n 1024
$ mv /usr/local/share/unifi/data/db /usr/local/share/unifi/data/db.old
$ mkdir /usr/local/share/unifi/data/db
$ mongod --dbpath /usr/local/share/unifi/data/db --port 27117 \
  --unixSocketPrefix /usr/local/share/unifi/run --logRotate reopen \
  --logappend --logpath /usr/local/share/unifi/logs/mongod.log \
  --pidfilepath /usr/local/share/unifi/run/mongod.pid \
  --wiredTigerEngineConfigString=cache_size=256M --bind_ip &
$ mongorestore --port=27117
$ kill `cat /usr/local/share/unifi/run/mongod.pid`
$ exit

and restart unifi:

# rcctl start unifi


Stuart Henderson

Distribution forbidden on ftp


Only for arches



java net

Build dependencies

Run dependencies