> ## Documentation Index
> Fetch the complete documentation index at: https://nexohub.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bridge config

> plugins/NexoHubBridge/config.yml, on each Paper or Folia backend.

Two settings. Everything else comes from the proxy.

```yaml theme={null}
hub:
  address: "http://127.0.0.1:8085"
  secret: ""

server_name: auto
```

`address` is where this backend reaches the hub. Usually the proxy's internal address,
and it does not have to be one players can reach. If the proxy sets `http.api_address`,
point this at that port instead.

`secret` is copied from the proxy's `config.yml`. Get it wrong and the log says
`Hub rejected the request: wrong hub.secret in config.yml`.

`server_name` is this backend's name in your proxy's server list. Left on `auto` the
proxy tells it on the first player join and it is remembered.

<Warning>
  On its very first start with `auto` a backend does not know its own name yet, so it pulls
  nothing and warns. It catches up on the first player join. Set the name by hand if you
  need the first boot to be complete.
</Warning>

Nexo's `Pack.server.type` has to be `HUB`, and the bridge writes that for you on first
start. It writes it once, so setting it back by hand takes this backend out of the
network and the bridge leaves it alone from then on.

## Overriding the hub on one backend

Any [setting from the proxy](/reference/proxy-config#settings) can be written here too,
and then this backend uses your value instead.

```yaml theme={null}
sync:
  prune: false
```

Handy while testing something on one server. Worth remembering you did it, because a
change on the proxy will not reach a key you have set here. The backend lists them at
startup:

```
[NexoHubBridge] Settings come from the hub, except these, which this config.yml sets
itself: sync.prune. Delete a line to let the hub decide it.
```

<Note>
  A key only counts as yours once you change it. Upgrading adds new keys to your file at
  their defaults, and those are not treated as your opinion. Delete a line to hand it back.
</Note>

## Files the bridge writes

| Path | Contents |
| - | - |
| `config.yml` | this file |
| `.hubstate` | which bundle it last applied, its name, and what the hub last told it |

That is all a backend keeps, which is why retiring a server just means stopping it. The
settings are remembered so a backend that boots while the proxy is down keeps behaving
the way the network told it to.

<Note>
  The bridge runs on Folia as well as Paper with nothing extra to configure. Folia trails
  Paper by a release or two, so its Minecraft version is not always the newest one Nexo
  builds for. That is fine as long as your backends agree, and `/nexohub status` tells you
  if they do not.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.