CLI Commands¶
This page provides a comprehensive reference for all commands available in the Unraid API CLI.
General Commands¶
unraid-cli info
¶
Display information about the connected Unraid server.
Usage:
Output Example:
Unraid Server Information
-------------------------
Server: MyUnraidServer
Version: 6.10.3
OS: Unraid OS
IP Address: 192.168.1.10
Uptime: 15 days, 7 hours, 23 minutes
CPU: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz (16 cores)
Memory: 32GB (75% used)
unraid-cli status
¶
Display the current status of the Unraid server, including array status, CPU load, memory usage, and network status.
Usage:
Options: * --json
: Output in JSON format * --compact
: Display compact status view
unraid-cli version
¶
Display the version of the Unraid API CLI.
Usage:
Array Commands¶
unraid-cli array list
¶
List all disks in the array.
Usage:
Options: * --json
: Output in JSON format * --filter STATUS
: Filter by disk status (active, disabled, etc.)
Example:
unraid-cli array status
¶
Show the current status of the array.
Usage:
Output Example:
Array Status
------------
Status: Normal
Protection Mode: Parity
Size: 40 TB
Used: 25 TB (62.5%)
Free: 15 TB (37.5%)
unraid-cli array start
¶
Start the array.
Usage:
unraid-cli array stop
¶
Stop the array.
Usage:
Options: * --force
: Force array stop even if devices are busy
unraid-cli parity check
¶
Start a parity check.
Usage:
Options: * --status
: Check current parity check status * --stop
: Stop current parity check * --correcting
: Start a correcting parity check
Docker Commands¶
unraid-cli docker list
¶
List all Docker containers.
Usage:
Options: * --all
: Show all containers (including stopped) * --running
: Show only running containers * --json
: Output in JSON format
Example:
unraid-cli docker start
¶
Start a Docker container.
Usage:
Example:
unraid-cli docker stop
¶
Stop a Docker container.
Usage:
Options: * --timeout SECONDS
: Timeout in seconds before forcing stop (default: 10)
unraid-cli docker restart
¶
Restart a Docker container.
Usage:
unraid-cli docker logs
¶
View logs from a Docker container.
Usage:
Options: * --tail N
: Show last N lines (default: all) * --follow
: Follow log output * --timestamps
: Show timestamps
Example:
unraid-cli docker stats
¶
Display resource usage statistics for Docker containers.
Usage:
Options: * --json
: Output in JSON format * --no-stream
: Display current statistics only, do not stream
VM Commands¶
unraid-cli vm list
¶
List all virtual machines.
Usage:
Options: * --all
: Show all VMs (including stopped) * --running
: Show only running VMs * --json
: Output in JSON format
unraid-cli vm start
¶
Start a virtual machine.
Usage:
unraid-cli vm stop
¶
Stop a virtual machine.
Usage:
Options: * --force
: Force VM to stop (hard power off)
unraid-cli vm restart
¶
Restart a virtual machine.
Usage:
Options: * --force
: Force restart (hard reset)
unraid-cli vm info
¶
Display detailed information about a virtual machine.
Usage:
System Commands¶
unraid-cli system reboot
¶
Reboot the Unraid server.
Usage:
Options: * --force
: Force reboot without confirmation * --delayed MINUTES
: Schedule reboot after specified minutes
unraid-cli system shutdown
¶
Shutdown the Unraid server.
Usage:
Options: * --force
: Force shutdown without confirmation * --delayed MINUTES
: Schedule shutdown after specified minutes
unraid-cli system stats
¶
Display system resource usage statistics.
Usage:
Options: * --json
: Output in JSON format * --watch SECONDS
: Update every SECONDS (like top) * --cpu
: Show only CPU statistics * --memory
: Show only memory statistics * --network
: Show only network statistics
Example:
User Commands¶
unraid-cli user list
¶
List all users.
Usage:
unraid-cli user create
¶
Create a new user.
Usage:
Options: * --password PASSWORD
: Set user password * --role ROLE
: Set user role (admin, user, etc.) * --description DESC
: Set user description
unraid-cli user delete
¶
Delete a user.
Usage:
unraid-cli user password
¶
Change a user's password.
Usage:
Notification Commands¶
unraid-cli notification list
¶
List all notifications.
Usage:
Options: * --all
: Include archived notifications * --json
: Output in JSON format
unraid-cli notification create
¶
Create a new notification.
Usage:
Options: * --title TITLE
: Notification title * --message MESSAGE
: Notification message * --importance LEVEL
: Importance level (normal, warning, alert) * --icon ICON
: Icon name * --link URL
: Action link
Example:
unraid-cli notification create --title "Backup Complete" --message "Weekly backup finished successfully" --importance normal
unraid-cli notification archive
¶
Archive a notification.
Usage:
unraid-cli notification delete
¶
Delete a notification.
Usage:
Configuration Commands¶
unraid-cli config get
¶
Get a configuration value.
Usage:
Example:
unraid-cli config set
¶
Set a configuration value.
Usage:
Example:
unraid-cli config list
¶
List all configuration values.
Usage:
Example:
Advanced Commands¶
unraid-cli exec
¶
Execute a command on the Unraid server.
Usage:
Example:
Warning
This command requires administrator privileges and should be used with caution.
unraid-cli monitor
¶
Monitor Unraid server in real-time.
Usage:
Options: * --interval SECONDS
: Update interval in seconds (default: 2) * --resources
: Monitor system resources * --array
: Monitor array status * --docker
: Monitor Docker containers * --vm
: Monitor virtual machines
Example: