CLI commands
Everything the TUI does, as one-line commands.
Run sudo hostable with no arguments for the interactive TUI. With a command it runs once and exits, so it works in scripts, SSH one-liners and cron.
Server arguments take the server name or id ("Friends SMP" or friends-smp).
<game> is minecraft, ark or palworld.
create
hostable create <game> <name> --accept-license
[--server-type vanilla|paper|fabric] Minecraft only
[--version 1.20.4]
[--memory-mb 4096]
[--join-password ...] Palworld / ARK
[--dry-run]Global options
--daemon-url <URL> default http://127.0.0.1:8080
--operator-token <PATH> default /etc/hostable/operator-tokenExit codes
0 on success. Anything else prints the daemon's error message, for example 2 player(s) are online. Ask them to leave, or repeat with force=true to interrupt them.
Scripting examples
Nightly backup of every server:
/etc/cron.d/hostable-backup
0 4 * * * root for s in $(hostable list | awk '{print $1}'); do hostable backup "$s"; doneAnnounce, then restart when empty:
hostable console friends-smp "say Server restarts in 5 minutes"
sleep 300 && hostable restart friends-smp