> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/bridgeserver/bridgeserver-ini.md).

# BridgeServer.ini

Ports, shared key, Discord webhook, game database access and license for BridgeServer

Every BridgeServer setting lives in one INI section.

## File Location

```
BridgeServer/BridgeServer.ini
```

Read once at startup. Restart BridgeServer after any change.

## Full File

```ini
[BridgeServerInfo]
IngestPortTCP = 55980
HttpPort = 55981
MaxIpConnection = 10
SharedKey =
DiscordWebhookUrl =
DiscordRelayAll = 1
MuDbODBC = MuOnline
MuDbRefreshSeconds = 60
LicenseKey = PUT-YOUR-LICENSE-KEY-HERE
```

## Settings

| Key                  | Type                    | Default     | Effect                                                                                                                                                                                                                                                 |
| -------------------- | ----------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `IngestPortTCP`      | port                    | `55980`     | Where GameServers push events. Must match `Port` in the [Bridge plugin config](/docs/data/plugins/bridge.md). **Keep this private**                                                                                                                    |
| `HttpPort`           | port                    | `55981`     | The read-only [HTTP API](/docs/bridgeserver/api.md) for your website, bots and dashboards                                                                                                                                                              |
| `MaxIpConnection`    | int                     | `0`         | Maximum simultaneous ingest connections per source IP. `0` **blocks every ingest connection** - never use it. The shipped template uses `10`; if the key is missing from the file the parser also defaults to `0` and no GameServer can publish events |
| `SharedKey`          | string (up to 32 chars) | empty       | Key a GameServer must present to publish events. Empty = accept any GameServer, which is fine on localhost and nowhere else                                                                                                                            |
| `DiscordWebhookUrl`  | URL                     | empty       | Discord webhook for the built-in announce relay. Empty = relay disabled                                                                                                                                                                                |
| `DiscordRelayAll`    | 0/1                     | `0`         | `1` = mirror **every** event to the webhook (demonstration mode). `0` = announcement-worthy events only. The shipped template sets `1`; if the key is missing the server uses `0`                                                                      |
| `MuDbODBC`           | DSN name                | empty       | ODBC data source for the game database, used for rankings and profiles. Empty = those endpoints return 503                                                                                                                                             |
| `MuDbUSER`           | string                  | empty       | SQL username, only for data sources that are not using Windows authentication                                                                                                                                                                          |
| `MuDbPASS`           | string                  | empty       | SQL password, only for data sources that are not using Windows authentication                                                                                                                                                                          |
| `MuDbRefreshSeconds` | int                     | `60`        | How often ranking caches are rebuilt from the database                                                                                                                                                                                                 |
| `LicenseKey`         | string                  | -           | The same license key as your other AXIOM servers                                                                                                                                                                                                       |
| `ControlPort`        | port                    | `55994`     | Port the [Axiom Server Manager](/docs/guides/launch-server.md) connects to. `0` = control channel off                                                                                                                                                  |
| `ControlKey`         | string                  | empty       | Key the Server Manager must present. Empty = no key, only safe while `ControlBind` is `127.0.0.1`                                                                                                                                                      |
| `ControlBind`        | IP                      | `127.0.0.1` | Address the control channel listens on. `0.0.0.0` lets a Server Manager on another machine connect - set a `ControlKey` first                                                                                                                          |
| `ControlInstance`    | string                  | empty       | Optional label for this instance, shown to the Server Manager when you run more than one                                                                                                                                                               |

The four `Control*` keys are not in the shipped template. Add them under `[BridgeServerInfo]` only when you need to change the defaults.

## Database Access

`MuDbODBC` follows the same pattern as `DataServerODBC` in [DataServer.ini](/docs/dataserver/dataserver-ini.md): create a System DSN on the machine running BridgeServer and name it here. Authentication normally comes from the data source itself (Windows authentication), which is why `MuDbUSER` and `MuDbPASS` are usually left empty.

Access is read-only. BridgeServer issues queries for rankings, character and guild profiles, castle siege state and population counts, and never writes.

{% hint style="warning" %}
Point BridgeServer at a read-only SQL login if your setup allows it. Nothing in BridgeServer needs write access, and a least-privilege login makes that guarantee structural rather than a promise.
{% endhint %}

## Ranking Cache

Ranking lists are rebuilt on a timer and served from memory, so ranking requests never queue behind your game traffic. `MuDbRefreshSeconds = 60` means rankings can be up to a minute stale, which is almost always the right trade. Character, guild and siege lookups are answered live because they are keyed by name and cheap.

Lowering this to a few seconds puts real load on the game database. Raising it costs nothing but freshness.

## Examples

{% tabs %}
{% tab title="Localhost development" %}

```ini
[BridgeServerInfo]
IngestPortTCP = 55980
HttpPort = 55981
MaxIpConnection = 10
SharedKey =
DiscordWebhookUrl = https://discord.com/api/webhooks/...
DiscordRelayAll = 1
MuDbODBC = MuOnline
MuDbRefreshSeconds = 60
LicenseKey = ...
```

No shared key, every event mirrored to a test channel.
{% endtab %}

{% tab title="Production" %}

```ini
[BridgeServerInfo]
IngestPortTCP = 55980
HttpPort = 55981
MaxIpConnection = 4
SharedKey = a-long-random-string
DiscordWebhookUrl = https://discord.com/api/webhooks/...
DiscordRelayAll = 0
MuDbODBC = MuOnlineReadOnly
MuDbRefreshSeconds = 60
LicenseKey = ...
```

Keyed ingest, announcements only, read-only database login.
{% endtab %}

{% tab title="API only, no Discord" %}

```ini
[BridgeServerInfo]
IngestPortTCP = 55980
HttpPort = 55981
MaxIpConnection = 4
SharedKey = a-long-random-string
DiscordWebhookUrl =
DiscordRelayAll = 0
MuDbODBC = MuOnlineReadOnly
MuDbRefreshSeconds = 60
LicenseKey = ...
```

Your own bot reads the [API](/docs/bridgeserver/api.md) and does the routing.
{% endtab %}
{% endtabs %}

## Network Exposure

* **Ingest port**: GameServers only. BridgeServer always listens on every network interface for this port; there is no setting to bind it to `127.0.0.1`. Use the Windows firewall to allow only your GameServer addresses (or block it from outside entirely on a single-host setup).
* **HTTP port**: also listens on every interface, with no bind setting. It is read-only, but it does publish player names, locations and chat. Block it at the firewall and put it behind a reverse proxy if you want TLS, caching or rate limiting - BridgeServer does none of those itself.
* **Control port**: listens on `ControlBind`, which is `127.0.0.1` by default, so it is local-only unless you change it.

{% hint style="warning" %}
Only a firewall can limit who reaches the ingest and HTTP ports. Opening the server to the internet without firewall rules exposes both.
{% endhint %}

## Common Issues

* **BridgeServer exits immediately** - `LicenseKey` missing or invalid, or the `axiom-bridge` module is not on the license
* **A port fails to bind** - another process already holds `IngestPortTCP` or `HttpPort`
* **GameServer connects and is dropped** - `SharedKey` here and `Key` in the plugin config are not identical
* **GameServers cannot publish events at all** - `MaxIpConnection` is `0` or missing from the file
* **Rankings return 503** - `MuDbODBC` is empty, the DSN does not exist on this machine, or the first refresh has not finished
* **Database connects but rankings are empty** - the DSN points at the wrong database, or the login cannot read the game tables
* **Discord is flooded** - `DiscordRelayAll = 1`; set it to `0` for announcements only

## Related

* [BridgeServer overview](/docs/bridgeserver/bridgeserver.md)
* [HTTP API](/docs/bridgeserver/api.md)
* [Bridge Config.xml](/docs/data/plugins/bridge.md) - GameServer side
