# Configuration

BotStopper uses the Anubis policy engine. These guides cover the shared configuration and BotStopper additions.

## Policies and request handling

- [Policies](/docs/policies.md): rule matching, actions, metrics, storage, logging, honeypots, and request weight.
- [Expressions](/docs/configuration/expressions.md): CEL variables, operators, and rule examples.
- [Thresholds](/docs/configuration/thresholds.md): select actions and challenges from request weight.
- [Imports](/docs/configuration/import.md): combine shared rules and local policy files.
- [Client IP headers](/docs/configuration/client-ip.md): forwarded addresses and proxy configuration.
- [Default allow behavior](/docs/configuration/default-allow-behavior.md): how unmatched requests pass through the policy engine.

## Challenge methods

- [Fast](/docs/challenges/fast.md)
- [Argon2id](/docs/challenges/argon2id.md)
- [HashX](/docs/challenges/hashx.md)
- [preact](/docs/challenges/preact.md)
- [meta-refresh](/docs/challenges/meta-refresh.md)
- [soteria](/docs/challenges/soteria.md)

## Challenge extensions

- [CSS loading](/docs/extensions/css-load.md)
- [Headless browser detection](/docs/extensions/headless.md)

## Responses and integration

- [Custom status codes](/docs/configuration/custom-status-codes.md)
- [Open Graph passthrough](/docs/configuration/open-graph.md)
- [Redirect domains](/docs/configuration/redirect-domains.md)
- [Content Security Policy](/docs/configuration/content-security-policy.md)
- [Subrequest authentication](/docs/configuration/subrequest-auth.md)
- [Imprint and footer](/docs/configuration/impressum.md)

## Docker compose

Use the [Docker Compose guide](/docs/installation/docker-compose.md) with the following additional options:

```diff
   anubis:
     image: ghcr.io/techarohq/botstopper/anubis:latest
     environment:
       BIND: ":8080"
       DIFFICULTY: "4"
       METRICS_BIND: ":9090"
       SERVE_ROBOTS_TXT: "true"
       TARGET: "http://nginx"
       OG_PASSTHROUGH: "true"
       OG_EXPIRY_TIME: "24h"

+      # botstopper config here
+      CHALLENGE_TITLE: "Doing math for your connnection!"
+      ERROR_TITLE: "Something went wrong!"
+      OVERLAY_FOLDER: /assets
+    volumes:
+      - "./your_folder:/assets"
```

### Example

There is an example in [docker-compose.yaml](https://github.com/TecharoHQ/botstopper/blob/main/docker-compose.yaml). The repository is currently private, so that link works for team members. Start the example with `docker compose up`:

```text
docker compose up -d
```

And then open [https://botstopper.local.cetacean.club:8443](https://botstopper.local.cetacean.club:8443) in your browser.

NOTE: This uses locally signed sacrificial TLS certificates stored in `./demo/pki`. Your browser will rightly reject these. Here is what the example looks like:

See [customization](/docs/customization.md) for overlay folders and message titles.
See [headless browser detection](/docs/extensions/headless.md) and [the Soteria challenge](/docs/challenges/soteria.md) for challenge configuration.
