# Self-host Anubis

> A reverse proxy that makes clients pass a small proof of work before reaching your site, which blocks most scraper bots. Sits in front of one upstream you choose. The signing key is generated for you.

- Page: https://levelrail.com/templates/anubis/
- JSON: https://levelrail.com/templates/anubis.json
- Category: Security
- Licence: MIT (Permissive license)
- Source: https://github.com/TecharoHQ/anubis
- Upstream docs: https://anubis.techaro.lol/

## Requirements
- Memory: about 64 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: yes
- Pinned image tag: v1.28.2

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| anubis | ghcr.io/techarohq/anubis | v1.28.2 | 8923 | none |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| anubis | BIND | preset |
| anubis | DIFFICULTY | preset |
| anubis | ED25519_PRIVATE_KEY_HEX | generated |
| anubis | METRICS_BIND | preset |
| anubis | TARGET | required |

## Deploy

### CLI

```bash
levelrail-cli templates install anubis --name my-anubis --env ANUBIS_TARGET=VALUE
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain anubis=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/anubis/install \
  -d '{
    "name": "my-anubis",
    "env": { "ANUBIS_TARGET": "VALUE" }
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Point a domain at this address. Requests that pass the challenge are forwarded to the upstream URL you entered.

## Questions

### Can I deploy Anubis on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id anubis for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image ghcr.io/techarohq/anubis:v1.28.2 is what you deploy there.

Self-host Anubis, Anubis docker compose file, deploy Anubis on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
