Custom Commands
Custom commands let you add server-specific checks to the server detail page. Their output is collected whenever the App refreshes that server’s status.
Storage location
Section titled “Storage location”The commands live on each server, in
~/.config/server_box/custom_cmds. The App does not keep a local copy: the
editor loads the files from the server and writes changes back when you save.
You must be connected to the server to save edits. If it is unreachable, you can open the editor but not save. The App and Monitor use the same files, so edits in either one are immediately visible in the other.
Editing
Section titled “Editing”- Open the server’s edit page and select Custom commands → Edit.
- Add a command, change its name or shell text, or drag it to a new position.
- Save the changes to the server.
Each entry contains a display name and a shell command. The App uses the name as the output label on the server detail page.
The saved order is also the order used on the server detail page. Reorder commands in the editor to change how they appear.
Special name
Section titled “Special name”server_card_top_right
Section titled “server_card_top_right”The command named server_card_top_right is a special case. Its output is
shown in the top-right corner of the server card on the home page rather than
in the regular custom-command list.
Writing commands
Section titled “Writing commands”Use absolute paths:
/usr/local/bin/my-script.shPipes are supported:
ps aux | sort -rk 3 | head -5Format output:
uptime | awk -F'load average:' '{print $2}'Keep execution time short. Aim for less than one second because the command runs on every status refresh.
Limit output:
tail -20 /var/log/syslogSecurity
Section titled “Security”Commands run with the account used for the connection: the SSH user for SSH connections, or the Monitor process user for Monitor connections.
For Monitor connections, the request must use secure transport or explicitly permit
allow_insecure. Each file in this directory is executable code: it runs as
the Monitor user on every status refresh.
Use read-only commands where possible. A command can affect the server with the permissions of its execution account. Never include passwords, tokens, or other credentials in a command.
Legacy command storage
Section titled “Legacy command storage”Older releases stored commands in server settings; the App preserves those
entries until the first connection, then moves them to
~/.config/server_box/custom_cmds. Current releases read and write commands
only in that directory.