Skip to content

Documentation

Getting protected, tuning the engine, and integrating with your own tooling.

1. Install

  • Invite the bot — the link requests the specific permissions each protection needs. Administrator is deliberately not among them.
  • Run /setup in your server. Default protection is applied immediately, and the bot reports any permission it is missing along with what stops working without it.
  • Run /security test to confirm configuration, roles and log channels are all usable.

2. Tune before you enforce

Turn on monitor-only mode for a day. Detection, scoring, incidents and alerts all run; nothing is punished. Then read the incidents: each one lists the exact signals that fired and how many points each contributed, which is what tells you whether your thresholds match your server’s normal traffic.

3. The two protection layers

Anti-raid (join time)

Every join is scored against both the account and the shape of the wave it arrived in: join rate over a sliding window, account-age distribution, username clustering with homoglyph and digit folding, missing avatars, invite attribution, rejoin cycling, prior incidents and cross-server reputation.

Anti-nuke (structural)

23 protected event types, each with its own limit, window, action and escalation. Risk also accumulates across event types, so an attacker who stays just under every individual limit still trips a threshold.

4. Bypasses

Discord Administrator does not bypass protection by default — only an explicit whitelist entry does. Keep the whitelist short, and scope entries to specific event types where you can. Every change to it is audited.

5. Commands

  • /setup, /dashboard, /config, /help
  • /security status | enable | disable | lockdown | unlock | test
  • /whitelist add | remove | list · /blacklist add | remove | check
  • /incident list | view | resolve · /logs
  • /panic — immediate lockdown · /verify — member verification
  • Right-click a member → Apps → Security lookup

6. Lockdown levels

  • Monitor only — alerting is raised, nothing on the server changes.
  • Soft — slowmode, new invites paused.
  • Verification — new members quarantined until they verify.
  • Hard — nobody can send messages; recent invites revoked.
  • Emergency — text and voice closed; verification at maximum.

The original permission state of every channel touched is saved before the change, so unlocking restores exactly what was changed and nothing else. Hard and emergency require typing the server name to confirm.

7. Snapshots and restore

Snapshots capture categories, channels, permission overwrites, roles and the server settings Discord lets a bot change. Restore is a two-step flow: build a plan, review every operation, then confirm. It never deletes resources that are absent from the snapshot.

What cannot be restored: message history in a deleted channel, member role assignments for people who have left, or audit log history. No bot can recover these — the Discord API does not expose them.

8. API

Create a scoped key under API keys in the dashboard. Authenticate with Authorization: Bearer sar_…. The key determines the server, so no endpoint takes a server ID.

  • GET /api/v1/server — protection state, open incidents, FiveM status.
  • GET /api/v1/incidents · PATCH /api/v1/incidents
  • GET /api/v1/blacklist?type=FIVEM_LICENSE&value=… — the endpoint your FiveM server calls on connect.
  • POST /api/v1/blacklist — add a local entry.

9. Webhooks

Every event is signed with X-Sentinel-Signature: t=<unix>,v1=<hmac>, computed as HMAC-SHA256 over "<t>.<raw body>". Reject anything with a timestamp outside a few minutes, and deduplicate on the eventId in the payload. Failed deliveries retry with exponential backoff and can be replayed by hand.

10. Self-hosting

The full deployment guide, environment reference and production checklist live in the repository: README.md and DEPLOYMENT_DOKPLOY.md. It ships as a single Docker image running the web panel, bot, worker and scheduler in one container, with external PostgreSQL and Redis.

Something unclear? Tell us — documentation gaps are bugs.

Documentation · Sentinel Anti-Raid