unifi settings
About 2390 words
Manage controller and site settings.
Aliases: setting
Manage the settings of the controller and the site: device management and SSH, updates, backups, CyberSecure (intrusion detection and prevention), high availability, the guest portal, NTP, country and more.
The controller keeps settings as one object per key, each with its own fields. get lists the keys, describe <key> shows a key's fields, set <key> --set <field>=<value> changes them and edit <key> opens them in your editor. Settings always exist, so there is no create or delete.
The areas people look for by name have shortcuts with typed flags: updates, cybersecure, ha and management.
Settings are served by the controller's internal API, whose shape can change between UniFi Network versions.
Commands
unifi settings cybersecure: Show or change CyberSecure (IDS/IPS)unifi settings cybersecure get: Show CyberSecureunifi settings cybersecure set: Change CyberSecureunifi settings describe: Show every field of one settingunifi settings edit: Edit a setting in your editorunifi settings get: List the settings, or show oneunifi settings ha: Show or change high availability (shadow mode)unifi settings ha get: Show high availabilityunifi settings ha set: Change high availabilityunifi settings management: Show or change device managementunifi settings management get: Show device managementunifi settings management set: Change device managementunifi settings set: Change fields of a settingunifi settings updates: Show or change automatic updatesunifi settings updates get: Show automatic updatesunifi settings updates set: Change automatic updates
unifi settings cybersecure
Show or change CyberSecure (IDS/IPS).
Aliases: ips, ids
Show or change CyberSecure: intrusion detection (ids) and prevention (ips), the threat categories it watches for, ad blocking, DNS filtering and the honeypot. The values live in the setting ips.
The protected networks are a list of network IDs; change it with unifi settings edit ips.
unifi settings cybersecure get
Show CyberSecure.
Usage
unifi settings cybersecure get [flags]Aliases: list, ls
Show CyberSecure.
--output wide adds where each value lives, as <object>.<field>. --output yaml and --output json print the values by object and field.
Examples
unifi settings cybersecure get
unifi settings cybersecure get --output wide
unifi settings cybersecure get --output jsonunifi settings cybersecure set
Change CyberSecure.
Usage
unifi settings cybersecure set [flags]Change CyberSecure and show what changed.
Every flag maps to one field; --dry-run shows the change without making it. Fields without a flag can be set with unifi settings set <name> --set <field>=<value>.
Examples
unifi settings cybersecure set --mode ips --ad-blocking=true
unifi settings cybersecure set --mode ips --ad-blocking=true --dry-runFlags
| Flag | Description |
|---|---|
--ad-blocking | whether ads are blocked by DNS; turn it off with --ad-blocking=false |
--categories <strings> | threat categories to watch for (comma-separated) |
--dns-filtering | whether DNS content filtering is on; turn it off with --dns-filtering=false |
--dry-run | show what would change without changing it |
--honeypot | whether the internal honeypot is on; turn it off with --honeypot=false |
--memory-optimized | whether a smaller signature set is used to save memory; turn it off with --memory-optimized=false |
--mode <string> | detection mode: disabled, ids, ips, ipsInline |
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
unifi settings describe
Show every field of one setting.
Usage
unifi settings describe <key> [flags]Show every field of one setting.
The kinds people look at most are laid out in words, with references shown by name; the others list their fields under the paths that unifi settings set <key> --set <path>=<value> takes. --output yaml always prints the complete object as the controller spells it.
Secrets such as passphrases and keys read <redacted>. --show-secrets prints them in --output yaml and --output json, never in the text view. When several objects share the name, --id picks one.
Examples
unifi settings describe mgmt
unifi settings describe mgmt --output json
unifi settings describe --id <id>Flags
| Flag | Description |
|---|---|
--id <id> | pick the object by its id, for objects that share a name |
--show-secrets | print secrets in yaml and json output instead of <redacted>; they end up in your terminal, its scrollback and any file you redirect to |
unifi settings edit
Edit a setting in your editor.
Usage
unifi settings edit <key> [flags]Open a setting as a YAML manifest in your editor and apply it on save.
The editor is taken from $VISUAL, then $EDITOR, then vi. What you save becomes the object's new state: removing a field removes it. Closing without changes, or emptying the file, cancels the edit.
Secrets such as passphrases and keys are shown as <redacted>. Leave that as it is to keep a secret, or type a new value over it to change it.
When the result is not a valid manifest or the controller rejects it, your edits are kept in a file whose path is printed, so nothing is lost.
Examples
unifi settings edit mgmt
unifi settings edit mgmt # with EDITOR="code --wait"Flags
| Flag | Description |
|---|---|
--force | send fields that no object of the kind on this site has, instead of refusing them as typos |
--id <id> | pick the object by its id, for objects that share a name |
-y, --yes | do not ask for confirmation |
unifi settings get
List the settings, or show one.
Usage
unifi settings get [key] [flags]Aliases: list, ls
List the settings of the site, or show the one named by the argument.
--output wide adds columns and the object IDs. --output yaml and --output json print manifests that unifi apply -f - accepts unchanged.
--show-secrets keeps passphrases, keys and other secrets in --output yaml and --output json; without it they read <redacted>, which unifi apply understands as "keep the current value". Tables never show secrets.
--filter takes a filter expression such as enabled && name contains "guest". Fields are the object's own, as shown by --output yaml, plus name and id. --sort takes a column: name, or any field path.
Examples
unifi settings get
unifi settings get --output wide
unifi settings get mgmt --output yaml
unifi settings get --filter 'enabled'
unifi settings get --output yaml > settings.yamlFlags
| Flag | Description |
|---|---|
--filter <string> | filter expression, such as 'enabled && name contains "guest"' |
--id <id> | pick the object by its id, for objects that share a name |
--reverse | reverse the sort order |
--show-secrets | print secrets in yaml and json output instead of <redacted>; they end up in your terminal, its scrollback and any file you redirect to |
--sort <string> | sort by a column or field path: name |
unifi settings ha
Show or change high availability (shadow mode).
Aliases: high-availability, shadow-mode
Show or change high availability: shadow mode pairs two gateways so that the secondary takes over when the primary fails. The values live in the setting shadow_mode.
unifi settings ha get
Show high availability.
Usage
unifi settings ha get [flags]Aliases: list, ls
Show high availability.
--output wide adds where each value lives, as <object>.<field>. --output yaml and --output json print the values by object and field.
Examples
unifi settings ha get
unifi settings ha get --output wide
unifi settings ha get --output jsonunifi settings ha set
Change high availability.
Usage
unifi settings ha set [flags]Change high availability and show what changed.
Every flag maps to one field; --dry-run shows the change without making it. Fields without a flag can be set with unifi settings set <name> --set <field>=<value>.
Examples
unifi settings ha set --enabled=true --failover-delay 15
unifi settings ha set --enabled=true --failover-delay 15 --dry-runFlags
| Flag | Description |
|---|---|
--dry-run | show what would change without changing it |
--enabled | whether shadow mode is on; turn it off with --enabled=false |
--failover-delay <int> | seconds the primary must be gone before the secondary takes over |
--peer <string> | MAC address of the other gateway |
--role <string> | role of this gateway in the pair, such as primary |
--sync-interval <int> | seconds between configuration syncs |
--vrrp-id <int> | VRRP group the pair uses |
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
unifi settings management
Show or change device management.
Aliases: mgmt
Show or change how the controller manages the site's devices: status LEDs, alerts, SSH access to the devices and optional features. The values live in the setting mgmt.
The device SSH password is never passed as a flag; set it with unifi settings edit mgmt.
unifi settings management get
Show device management.
Usage
unifi settings management get [flags]Aliases: list, ls
Show device management.
--output wide adds where each value lives, as <object>.<field>. --output yaml and --output json print the values by object and field.
Examples
unifi settings management get
unifi settings management get --output wide
unifi settings management get --output jsonunifi settings management set
Change device management.
Usage
unifi settings management set [flags]Change device management and show what changed.
Every flag maps to one field; --dry-run shows the change without making it. Fields without a flag can be set with unifi settings set <name> --set <field>=<value>.
Examples
unifi settings management set --led=false --ssh=true
unifi settings management set --led=false --ssh=true --dry-runFlags
| Flag | Description |
|---|---|
--advanced-features | whether advanced features are shown and usable; turn it off with --advanced-features=false |
--alerts | whether the controller raises alerts; turn it off with --alerts=false |
--boot-sound | whether devices play a sound when they boot; turn it off with --boot-sound=false |
--debug-tools | whether the devices' debug tools are available; turn it off with --debug-tools=false |
--direct-connect | whether remote access may connect directly; turn it off with --direct-connect=false |
--dry-run | show what would change without changing it |
--led | whether the devices' status LEDs are lit; turn it off with --led=false |
--outdoor-mode | whether outdoor access points use outdoor channels; turn it off with --outdoor-mode=false |
--ssh | whether devices accept SSH; turn it off with --ssh=false |
--ssh-password-auth | whether SSH accepts passwords, not only keys; turn it off with --ssh-password-auth=false |
--ssh-username <string> | user name for SSH on the devices |
--wifiman | whether the WiFiman speed test server is on; turn it off with --wifiman=false |
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
unifi settings set
Change fields of a setting.
Usage
unifi settings set <key> [flags]Change fields of a setting and show what changed.
--set path=value sets any field; address nested fields with dots. Values are read as YAML, so 20 is a number, true a boolean and [a,b] a list (a list replaces the whole field). --unset path removes a field. --dry-run shows the change without making it.
Find the field paths with unifi settings get <key> --output yaml.
Examples
unifi settings set mgmt --set led_enabled=false
unifi settings set mgmt --set <path>=<value> --dry-run
unifi settings set mgmt --unset <path>Flags
| Flag | Description |
|---|---|
--dry-run | show what would change without changing it |
--force | send fields that no object of the kind on this site has, instead of refusing them as typos |
--id <id> | pick the object by its id, for objects that share a name |
--set <path=value> | set a field: path=value, repeatable; the value is read as YAML, so numbers, booleans and lists like [a,b] work |
--set-stdin <path> | set the field at this path to what arrives on standard input, for secrets; on a terminal it is asked for, masked |
--unset <path> | clear a field by its path, repeatable: the controller's internal API keeps the key and stores an empty value |
-y, --yes | do not ask for confirmation |
unifi settings updates
Show or change automatic updates.
Aliases: update, upgrades
Show or change how updates are installed: whether devices and the Network application update themselves, at which hour, and from which release channel. The values live in the settings mgmt (devices) and super_mgmt (controller).
unifi settings updates get
Show automatic updates.
Usage
unifi settings updates get [flags]Aliases: list, ls
Show automatic updates.
--output wide adds where each value lives, as <object>.<field>. --output yaml and --output json print the values by object and field.
Examples
unifi settings updates get
unifi settings updates get --output wide
unifi settings updates get --output jsonunifi settings updates set
Change automatic updates.
Usage
unifi settings updates set [flags]Change automatic updates and show what changed.
Every flag maps to one field; --dry-run shows the change without making it. Fields without a flag can be set with unifi settings set <name> --set <field>=<value>.
Examples
unifi settings updates set --devices=true --hour 3
unifi settings updates set --devices=true --hour 3 --dry-runFlags
| Flag | Description |
|---|---|
--channel <string> | release channel updates come from, such as release |
--controller | whether the Network application updates on its own; turn it off with --controller=false |
--controller-hour <int> | hour of the day at which the application updates (0 to 23) |
--devices | whether devices install firmware updates on their own; turn it off with --devices=false |
--dry-run | show what would change without changing it |
--hour <int> | hour of the day at which devices update (0 to 23) |
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
Global flags
These flags are accepted by every command.
| Flag | Description |
|---|---|
--color-scheme <string> | color scheme: auto, dark or light |
--context <string> | context to use instead of the current one |
--no-cache | ask the controller for everything instead of using cached answers |
-o, --output <string> | output format: text, wide, json, yaml (table is another name for text) |
-s, --site <string> | site to act on instead of the context's default site |
--theme <string> | theme to render with instead of the configured one |
