Skip to content

Instantly share code, notes, and snippets.

@dlee35
Last active July 27, 2020 19:51
Show Gist options
  • Save dlee35/084c3584d1fda88da2a4a5d3360b682b to your computer and use it in GitHub Desktop.
Save dlee35/084c3584d1fda88da2a4a5d3360b682b to your computer and use it in GitHub Desktop.
UniFi info
Manual Adoption:
point UniFi device to controller (must be done from mca-cli):
set-inform http://ip-of-controller:8080/inform
- configure your DNS server to resolve 'unifi' to your controller's IP address
- /etc/hosts is not persistent in UniFi but will work once
Gateway factory reset:
Console baud rate setting is 115200
CLI (from bash):
cp /opt/vyatta/etc/config.boot.default /config/config.boot
Hardware:
Press and hold the reset button.
The Orange LED above the VoIP port will begin flashing quickly.
After the LED begins to glow solidly, you can release the reset button.
Wait 60+ seconds the default configuration to be restored.
Switch factory reset:
CLI (from warped sh):
Thought I could `cp /default.cfg /tmp/.startup-config` but didn't work.
Will update once I need to try again.
Interesting items about this:
When system starts, it copies /tmp/.startup-config to /var/run/fastpath
Configs located in /tmp (pretty straightforward):
default config is default.cfg
previous config is previous.cfg
running config is running.cfg
startup config is .startup-config <= hidden
Hardware:
Press and hold the reset button for more than five seconds.
AP factory reset:
CLI (from mca-cli):
syswrapper.sh restore-default
Hardware:
Press and hold the reset button for 10 seconds
Release the button (the LEDs on the UAP will stop glowing)
Do not disconnect the UAP from its POE injector during the reboot process
The UAP will restore factory settings
Restore backup:
The preferred method is with the .unf file generated by backup settings
If you have the original /data folder referenced below (all subfolders and contents inclusive), you can:
- stop the controller
- make sure java and mongod are not running
- copy the new keystore (found in new /data directory) file to the old backup /data directory, overwriting the old one
- delete the new data directory
- copy the old /data directory to the new UniFi installation
- restart the controller
Data directory locations:
Windows:
Vista+: C:\Users\username\Ubiquiti UniFi\data <= careful on the stupid Windows space
XP: C:\Documents and Settings\username\Ubiquiti UniFi\data <= careful on the stupid Windows space
Linux:
Actual directory: /var/lib/unifi/
Symlinked directory: /usr/lib/unifi/data
Mac: /Applications/UniFi.app/Contents/Resources/data
Running UniFi controller as persistent Docker:
CLI:
docker run -d -v /your/dir:/var/lib/unifi/ -p 8080-8081:8080-8081 -p 8443:8443 -p 8843:8843 -p 3478:3478 -p 8880:8880 jacobalberty/unifi
NOTE:If migrating, "/your/dir" must include all data from previous instance (/data folder with all subfolders)
Compose:
See unifi-compose.yml file
The UniFi backup file has an extension of *.unf
- It contains the settings and the database for the UniFi Controller.
- As of UniFi v4.6.6, the backup also includes the config.properties and system.properties advanced configuration files, maps, and any customized files in a site's portal folder.
- It is seen as a data by the 'file' command and has no specific magic header.
Additional:
/var/etc/sysinit/switch.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment