====== Ubiquiti - CLI - Static DNS entry ====== ===== ssh into your Controller ===== ssh into your Controller (NOT the USG!). For controller on: * **Windows**: C:\Users\\Ubiquiti UniFi\data\sites\default * **Mac**: /Users//Library/Application Support/UniFi/data/sites//config.gateway.json * **Ubuntu**: /usr/lib/unifi/data/sites/default * **CloudKey**: /srv/unifi/data/sites/default **NOTE:** Use the site-name you had configured instead of "default" if you did. ---- Create/Edit the file config.gateway.json in your site directory: { "system": { "static-host-mapping": { "host-name": { "test1.localdomain": { "alias": [ "test1" ], "inet": [ "192.168.99.99" ] } } } } } **NOTE:** It is a good habit to run a sanity check on your .json file before pushing it to the device. Simply copy & paste it to JSON Formatter & Validator. There are many of them available such as https://jsonformatter.curiousconcept.com/ ---- ===== Finalize ===== Once the file is on the UniFi-Controller: * Navigate to **Devices**. * Click your USG. * Click the "Config"-icon * Click "Manage Device" and pick "Provision" under Force Provisioning. ---- ===== Verify ===== Verify the setting by ssh'ing into your USG, enter "configure" and "show system" where the test1-entry now will show up under static-host-mapping. ---- ===== References ===== https://help.ui.com/hc/en-us/articles/115004872967-UniFi-Where-is-unifi-base-