Using Inspector
Inspector watches the Docker containers you pick, restarts them when they break, and pings your phone when something goes wrong or recovers. Everything is set from this web dashboard; you never need to touch a config file.
1. First login
When Inspector starts for the first time it creates its config file and a dashboard login.
- If you set
INSPECTOR_PASSWORDin the Portainer stack, sign in withadmin(or yourINSPECTOR_USERNAME) and that password. - If you didn't, Inspector generated a password. In Portainer open Containers → inspector → Logs. Near the top you'll see a box labeled Inspector dashboard login with the username and password.
- Open
http://<your-server>:8080and sign in. - Change the password under Settings → Dashboard if you like.
2. Add your containers
Inspector only watches containers you add. Go to Settings and click + Add container at the bottom of the left menu (or + New container on the All containers page).
- name: the container's name exactly as Portainer shows it
(for example
sonarr). If it doesn't match, the card shows CONTAINER NOT FOUND. - Leave enabled on.
- Under Restart when status is… click Recommended
(restarts on
UNHEALTHYandNOT RUNNING), or Observe only if you just want alerts without restarts. - Click Create container. Inspector starts watching it on its next check (within a minute by default). No restart needed.
What the numbers mean
| Field | Meaning | Default |
|---|---|---|
| max_error_count | How many bad checks in a row before Inspector restarts the container. Stops one blip from causing a restart. | 5 |
| cooldown_seconds | Minimum time between two restarts of the same container. | 300 |
| grace_period_seconds | After a restart, ignore failures for this long so the app can boot. | 120 |
| max_restarts_per_hour | Safety cap. After this many restarts in an hour Inspector stops restarting and alerts you instead. | 3 |
| maintenance_window | Follow the daily maintenance window from Settings → Maintenance. | off |
| color | Card color on the dashboard. Pick a swatch or leave blank for automatic. | auto |
max_error_count 5, a
container has to be broken for about five minutes before Inspector restarts it. Lower the count
for faster recovery.3. The Status page
The top row counts containers, healthy ones, ones with issues, and ones in maintenance. Each card shows:
- Status badge: what Docker reports right now, e.g. HEALTHY NOT RUNNING NO HEALTH CHECK (the image has no health check; that's normal for many apps and only means Inspector can tell running from stopped, not healthy from unhealthy).
- Errors bar: bad checks in a row out of
max_error_count. When it fills, Inspector restarts the container. - Cooldown until / Last restart: when Inspector last restarted it and when it's allowed to again.
- Observe only: shown when the container has no restart triggers; Inspector alerts but never restarts it.
- Enter maintenance: pause Inspector for that container while you work on it (updates, migrations). Click again to exit.
- Mute notifications: keep watching and restarting, but stop alerts for a while (12 hours by default).
The page refreshes itself every 30 seconds.
4. Notifications
Inspector can alert you through Gotify, Pushover, or both. Set them up under Settings → Notifications.
- Turn on enabled for the channel you use.
- Gotify: enter your server URL and an application token (create one in Gotify under Apps). Pushover: enter your application API token and your user key.
- Click Send test. You should get a message on your phone within seconds. If it fails, the reason appears next to the button.
- Click Save, then restart Inspector once (see section 8), because turning a channel on or off is a "requires restart" field.
You'll get one alert when a container first fails, when Inspector restarts it, and when it recovers. You won't get one on every check.
5. Managing containers
Settings → All containers shows every watched container as a tile. Click a tile (or a name in the left menu) to edit it.
Changes apply on the next check. Delete container stops Inspector watching it; it does not touch the container itself.
Restart triggers
| Status | When it happens |
|---|---|
| UNHEALTHY | The container's own health check is failing. |
| NOT RUNNING | Stopped, exited, or crashed. |
| UNREACHABLE | Running, but its HTTP check or Uptime Kuma monitor says it's down (see below). |
| ERROR | Inspector couldn't check it (Docker API error). |
| STARTING | Still in its health-check start period. Usually leave this off. |
| HEALTHY / NO HEALTH CHECK | Normal states; almost never a reason to restart. |
Reachability: catching apps that look fine but aren't
Docker only knows whether a container is running and whether its own health check passes. An app can pass both and still be unusable, for example when it routes through a VPN container whose tunnel dropped. Under Reachability on the container page you can add:
- HTTP check: a URL Inspector requests every check (for example
http://192.168.1.10:9696/ping). Set expected_status to the code the app returns when it's healthy; most return 200, some return 401 or 302. - Uptime Kuma monitor: if you already run Uptime Kuma, name one of its monitors. Set up the connection first in Settings → Uptime Kuma; Test connection lists the monitor names it can see.
A failed check reports UNREACHABLE. Tick UNREACHABLE in the restart triggers if you want Inspector to act on it.
Apps behind a VPN container
If an app shares a VPN container's network (network_mode: container:vpn or similar), set these on the app's page:
- Dependencies → depends_on: pick the VPN container, and turn on vpn_routed. Inspector checks the VPN first and waits for it to recover before touching the app.
- Recovery → recovery_action: choose Restart, then redeploy stack if that fails and enter the stack name exactly as Portainer shows it. When the VPN container gets recreated, a plain restart of the app fails; redeploying the stack reconnects it.
Stack redeploys need the Portainer connection in Settings → Portainer:
- In Portainer, open My account → Access tokens and create a token.
- Easiest and safest: add it to the Inspector stack as an environment variable (for example
PORTAINER_API_TOKEN) and redeploy Inspector. Or choose Saved in config.yml and paste it in. - In Settings → Portainer, add an environment with Portainer's URL and endpoint ID (usually 1 or 2; it's the number in the URL when you open the environment in Portainer). Click Test connection: it should list your stacks.
- Turn Portainer on and save.
6. Events history
The Events tab is a day-by-day timeline of failures, restarts, recoveries, mutes, and maintenance. Use Prev day / Next day to look back.
7. Other settings
| Section | What it's for |
|---|---|
| Inspector loop | interval_seconds: how often to check (60 is fine). dry_run: log and alert but never actually restart; handy while you're trying it out. |
| Dashboard | Login username and password for this web UI. |
| Event history | How many days of events to keep. |
| Health summary | A periodic digest (e.g. daily) of what happened, sent through your notification channels. |
| Maintenance | A daily quiet window (e.g. 02:00–05:00) so nightly backups or updates don't trigger restarts. Turn on maintenance_window on each container that should follow it. |
| Notification mute | Turns the per-container Mute notifications buttons on or off, and sets how long a mute lasts. |
| Uptime Kuma | Connection to your Uptime Kuma status page, used by container reachability checks. |
| Portainer | Connection to Portainer, used to redeploy stacks. See Apps behind a VPN container. |
At the bottom of every settings page is a strip showing where the config file lives and whether Inspector can write to it.
8. "Requires restart" fields
Most changes apply on the next check. Fields marked REQUIRES RESTART (like turning a notification channel or the dashboard on or off) only take effect after Inspector restarts:
- In Portainer go to Containers.
- Tick inspector and click Restart.
Your settings and history are kept; they live in the folders mounted into the container.
9. Troubleshooting
| Problem | Fix |
|---|---|
| Red READ-ONLY badge at the bottom of Settings | Inspector can't save changes. In the stack, make sure the config folder mount does not end in
:ro, then update the stack. |
| A card says CONTAINER NOT FOUND | The name doesn't match a container. Check the exact name in Portainer → Containers, delete the entry and add it again with the right name. |
| Logs say Permission denied on /var/run/docker.sock | Remove any user: line from the stack so Inspector starts normally (it detects the
socket permissions itself), then update the stack. |
| Send test fails | The message next to the button says why: wrong URL, wrong token (HTTP 401), or the server can't be reached from your Docker host. |
| Forgot the dashboard password | Open config.yml in the stack's config folder (e.g. through your Unraid share),
set dashboard: password: to something new, and restart Inspector. |
| No alerts arrive | Check the channel is enabled, Send test works, Inspector was restarted after enabling it, and the container isn't muted or in maintenance. |