Anubis module for Caddy
1# `caddy-anubis`
2
3You can add caddy-anubis to your server using xcaddy:
4
5```
6xcaddy build \
7 --with tangled.sh/kot.pink/caddy-anubis \
8 --replace github.com/TecharoHQ/anubis=github.com/kotx/anubis-static@v1.23.1
9 # ...any other plugins
10```
11
12## Example config
13
14```Caddyfile
15localhost {
16 @anubis {
17 # This matcher allows you to select specific paths for Anubis to handle.
18 # If you want to handle all paths, remove this block and use `anubis {...}` instead!
19 path / # don't let AI scrapers browse the file index
20 path /.within.website/* # required for anubis to work
21
22 not path /api/* # exclude api routes from anubis
23 }
24
25 log http.handlers.anubis {
26 level DEBUG # optionally set log level
27 }
28
29 anubis @anubis {
30 # This setting gets overridden a lot by the default bot policy.
31 difficulty 4
32
33 # Custom bot policy file
34 policy_fname botPolicies.yaml
35
36 private_key {$ED25519_PRIVATE_KEY} # for challenge persistence across restarts
37 # or if you're running multiple anubis instances
38 }
39
40 file_server browse
41}
42```