unifi wifi
About 1740 words
Manage WiFi networks (SSIDs).
Aliases: wlan, ssids, ssid
Manage the site's WiFi broadcasts: the SSIDs your access points announce, with their security mode, the network clients land on, and the radio bands, as found under Settings > WiFi.
--network takes the name of a network from unifi networks get. A personal security mode needs a passphrase: pipe it in with --passphrase-stdin, or run the command on a terminal to be asked for it. It is never taken from a flag's value. set --passphrase-stdin rotates it.
This kind is served by the official Network API.
Commands
unifi wifi create: Create a WiFi networkunifi wifi delete: Delete one or more WiFi networksunifi wifi describe: Show every field of one WiFi networkunifi wifi disable: Disable a WiFi networkunifi wifi edit: Edit a WiFi network in your editorunifi wifi enable: Enable a WiFi networkunifi wifi get: List the WiFi networks, or show oneunifi wifi set: Change fields of a WiFi network
unifi wifi create
Create a WiFi network.
Usage
unifi wifi create <name> [flags]Create a WiFi network from flags, from a file, or from both.
--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. -f reads a manifest or a bare spec (-f - reads standard input); flags are applied on top of it. With a manifest that carries metadata.name, the name argument can be left out.
The quickest way to a valid spec is an existing object: unifi wifi get <name> --output yaml.
Examples
unifi wifi create Guest --network Guest --security WPA2_PERSONAL --passphrase-stdin < passphrase.txt
unifi wifi create Guest --filename wifi-broadcasts.yaml
unifi wifi create Guest -f - < spec.yamlFlags
| Flag | Description |
|---|---|
--band-steering | whether capable clients are steered to 5 GHz; turn it off with --band-steering=false |
--client-isolation | whether clients are kept from talking to each other; turn it off with --client-isolation=false |
--enabled | whether the SSID is broadcast; turn it off with --enabled=false |
-f, --filename <file> | read the object from a manifest or spec file; - reads standard input |
--force | send fields that no object of the kind on this site has, instead of refusing them as typos |
--hidden | whether the SSID is hidden from scans; turn it off with --hidden=false |
--network <string> | network the clients land on, by name |
--passphrase-stdin | read the WiFi passphrase from standard input (8 to 63 characters); it is never taken from the command line |
--security <string> | security mode, such as OPEN, WPA2_PERSONAL, WPA3_PERSONAL, WPA2_WPA3_PERSONAL, WPA2_ENTERPRISE, WPA3_ENTERPRISE |
--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 |
-y, --yes | do not ask for confirmation |
unifi wifi delete
Delete one or more WiFi networks.
Usage
unifi wifi delete <name>... [flags]Aliases: rm
Delete one or more WiFi networks after confirmation.
Every name is checked before anything is deleted, so a typo deletes nothing. Pass --yes to skip the confirmation, as scripts must. When several objects share a name, --id picks the one to delete.
Examples
unifi wifi delete Guest
unifi wifi delete Guest --yesFlags
| Flag | Description |
|---|---|
--id <id> | pick the object by its id, for objects that share a name |
-y, --yes | do not ask for confirmation |
unifi wifi describe
Show every field of one WiFi network.
Usage
unifi wifi describe <name> [flags]Show every field of one WiFi network.
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 wifi set <name> --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 wifi describe Guest
unifi wifi describe Guest --output json
unifi wifi 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 wifi disable
Disable a WiFi network.
Usage
unifi wifi disable <name> [flags]Disable a WiFi network. It is a shortcut for unifi wifi set <name> --set enabled=false.
Examples
unifi wifi disable GuestFlags
| Flag | Description |
|---|---|
--id <id> | pick the object by its id, for objects that share a name |
-y, --yes | do not ask for confirmation |
unifi wifi edit
Edit a WiFi network in your editor.
Usage
unifi wifi edit <name> [flags]Open a WiFi network 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 wifi edit Guest
unifi wifi edit Guest # 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 wifi enable
Enable a WiFi network.
Usage
unifi wifi enable <name> [flags]Enable a WiFi network. It is a shortcut for unifi wifi set <name> --set enabled=true.
Examples
unifi wifi enable GuestFlags
| Flag | Description |
|---|---|
--id <id> | pick the object by its id, for objects that share a name |
-y, --yes | do not ask for confirmation |
unifi wifi get
List the WiFi networks, or show one.
Usage
unifi wifi get [name] [flags]Aliases: list, ls
List the WiFi networks 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, type, security, network, enabled, hidden, client-isolation, or any field path.
Examples
unifi wifi get
unifi wifi get --output wide
unifi wifi get Guest --output yaml
unifi wifi get --filter 'enabled && !hideName'
unifi wifi get --output yaml > wifi-broadcasts.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, type, security, network, enabled, hidden, client-isolation |
unifi wifi set
Change fields of a WiFi network.
Usage
unifi wifi set <name> [flags]Change fields of a WiFi network 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 wifi get <name> --output yaml.
Examples
unifi wifi set Guest --hidden=true
unifi wifi set Guest --set <path>=<value> --dry-run
unifi wifi set Guest --unset <path>Flags
| Flag | Description |
|---|---|
--band-steering | whether capable clients are steered to 5 GHz; turn it off with --band-steering=false |
--client-isolation | whether clients are kept from talking to each other; turn it off with --client-isolation=false |
--dry-run | show what would change without changing it |
--enabled | whether the SSID is broadcast; turn it off with --enabled=false |
--force | send fields that no object of the kind on this site has, instead of refusing them as typos |
--hidden | whether the SSID is hidden from scans; turn it off with --hidden=false |
--id <id> | pick the object by its id, for objects that share a name |
--network <string> | network the clients land on, by name |
--passphrase-stdin | read the WiFi passphrase from standard input (8 to 63 characters); it is never taken from the command line |
--security <string> | security mode, such as OPEN, WPA2_PERSONAL, WPA3_PERSONAL, WPA2_WPA3_PERSONAL, WPA2_ENTERPRISE, WPA3_ENTERPRISE |
--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> | remove a field by its path, repeatable |
-y, --yes | do not ask for confirmation |
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 |
