> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-admin/resource-protection/installing-the-watchdog.md).

# Installing the Watchdog

Rename it, name the two resources, and start it before the panel.

{% stepper %}
{% step %}

### Rename the folder

It ships as `mango_watchdogs`. **Deploy it as something else** — `mango_core_91`, `cfx_scheduler`, whatever suits your server.

This is security through obscurity and nothing more, which is exactly why it is worth doing: somebody who has just stopped your admin menu should not be able to read down the resource list and see what to stop next.
{% endstep %}

{% step %}

### Name it

In its `config.lua`:

{% code title="mango\_watchdogs/config.lua" %}

```lua
Config.WatchdogResource = 'mango_core_91'   -- what you just renamed the folder to
```

{% endcode %}

The folder name is the truth; the config entry is checked against it at start and warns if they disagree. What it guards is fixed at `mango_admin` and has no setting at all.
{% endstep %}

{% step %}

### Start it first

```cfg
ensure mango_core_91
ensure mango_admin
```

{% endstep %}

{% step %}

### Optionally tell the panel its name

In the panel's config, beside the honeypots:

{% code title="shared/config/security.lua" %}

```lua
Config.Protection = {
    watchdog      = 'mango_core_91',
    guardWatchdog = true,
}
```

{% endcode %}

Not required — the guard announces itself when it starts, and the panel checks that announcement against the server's own record of who is calling, so a resource can only ever register itself. Setting it lets the panel **start** the guard if the panel boots while the guard is not running at all.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
**After adding or removing any file in either resource, run `refresh` before `restart`.** FXServer caches which files a resource has when it *scans* it, so a plain restart re-reads the files it already knew about and silently ignores new ones. If a module did not load for that reason the guard says so on startup and switches that feature off rather than failing.
{% endhint %}

## Before you go live

{% code title="mango\_watchdogs/config.lua" %}

```lua
Config.Recovery.DelaySeconds = 0
```

{% endcode %}

This holds off the restart so there is a window to test things by hand. **Set it to `0` on a live server** — every second of it is a second the panel is not protecting anything.
