# Configuration<no value>

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `RELAY_LISTEN_ADDR` | `0.0.0.0` | API server bind address |
| `RELAY_PORT` | `43321` | P2P relay port |
| `RELAY_API_PORT` | `3000` | API server port |
| `RELAY_DATA_DIR` | `./data` | Data directory |
| `RELAY_ANONYMITY` | `partial` | Anonymity level: none, partial, blind, multi-hop |
| `RELAY_DISABLE` | `` | Comma-separated modules to disable: guestbook, security, instances |
| `RELAY_PEERS` | `` | Comma-separated peer relay URLs |
| `RELAY_NODE_URL` | `` | Public URL of this relay (advertised to peers) |
| `RELAY_SYNC_INTERVAL_SECS` | `120` | Gossip sync interval |
| `DATABASE_URL` | `` | MySQL connection string (empty = in-memory only) |
| `RUST_LOG` | `info` | Log level: error, warn, info, debug, trace |

## Feature Toggles

Disable specific modules at startup:

```bash
docker run -e RELAY_DISABLE=guestbook,security ...
```

Available modules: `instances`, `guestbook`, `security`. The health endpoint is always available.

## Configuration File

Relay also reads from `config.json` in the data directory. This file is auto-created on first run with default values.
