# What attackfee.yaml configures

The Node issuer reads `attackfee.yaml`. A complete example lives in the repo as `attackfee.example.yaml`. Copy that file, set `ATTACKFEE_SECRET` in the environment, and start with the site id, the public issuer URL, and the routes you want to check.

`site_id` is required. `secret` must be at least 16 characters. The example points at the environment with `secret: env:ATTACKFEE_SECRET`. Do not commit the secret. `issuer_public_url` is the public origin of the issuer, for example `http://localhost:8787`. `allowed_origins` defaults to that origin if you leave it out.

The `defaults` block sets how long a work pass lasts. The example and the Node defaults are 15 minutes (`pass_ttl_s: 900`) or 20 actions (`pass_uses: 20`), whichever comes first. `challenge_ttl_s` is at most 120 seconds. `max_solve_ms` defaults to 8000, and the page script should use the same number as `data-max-solve-ms`.

`work.mode` is `standard` or `hardened`. Standard is the default. Hardened is the memory-hard path. `rate_limit.challenge_per_min` defaults to 60 challenges per minute per network address. `cookie.secure` defaults to `auto`, which sets the Secure flag when the request is HTTPS.

Map routes by prefix and class. The example keeps `/` as `read` so page views stay free, and marks `/contact` as `write`. A route may set `cost: 0` to leave that route free. Any other `cost` value is refused. Page-view gating stays off unless you also set `confirm_page_view_gating: true`, which you should not do.

The `settlement` section is off in the example (`enabled: false`). A self-hosted issuer uses a stub backend by default. This build accepts only that stub backend. People never pay money.

Trusted proxies are not a YAML key. List them in the `ATTACKFEE_TRUSTED_PROXIES` environment variable.

## Where Attackfee fits

This file is the Node issuer config. See the [server docs](/docs/server), [How to mark which routes are writes](/learn/concepts/how-to-mark-routes), and [How to run the Node server and Express middleware](/learn/concepts/node-server-and-express).

- [Attackfee](/)
- [Learn](/learn)
- [Concepts](/learn/concepts)
- [What attackfee.yaml configures](/learn/concepts/what-attackfee-yaml-configures)

## Related

- [How to run the Node server and Express middleware](/learn/concepts/node-server-and-express)
- [How to mark which routes are writes](/learn/concepts/how-to-mark-routes)
- [How to set trusted proxies](/learn/concepts/how-to-set-trusted-proxies)
- [When to turn on memory-hard work](/learn/concepts/memory-hard-mode)
- [Why page-view gating should stay off](/learn/limits/why-page-view-gating-should-stay-off)
- [Server](/docs/server)
- [Self-hosting](/docs/self-hosting)

## Questions



### "Where does the secret live?"

"In the environment. The example file uses secret: env:ATTACKFEE_SECRET. The secret must be at least 16 characters. Do not commit it."

### "What is the self-hosted payment backend?"

"A stub backend by default. settlement.enabled is off in the example. This build accepts only the stub backend."

### "Do I have to copy every key?"

"No. Start from the example file in the repo, set the site id, secret, public URL, and routes, and leave the rest at their defaults until you have a reason to change them."

### "Can a route cost be any number?"

"No. A route can omit cost and use the class default, or set cost: 0 to leave that route free. Other cost values are refused."
