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.

Truenas

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.

TrueNAS Namespace

TrueNAS Enterprise
On licensed systems, use the truenas namespace for viewing or modifying Enterprise customer service details. Systems without an Enterprise license do not use this namespace.

The truenas namespace has five commands and is based on TrueNAS Enterprise functions found in the SCALE API and web UI. It provides access to Enterprise customer management methods through the truenas namespace commands.

TrueNAS Commands

The following truenas namespace commands allow you to accept the TrueNAS EULA, modify Enterprise customer information, and control system production status.

You can enter commands from the main CLI prompt or from the system namespace prompt.

Interactive Argument Editor (TUI)

Enter the -- flag following any CLI command to open the interactive arguments editor text-based user interface (TUI).

Click for more information

The interactive argument editor is a text user interface (TUI) that can help enter complex commands with multiple configurable properties. It shows expected properties, defaults, input types (string, boolean, integer, or array), and can include command instructions or warnings.

Optional properties, indicated by the # symbol, are disabled by default. Required properties are enabled. Do not disable properties that are enabled by default.

To configure required properties, enter a space after the colon then add the value.

To enable optional properties, delete # from the corresponding line.

Some required properties are disabled if they are part of a pair of properties where one or the other is required. Select one property to enable and enter a value.

Press F2 or click Save to save the modified file.

Press F10, Esc, or click Quit to exit the TUI. The command automatically executes upon exit.

Accept_eula Command

The accept_eula command records agreement with the TrueNAS SCALE End User License Agreement (EULA).

Review the EULA before accepting it.
Using the Accept_eula Command

Description

accept_eula does not require entering properties or arguments. Enter the command then press Enter. The command returns an empty line.

Usage

From the CLI prompt, enter:

system truenas accept_eula

Command Example
system truenas accept_eula

Get_customer_information Command

The get_customer_information command returns a table of stored customer information.

Using the Get_customer_information Command

Description

get_customer_information does not require entering properties or arguments. Enter the command then press Enter. The command returns a table containing Enterprise customer information.

Usage

From the CLI prompt, enter:

system truenas get_customer_information.

Command Example
system truenas get_customer_information
+----------------+---------------------------+
|             id | 1                         |
|           data | <dict>                    |
|     updated_at | 2023-08-28T19:54:04+00:00 |
|        sent_at | <null>                    |
| form_dismissed | false                     |
| immutable_data | <dict>                    |
|   needs_update | false                     |
+----------------+---------------------------+

Is_production Command

The is_production command returns if the system is marked as a production system.

Using the Is_production Command

Description

is_production does not require entering properties or arguments. Enter the command then press Enter. The command returns either a true or false output. True indicates the system is a production system. False indicates the system is not.

Usage

From the CLI prompt, enter:

system truenas is_production

Command Example
system truenas is_production
true

Set_production Command

The set_production command adds or removes in-production status from the system and creates a ticket to notify iXsystems Support that the system is ready for use in production.

Using the Set_production Command

Description

set_production has one required property, production, and one optional property, attach_debug, to include in the command string. The production property uses a boolean value to set production as true or false. The attach_debug property uses a boolean value to include a debug file in the support ticket. If attach_debug is set to true, TrueNAS automatically creates and attaches a debug file to the ticket.

Enter the property argument using the = delimiter to separate the property and value. Separate multiple property arguments with a space. Enter the command string then press Enter

Usage

From the CLI prompt, enter:

system truenas set_production production=true attach_debug=true

Command Example
system truenas set_production production=true attach_debug=true
[0%] ...
[1%] Gathering data...
[20%] Submitting ticket...
[50%] Ticket created: 12345678910111213...
[100%] Ticket created: 12345678910111213...
+-----------+-------------------------------------------------------------------+
|    ticket | 12345678910111213                                                 |
|       url | https://support-proxy.ixsystems.com/issues/salesforce/123456...   |
| has_debug | true                                                              |
+-----------+-------------------------------------------------------------------+

Update_customer_information Command

The update_customer_information command modifies stored customer information.

The TrueNAS CLI guide for SCALE is a work in progress! This command has not been fully tested and validated. Full documentation is still being developed. Check back for updated information.
Using the Update_customer_information Command

Description

update_customer_information has one required property, customer_information_update. customer_information_update has seven properties, four of which have additional configurable properties (see the Customer_information_update Properties below). If entering a command string, enter the command then press Enter. When making complex changes, enter update_customer_information -- to use the interactive arguments editor. The command returns a chart of stored customer information.

Customer_information_update Properties
PropertyRequiredDescriptionSyntax Example
companynoEnter the company name for the customer.“company”:"Name"
administrative_usernoEnter identification information for the system administrator.
Properties:
  • first_name
  • last_name
  • title
  • office_phone
  • mobile_phone
  • primary_email
  • secondary_email
  • address
  • city
  • state
  • zip
  • country
  • Use the interactive arguments editor.
    technical_usernoEnter identification information for the system technical user or a second adminstrative contact person.
    Properties:
  • first_name
  • last_name
  • title
  • office_phone
  • mobile_phone
  • primary_email
  • secondary_email
  • address
  • city
  • state
  • zip
  • country
  • Use the interactive arguments editor.
    resellernoEnter identification information for the system reseller, if applicable.
    Properties:
  • company
  • first_name
  • last_name
  • title
  • office_phone
  • mobile_phone
  • Use the interactive arguments editor.
    physical_locationnoEnter the physical location of the system.
    Properties:
  • address
  • city
  • state
  • zip
  • country
  • contact_name
  • contact_phone_number
  • contact_email
  • Use the interactive arguments editor.
    primary_use_casenoEnter the primary use-case for the system.“primary_use_case”:"use1"
    other_primary_use_casenoEnter the another primary or a secondary use-case for the system.“primary_use_case”:"use2"

    Usage

    From the CLI prompt, enter:

    system truenas update_customer_information customer_information_update={“company”:"Name", “primary_use_case”:"use1", “other_primary_use_case”:"use2"}

    Where Name is the customer company, use1 is the primary use-case for the system, and use2 is the other primary or secondary use-case for the system.

    Command Example
    system truenas update_customer_information customer_information_update={"company":"iXsystems", "primary_use_case":"testing", "other_primary_use_case":"documentation"}
    +----------------+---------------------------+
    |             id | 1                         |
    |           data | <dict>                    |
    |     updated_at | 2023-08-29T17:21:24+00:00 |
    |        sent_at | <null>                    |
    | form_dismissed | false                     |
    | immutable_data | <null>                    |
    |   needs_update | false                     |
    +----------------+---------------------------+