### Launch Console Setup Menu Source: https://github.com/truenas/documentation/blob/master/content/SCALE/GettingStarted/Install/ConsoleSetupMenuScale.md Execute this command to manually start the Console Setup menu from an SSH or web shell session. ```bash /usr/bin/cli --menu ``` -------------------------------- ### Launch TrueNAS VM for Installation Source: https://github.com/truenas/documentation/blob/master/content/Solutions/Integrations/AWSDeploy.md Starts the TrueNAS virtual machine for installation into the specified image file. Uses AHCI for CD-ROM and virtio for disk and network. ```bash bhyve -c 2 -m 4G -H -A -P -g 0 -s 0,hostbridge -s 1,lpc -s 2,virtio-net,tap0 -s 3,virtio-blk,{TRUENAS}.img -s 31,ahci-cd,{TRUENAS-VERSION}.iso -l com1,stdio vm0 ``` -------------------------------- ### Install and Start iSCSI Utilities on Linux Source: https://github.com/truenas/documentation/blob/master/content/SCALE/Shares/iSCSI/UsingISCSIShares.md Commands to install the open-iscsi utility and start the iscsid service on Ubuntu/Debian systems. ```bash sudo apt update && sudo apt install open-iscsi ``` ```bash sudo service iscsid start ``` -------------------------------- ### Install Democratic-CSI with Helm Source: https://github.com/truenas/documentation/blob/master/content/Solutions/Integrations/Containers.md Standard installation of the democratic-csi Helm chart. Ensure you have the correct values file for your setup. ```bash helm upgrade \ --install \ --values freenas-iscsi.yaml \ --namespace democratic-csi \ zfs-iscsi democratic-csi/democratic-csi ``` ```bash helm upgrade \ --install \ --values freenas-nfs.yaml \ --namespace democratic-csi \ zfs-nfs democratic-csi/democratic-csi ``` -------------------------------- ### Example Network General Summary Response Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Example output for the network.general.summary method showing current IP configuration. ```json { "ips": { "vtnet0": { "IPV4": [ "192.168.0.15/24" ] } }, "default_routes": [ "192.168.0.1" ], "nameservers": [ "192.168.0.1" ] } ``` -------------------------------- ### Install and Run Hugo Development Environment Source: https://context7.com/truenas/documentation/llms.txt Commands to install Hugo Extended v0.157.0 and start the local development server. ```bash # Install Hugo Extended v0.157.0 (required - standard Hugo will not work) # Windows (Chocolatey) choco install hugo-extended --version=0.157.0 # Windows (winget) winget install Hugo.Hugo.Extended --version 0.157.0 # Linux - download from GitHub releases wget https://github.com/gohugoio/hugo/releases/download/v0.157.0/hugo_extended_0.157.0_linux-amd64.tar.gz tar -xzf hugo_extended_0.157.0_linux-amd64.tar.gz sudo mv hugo /usr/local/bin/ # Clone the repository git clone https://github.com/truenas/documentation.git cd documentation # Start local development server hugo serve # Output shows the local URL (typically http://localhost:1313/) # Hugo auto-rebuilds on file changes ``` -------------------------------- ### Example: Short SMART Test on sda Source: https://github.com/truenas/documentation/blob/master/content/SCALE/Storage/Disks/DriveHealthManagement.md This is an example of how to run a short SMART test on the device named 'sda' using the `smartctl` command. ```bash smartctl -t short /dev/sda ``` -------------------------------- ### Example Values Source: https://github.com/truenas/documentation/blob/master/dev/style-guides/TrueNAS-Reference-Style-Guide.md Provide example values in italics or code format. ```markdown | Server Address | Enter the server IP address. Example: *192.168.1.100* | ``` ```markdown | Configuration Path | Specify the full path to configuration file. Example: `/mnt/pool1/config.conf` | ``` -------------------------------- ### Hugo Configuration Example Source: https://github.com/truenas/documentation/blob/master/layouts/shortcodes/pageinfo.html Example of a Hugo configuration object for version 1. ```go-html-template {{ $\_hugo\_config := `{ "version": 1 }` }} ``` -------------------------------- ### GET /app.query Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Query all installed applications with optional filters and configuration options. ```APIDOC ## GET /app.query ### Description Query all apps with `query-filters` and `query-options`. ### Method GET ### Endpoint /app.query ### Parameters #### Query Parameters - **query-options.extra.host_ip** (string) - Optional - Override portal IP address if it is a wildcard. - **query-options.extra.include_app_schema** (boolean) - Optional - Include app schema in the response. - **query-options.extra.retrieve_config** (boolean) - Optional - Retrieve app configuration used to install/manage app. ``` -------------------------------- ### Get All Multipaths Example Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Example of a request to get all multipaths and their consumers. Returns a list of multipath objects with their status and children. ```json { "id": "6841f242-840a-11e6-a437-00e04d680384", "msg": "method", "method": "multipath.query", "params": [] } ``` -------------------------------- ### POST /vm.start Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Starts a virtual machine. ```APIDOC ## POST /vm.start ### Description Starts a VM. If overcommit is false, the VM will not start if there is insufficient memory. ### Parameters #### Request Body - **id** (integer) - Required - The ID of the VM. - **options** (object) - Optional - Configuration options. - **overcommit** (boolean) - Optional - If true, VM starts even if there is not enough memory for all configured VMs. ``` -------------------------------- ### POST vm.start Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Starts a virtual machine with optional memory overcommit settings. ```APIDOC ## POST vm.start ### Description Start a VM. options.overcommit defaults to false, meaning VMs are not allowed to start if there is not enough available memory to hold all configured VMs. If true, VM starts even if there is not enough memory for all configured VMs. ### Parameters #### Request Body - **id** (integer) - Optional - The ID of the VM to start. - **options** (object) - Optional - Configuration options. - **overcommit** (boolean) - Optional - Whether to allow memory overcommit. ``` -------------------------------- ### POST vm.create Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Create a new Virtual Machine with specified hardware and boot configurations. ```APIDOC ## POST vm.create ### Description Creates a new Virtual Machine. Failure to attach a device destroys the VM and any resources allocated by the VM devices. ### Method POST ### Request Body - **name** (string) - Optional - VM name - **description** (string) - Optional - VM description - **vcpus** (integer) - Optional - Total number of CPU sockets - **cores** (integer) - Optional - Number of cores per socket - **threads** (integer) - Optional - Number of threads per core - **memory** (integer) - Optional - Memory in MB - **bootloader** (string) - Optional - Bootloader type (UEFI, UEFI_CSM, GRUB) - **grubconfig** (string/null) - Optional - Path or content for grub.cfg - **devices** (array) - Optional - List of virtualized hardware - **autostart** (boolean) - Optional - Whether to start on boot - **time** (string) - Optional - Time setting (LOCAL, UTC) - **shutdown_timeout** (integer) - Optional - Seconds to wait for clean shutdown ``` -------------------------------- ### Run Interactive Installer for TrueNAS Proxmox Plugin Source: https://github.com/truenas/documentation/blob/master/content/Solutions/Integrations/ProxmoxPlugin.md Execute the interactive installer script for a menu-driven setup, including configuration wizard, health checks, and validation. This installer supports both iSCSI and NVMe/TCP. ```bash bash <(curl -sSL https://raw.githubusercontent.com/truenas/truenas-proxmox-plugin/main/install.sh) ``` -------------------------------- ### Event Response Example: Core Get Jobs Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html An example of an event response for 'core.get_jobs', indicating a job has been registered and is waiting for execution, such as a failover reboot. ```json { "msg": "added", "collection": "core.get_jobs", "id": 26, "fields": { "id": 26, "method": "failover.reboot.other_node", "arguments": [], "logs_path": null, "logs_excerpt": null, "progress": {"percent": null, "description": null, "extra": null}, "result": null, "error": null, "exception": null, "exc_info": null, "state": "WAITING", "time_started": {"$date": 1571305262662}, "time_finished": null } } ``` -------------------------------- ### Run Release Notes Prep with Token Source: https://github.com/truenas/documentation/blob/master/scripts/release_notes/README.md Execute the prep command while providing the GitHub token directly at runtime. ```bash python release_notes.py prep --version 25.10.X --github-token ghp_xxxxxxxxxxxx ``` -------------------------------- ### GET docker.lacks_nvidia_drivers Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Checks if an NVIDIA GPU is present but the required drivers are not installed. ```APIDOC ## GET docker.lacks_nvidia_drivers ### Description Returns true if an NVIDIA GPU is present, but NVIDIA drivers are not installed. ### Response #### Success Response (200) - **lacks_nvidia_drivers** (boolean) - Indicates if drivers are missing. ``` -------------------------------- ### Run Individual Release Note Scripts Source: https://github.com/truenas/documentation/blob/master/scripts/release_notes/README.md Command-line examples for running the individual Python scripts used in the release notes generation process, with help flags. ```bash python process_jira_export.py --help ``` ```bash python generate_notable_changes.py --help ``` ```bash python update_version_notes.py --help ``` -------------------------------- ### Create a Virtual Machine Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Create a new virtual machine with specified parameters. Ensure all required fields like 'name' and 'memory' are provided. Optional parameters allow for detailed CPU, memory, and boot configuration. ```json { "command_line_args": "", "cpu_mode": "CUSTOM", "cpu_model": null, "name": "my_vm", "description": "", "vcpus": 1, "cores": 1, "threads": 1, "cpuset": null, "nodeset": null, "enable_cpu_topology_extension": false, "pin_vcpus": false, "suspend_on_snapshot": false, "trusted_platform_module": false, "memory": 1073741824, "min_memory": null, "hyperv_enlightenments": false, "bootloader": "UEFI", "bootloader_ovmf": "OVMF_CODE.fd", "autostart": true, "hide_from_msr": false } ``` -------------------------------- ### Load Virtualization Module and Create Interfaces Source: https://github.com/truenas/documentation/blob/master/content/Solutions/Integrations/AWSDeploy.md Loads the virtualization module and sets up tap and bridge interfaces required for bhyve. Ensure `re0` is your network interface. ```bash kldload -n vmm ifconfig tap0 create sysctl net.link.tap.up_on_open=1 ifconfig bridge0 create ifconfig bridge0 addm re0 addm tap0 ifconfig bridge0 up ``` -------------------------------- ### GET /vm/get_vm_memory_info Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Retrieves memory information for a specified VM if it is about to be started. All memory attributes are in bytes. ```APIDOC ## GET /vm/get_vm_memory_info ### Description Returns memory information for `vm_id` VM if it is going to be started. All memory attributes are expressed in bytes. ### Method GET ### Endpoint /vm/get_vm_memory_info ### Parameters #### Query Parameters - **vm_id** (integer) - Required - The ID of the virtual machine. ### Response #### Success Response (200) - **minimum_memory_requested** (integer) - Minimum memory requested by the VM. - **total_memory_requested** (integer) - Maximum / total memory requested by the VM. - **overcommit_required** (boolean) - Overcommit of memory is required to start VM. - **memory_req_fulfilled_after_overcommit** (boolean) - Memory requirements of VM are fulfilled if over-committing memory is specified. - **arc_to_shrink** (integer | null) - Size of ARC to shrink in bytes. - **current_arc_max** (integer) - Current size of max ARC in bytes. - **arc_min** (integer) - Minimum size of ARC in bytes. - **arc_max_after_shrink** (integer) - Size of max ARC in bytes after shrinking. - **actual_vm_requested_memory** (integer) - VM memory in bytes to consider when making calculations for available/required memory. If VM ballooning is specified for the VM, the minimum VM memory specified by user will be taken into account otherwise total VM memory requested will be taken into account. #### Response Example ```json { "minimum_memory_requested": 1073741824, "total_memory_requested": 2147483648, "overcommit_required": false, "memory_req_fulfilled_after_overcommit": false, "arc_to_shrink": null, "current_arc_max": 8589934592, "arc_min": 4294967296, "arc_max_after_shrink": 8589934592, "actual_vm_requested_memory": 2147483648 } ``` ``` -------------------------------- ### system.ready Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Checks if the system is ready for use. ```APIDOC ## GET system.ready ### Description Returns whether the system completed boot and is ready to use. ### Method GET ### Endpoint /api/v2.0/system/ready ### Response #### Success Response (200) - **system_ready** (boolean) - Indicates if the system is ready. ``` -------------------------------- ### GET user.has_local_administrator_set_up Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Checks if a local administrator with a valid password exists, typically used for initial system setup. ```APIDOC ## GET user.has_local_administrator_set_up ### Description Returns whether a local administrator with a valid password exists. This is used when the system is installed without a password and must be set on first use/login. ### Method GET ### Endpoint user.has_local_administrator_set_up ### Response #### Success Response (200) - **has_local_administrator_set_up** (boolean) - Indicates if a local administrator is configured. ``` -------------------------------- ### Get IP Addresses Schema Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Schema for filtering IP addresses from valid interfaces. Includes example return format. ```json { "type": "object", "properties": { "ipv4": { "type": "boolean" }, "ipv6": { "type": "boolean" }, "ipv6_link_local": { "type": "boolean" }, "loopback": { "type": "boolean" }, "any": { "type": "boolean" }, "static": { "type": "boolean" } }, "additionalProperties": false, "title": "ips", "default": {} } ``` ```json [ { "type": "INET6", "address": "fe80::5054:ff:fe16:4aac", "netmask": 64 }, { "type": "INET", "address": "192.168.122.148", "netmask": 24, "broadcast": "192.168.122.255" }, ] ``` -------------------------------- ### POST /vm/create Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Creates a new virtual machine instance with the specified configuration parameters. ```APIDOC ## POST /vm/create ### Description Creates a new virtual machine instance using the provided configuration arguments. ### Method POST ### Endpoint /vm/create ### Parameters #### Request Body - **name** (string) - Required - Name of the VM - **memory** (integer) - Required - Memory size - **command_line_args** (string) - Optional - Default: "" - **cpu_mode** (string) - Optional - Enum: ["CUSTOM", "HOST-MODEL", "HOST-PASSTHROUGH"] - **cpu_model** (string) - Optional - Default: null - **description** (string) - Optional - **vcpus** (integer) - Optional - Default: 1 - **cores** (integer) - Optional - Default: 1 - **threads** (integer) - Optional - Default: 1 - **cpuset** (string) - Optional - Default: null - **nodeset** (string) - Optional - Default: null - **enable_cpu_topology_extension** (boolean) - Optional - Default: false - **pin_vcpus** (boolean) - Optional - Default: false - **suspend_on_snapshot** (boolean) - Optional - Default: false - **trusted_platform_module** (boolean) - Optional - Default: false - **min_memory** (integer) - Optional - Default: null - **hyperv_enlightenments** (boolean) - Optional - Default: false - **bootloader** (string) - Optional - Enum: ["UEFI", "UEFI_CSM"] - **bootloader_ovmf** (string) - Optional - Default: "OVMF_CODE.fd" - **autostart** (boolean) - Optional ``` -------------------------------- ### Get Statistics Data Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Retrieves data points from RRD files. You can specify a list of statistics to fetch, along with optional `step`, `start`, and `end` parameters for filtering. ```json { "type": "array", "title": "stats_list", "items": [ { "type": "object" } ] } ``` ```json { "type": "object", "properties": { "step": { "type": "integer" }, "start": { "type": "string" }, "end": { "type": "string" } }, "additionalProperties": false, "title": "stats-filter", "default": {} } ``` -------------------------------- ### POST /boot.attach Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Attach a disk to the boot pool, turning a stripe into a mirror. ```APIDOC ## POST /boot.attach ### Description Attach a disk to the boot pool, turning a stripe into a mirror. This endpoint is a Job. ### Method POST ### Endpoint /boot.attach ### Parameters #### Request Body - **dev** (string) - Optional - The device to attach. - **options** (object) - Optional - Configuration options. - **expand** (boolean) - Optional - Whether the new disk partition will be the maximum available or the same size as the current disk. ``` -------------------------------- ### system.ready Event Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html This event is triggered when the system has finished its boot process. It can be subscribed to using a wildcard. ```APIDOC ## system.ready ### Description Finished boot process This event can be subscribed to with the wildcard `*` as the event name. #### Return Arguments ```json [ { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "object" }, { "type": "array" } ], "nullable": true, "_name_": "system.ready", "title": "system.ready", "_required_": false } ] ``` ``` -------------------------------- ### Get Reporting Data for a Graph Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Retrieve reporting data for a specific graph, such as 'nfsstat'. You can specify the time period using 'unit' and 'page' or 'start' and 'end'. The 'aggregate' option provides summary statistics. ```json { "id": "6841f242-840a-11e6-a437-00e04d680384", "msg": "method", "method": "reporting.get_data", "params": [ [{"name": "nfsstat"}], {"unit": "HOURLY"} ] } ``` -------------------------------- ### Get Stats Data (JSON) Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Retrieves data points from RRD files. This method accepts a list of stats to retrieve and optional filters for step, start, and end times. ```json { "method": "stats.get_data", "params": [ [ { "source": "cpu", "metric": "usage" } ], { "step": 60, "start": "now-1h", "end": "now" } ] } ``` -------------------------------- ### Initiate a Job via Websocket Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Initiates a job by sending a method call to the websocket endpoint. This example shows how to start a jail. The server responds with a `job_id` to track the job's progress. ```json { "id": "6841f242-840a-11e6-a437-00e04d680384", "msg": "method", "method": "jail.start", "params": ["jail_name"] } ``` -------------------------------- ### Script Help Source: https://github.com/truenas/documentation/blob/master/scripts/release_notes/README.md To view available options and usage instructions for any script, use the --help flag followed by the script name. ```bash ./script_name.py --help ``` -------------------------------- ### Apply Snapshot Controller Source: https://github.com/truenas/documentation/blob/master/content/Solutions/Integrations/Containers.md Install the snapshot controller. This is a one-time operation per cluster. Replace namespace references as needed. ```bash # replace namespace references to your liking kubectl apply -f rbac-snapshot-controller.yaml ``` ```bash kubectl apply -f setup-snapshot-controller.yaml ``` -------------------------------- ### Install Dependencies Source: https://github.com/truenas/documentation/blob/master/scripts/release_notes/QUICKSTART.md Install required Python packages from the requirements file. ```powershell cd scripts\release_notes pip install -r requirements.txt ``` ```bash cd scripts/release_notes pip install -r requirements.txt ``` -------------------------------- ### POST /app/start Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Start a specified application. This is a Job endpoint, refer to the Jobs section for details. This method is accessible to users with APPS_WRITE role. ```APIDOC ## POST /app/start ### Description Start `app_name` app. ### Method POST ### Endpoint /app/start ### Query Parameters - **app_name** (string) - Optional - The name of the application to start. ### Response This endpoint initiates a job. Please refer to the [Jobs](#jobs) section for details on monitoring job status and results. ``` -------------------------------- ### POST service.start Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Starts the specified service. ```APIDOC ## POST service.start ### Description Start the service specified by `service`. ### Method POST ### Endpoint service.start ### Parameters #### Request Body - **service** (string) - Optional - Start the service specified by `service`. - **ha_propagate** (boolean) - Optional - Default: true - **silent** (boolean) - Optional - Default: true. If true, returns false on failure; if false, raises exception on failure. ### Response #### Success Response (200) - **started_service** (boolean) - Result of the start operation. ``` -------------------------------- ### GET update.get_pending Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Gets a list of packages already downloaded and ready to be applied. ```APIDOC ## GET update.get_pending ### Description Gets a list of packages already downloaded and ready to be applied. ### Method GET ### Endpoint update.get_pending ### Parameters #### Query Parameters - **path** (string/null) - Optional - Path to check for pending updates. ``` -------------------------------- ### POST /vm.device.create Source: https://github.com/truenas/documentation/blob/master/static/api/core_websocket_api.html Creates a new device for a virtual machine. ```APIDOC ## POST /vm.device.create ### Description Create a new device for the VM of id vm. ### Parameters #### Request Body - **dtype** (string) - Required - Device type (NIC, DISK, CDROM, PCI, VNC, RAW). - **vm** (integer) - Required - The ID of the VM. - **attributes** (object) - Optional - Device specific attributes. - **order** (integer) - Optional - Device order. ``` -------------------------------- ### Retrieve NFS Statistics Example Source: https://github.com/truenas/documentation/blob/master/static/api/scale_websocket_api.html Example request to retrieve nfsstat graph data for the last hour. ```json { "id": "6841f242-840a-11e6-a437-00e04d680384", "msg": "method", "method": "reporting.get_data", "params": [ [{"name": "nfsstat"}], {"unit": "HOURLY"}, ] } ```