HF PanelDocsv1.0.0

Plugins & hooks

Install and enable plugins, send events to your systems with signed webhooks, and see the server's script hooks.

On the Plugins & hooks screen you add features to the panel with plugins, send events (a new account, a removed domain, a finished backup …) to your own systems with webhooks, and check the script hooks on the server. The screen has four tabs: Plugins, Webhooks, Script hooks and Events.

Where: Server Admin › System › Plugins & hooks

Warning: plugins run as root through their hooks. Only install plugins from people you trust: there is no signature check.

Plugins

The Installed plugins card lists each plugin with its name, description, author, version, the events it hooks, and its status: Enabled, Disabled or Cannot be used (the reason is shown under its name).

Install a plugin

  1. In the Install a plugin card, choose the plugin's .zip file.
  2. Click Install plugin. The file is checked first; a plugin that breaks a rule is refused with the reason.
  3. Click Enable next to the plugin and confirm.

A new plugin stays switched off until you enable it. Installing a plugin that is already there replaces it with the new version and keeps it enabled when it was.

Enable, disable or remove a plugin

Button What it does
Enable switches the plugin on: its menu entries appear for their roles and its hooks run
Disable switches it off: its menu entries go and its hooks stop; its files stay
Remove deletes the plugin's files and switches it off

You can do the same on the server with hf-panel plugin (see Plugins).

Webhooks

A webhook sends the events you choose to an https:// address of yours, signed with its own secret.

Add a webhook

  1. Click the Webhooks tab.
  2. Enter the Address (https://) and tick the Events (or click All events). Keep On ticked.
  3. Click Add webhook. The signing secret is shown once in the message at the top.
Button What it does
Send test sends a test event to the webhook now and says whether it arrived
Edit change the address, the events or On in the form above, then click Save webhook
Show secret shows the signing secret in the webhook's row, with a copy button
New secret makes a new signing secret; the old one stops working at once
Delete deletes the webhook and its deliveries

The address must be public: private and local addresses are refused. A failed delivery is tried again 3 times (after 10 seconds, 1 minute and 5 minutes).

Follow the deliveries

The Deliveries card shows the last 100 deliveries: when, the event, the address, the status (sent, retry or failed), the attempts, and the answer's status code and time, with the reason when it failed.

Script hooks

The Script hooks tab shows the programs the server's root user put in /etc/hostfog/hooks/<event>.d/, with whether each one runs. It is read-only: script hooks are added on the server (see Event hooks). Below, Plugins' hooks lists the hooks of the installed plugins, and Hooks log shows the end of /var/log/hostfog-hooks.log: each run, its exit status and its output.

Events

The Events tab lists every event with an example of the JSON it is sent as. Click an event to see its example.

Every change on this screen, and every time a secret is shown, is written to the Activity log.