Skip to content

Installing bots on a host

Only whoever controls the host installs, updates, grants, enables, disables or removes a bot:

  • the operator, with zaun-host bot … on the host’s machine;
  • the community owner, from their app (when the host allows allow_remote_install).

No permission bit delegates this, not even ADMINISTRATOR.

These commands talk to the running host through its local control socket (<data dir>/control.sock, readable only by the host’s user).

Terminal window
zaun-host bot install --community <ID> weather-1.2.0.zbot

install prints what the bot asks for in plain words (each permission, “can read every message”, each internet host, storage) and asks you to confirm, unless you pass --yes. To grant less than it asks for:

Terminal window
zaun-host bot install --community <ID> --grant VIEW_CHANNEL,SEND_MESSAGES,timers,storage:1 weather.zbot

Capabilities by name: message_content, members, presence, timers, attachments, storage:<MiB>, network:<host>.

Then:

Terminal window
zaun-host bot list --community <ID>
zaun-host bot info --community <ID> <BOT>
zaun-host bot update --community <ID> <BOT> weather-1.3.0.zbot
zaun-host bot grant --community <ID> <BOT> --capabilities timers,storage:4
zaun-host bot disable --community <ID> <BOT>
zaun-host bot enable --community <ID> <BOT>
zaun-host bot remove --community <ID> <BOT>

The host’s [bots] configuration caps every grant on that host. For example, with allow_network = false no owner can give any bot internet access. See Configuring a host.

Installing announces the bot to every member, gives it a BOT badge, and makes its card readable by anyone. Updates that ask for more stay pending until the owner approves them.