TrueNAS SCALETrueNAS SCALE Nightly Development Documentation
This content follows experimental early release software. Use the Product and Version selectors above to view content specific to a stable software release.

Config

The SCALE CLI guide is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!

Welcome to the TrueNAS SCALE Command Line Interface (CLI) guide!

The TrueNAS CLI in TrueNAS SCALE functions like a text-based version of the web UI with many functional areas grouped into parent and child namespaces that mirror the counterparts in the SCALE UI.

The underlying structure of the CLI namespaces and commands closely follows that of the SCALE API. For more information on API commands, arguments, options, and definitions go to API Keys and click on API Docs in the SCALE UI.

Config Namespace

The config namespace has three commands and is based on configuration management functions found in the SCALE API and web UI. It provides access to configuration management methods through the config namespace commands.

Config Commands

The following config namespace commands allow you to save or upload system configuration files and to reset configuration to default. You can enter commands from the main CLI prompt or from the system namespace prompt.

Reset Command

The reset command reverts the system database to default configuration values.

Download the current system configuration with save before resetting the configuration to default settings! If you do not save the system configuration before resetting it, you could lose data that was not backed up, and you cannot revert to the previous configuration.

The reset command can result in unexpected behavior if entered via Shell in the web UI, especially if reboot is set to false. To avoid instability, only use reset via a direct connection to the console or SSH.
TrueNAS Enterprise

Enterprise High Availability (HA) systems should never reset their system configuration to defaults. Contact iXsystems Support if a system configuration reset is required.

iXsystems Support

Customers who purchase iXsystems hardware or that want additional support must have a support contract to use iXsystems Support Services. The TrueNAS Community forums provides free support for users without an iXsystems Support contract.

iXsystems Customer Support
Support Portalhttps://support.ixsystems.com
Emailsupport@ixsystems.com
Telephone and Other Resourceshttps://www.ixsystems.com/support/
Using the Reset Command

Description

The reset command has one optional property,options, which has one additional optional property, reboot. If not specified, reboot defaults to true. Enter the reboot property argument enclosed within {} curly brackets following the options property: options={"reboot":true}. When reboot is true, the system reboots ten seconds after the job is completed.

Enter the command string then press Enter. After entering the command correctly, the job begins and progress displays.

Usage

From the CLI prompt, enter:

system config reset

Command Example
system config reset 
[0%] ...
[5%] Removing cluster information (if any)...
[15%] Replacing database file...
[25%] Running database upload hooks...
[50%] Updating initramfs...
[95%] Will reboot in 10 seconds...
[100%] Will reboot in 10 seconds...

Save Command

The save command creates a tar file of security-sensitive configuration information and saves it to the specified location.

The configuration file contains sensitive data like system passwords. Keep the configuration file safe and protect it from unauthorized access!
Using the Save Command

Description

save has one optional property, configsave, which has four additional optional properties (see table below). Enclose array properties in {} curly brackets, with the property double-quoted and separated from the boolean value using the : delimiter. Separate multiple array property arguments within the {} with a comma.

Enter the desired file name and path following a > carrot. Save the config file to a secure location that is accessible, such as an SMB share.

Enter the command string then press Enter. After entering the command correctly, the cli displays the status of the job then confirms the output file is saved at the specified location.

Configsave Configuration Properties
PropertyRequiredDescriptionSyntax Example
secretseednoWhen true, the file includes the password secret seed. Including the password secret seed allows using this configuration file with a new boot device. This also decrypts all system passwords for reuse when the configuration file is uploaded."secretseed":true
pool_keysn/apool_keys is ignored and depricated on TrueNAS SCALE systems.n/a
root_authorized_keysnoWhen true, the configuration file includes the “/root/.ssh/authorized_keys” file for the root user."root_authorized_keys":true
gluster_confignoWhen true, the configuration file includes the directory that stores gluster configuration files."gluster_config":true

Usage

From the CLI prompt, enter:

system config save > /mnt/tank/test/FILENAME.tar

Where /mnt/tank/test/FILENAME.tar is the desired file name and save path.

Command Example
system config save configsave={"secretseed":true,"root_authorized_keys":true,"gluster_config":true} > /mnt/tank/test/FILENAME.tar
[0%] ...
[100%] ...
[100%] Job output (786432 bytes) saved at '/mnt/tank/test/FILENAME.tar'

Upload Command

Do not use. Use the web UI to upload configuration files.