# Configuration
Chain generates a `config.yml` file in its plugin data folder on first startup. The configuration controls the maximum allowed distance between chained entities.
---
## config.yml
```yaml
#################################################################################
# This is the highest distance before the chain starts to pull the entity back. #
# Default is be 3 blocks, minimum is 2 blocks, maximum is 32. #
#################################################################################
max_distance: 3
```
| Key | Type | Default | Min | Max | Description |
|---|---|---|---|---|---|
| `max_distance` | Integer | `3` | `2` | `32` | The maximum distance in blocks between two chained entities before the chain begins pulling them back together. When entities exceed this distance, velocity is applied to bring them closer. When entities exceed approximately 2.5x this distance, the further entity is teleported directly. |
---
## Behavior Details
- The `max_distance` value is clamped to a minimum of 2 blocks at runtime, regardless of the value set in the config file.
- You can change the max distance at runtime using `/chain set_max_distance <value>`. This persists the change to the config file immediately.
- Run `/chain reload` to reload the config file from disk.
---
## Related Pages
- [[Chain/Server Owners/Overview]] — Plugin overview and installation
- [[Chain/Server Owners/Commands]] — Full command and permission listing