> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wardforge.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From zero to fully protected in under 30 seconds.

# Quickstart

<Steps>
  ### Invite WardForge to your server

  Click the button below and select your server. The bot requires the following permissions to
  function correctly — do **not** uncheck any of them.

  <a href="https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot+applications.commands" target="_blank">
    <img src="https://img.shields.io/badge/Add%20to%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" />
  </a>

  <Warning>
    WardForge needs **Administrator** permission at setup time to create roles and channels.
    Once setup is complete you can reduce permissions to the minimum required list (see
    [Minimal Permission Set](#minimal-permission-set) below).
  </Warning>

  ### Run `/setup`

  In any channel where WardForge can speak, type:

  ```
  /setup
  ```

  WardForge will automatically:

  1. Create a **`Guardian-Quarantine`** role (no permissions — restricts new accounts)
  2. Create a **`#guardian-logs`** private staff channel
  3. Configure multi-window raid detection thresholds
  4. Connect to phishing databases (PhishTank, Google Safe Browsing, VirusTotal)
  5. Enable the 24-hour account quarantine system

  The entire process takes less than 5 seconds.

  <Tip>
    Run `/guardian doctor` after setup to verify that every component is healthy and that the
    role hierarchy is correct.
  </Tip>

  ### Verify with `/guardian health`

  ```
  /guardian health
  ```

  You should see a **Security Score** above 80/100. If any module shows a warning, the doctor
  command will tell you exactly what to fix.
</Steps>

***

## What Happens Next (Automatically)

Once `/setup` completes, you don't need to do anything else. WardForge works silently in the
background:

| Event                                          | WardForge's Response                             |
| ---------------------------------------------- | ------------------------------------------------ |
| Member joins with account \< 24 h              | Quarantine role applied immediately              |
| Raid detected (multiple rapid joins)           | Lock triggered; suspicious members flagged       |
| Member posts a phishing link                   | Message deleted; member warned or banned         |
| Member submits `/report` with a confirmed link | Instant Global Ban across the network            |
| Admin deletes channels rapidly                 | Snapshot triggered; restore button sent to staff |

***

## Minimal Permission Set

After the initial setup, you can restrict WardForge's permissions to:

| Permission           | Why it's needed                                  |
| -------------------- | ------------------------------------------------ |
| Manage Roles         | Apply/remove quarantine role                     |
| Manage Channels      | Restore deleted channels from snapshots          |
| Ban Members          | Execute Global Ban when phishing is confirmed    |
| Kick Members         | Remove quarantined members who fail verification |
| View Channels        | Monitor all channels for phishing links          |
| Send Messages        | Post alerts and embeds                           |
| Embed Links          | Rich embed alerts                                |
| Read Message History | Scan recent messages on join                     |

<Note>
  **Administrator is only required during `/setup`** to create the initial role/channel
  structure. You can remove it immediately after.
</Note>

***

## Docker Self-Hosting (Optional)

If you prefer to host WardForge yourself:

```bash theme={null}
# 1. Clone the repository
git clone https://github.com/your-org/wardforge.git && cd wardforge

# 2. Configure environment
cp .env.example .env
nano .env   # Fill in DISCORD_TOKEN and DB_PASSWORD at minimum

# 3. Start all services
docker compose up -d

# 4. Check logs
docker compose logs -f guardian-bot
```

<Warning>
  Set a strong `REDIS_PASSWORD` and `DB_PASSWORD` in your `.env` before starting. The default
  values in `.env.example` are placeholders only.
</Warning>

The only ports exposed to the internet are **80** and **443** (Nginx). Everything else — the bot,
the dashboard, Redis, PostgreSQL — communicates on an isolated internal Docker network.
