# How To Configure Your Barotrauma Server (/docs/barotrauma/configure-your-server)



Barotrauma server configuration is managed through the `serversettings.xml` file in your server's root directory.

> ⚠️ **Important:** Always stop your server before editing `serversettings.xml`. The server overwrites this file on shutdown — any edits made while it is running will be lost.

Using the Panel Startup Settings [#using-the-panel-startup-settings]

For common settings, use the panel's **Startup** page:

1. Log in to the [XGamingServer Panel](https://panel.xgamingserver.com)
2. Click **Startup** in the sidebar
3. Adjust fields like **Server Name**, **Max Players**, **Password**, and **Port**
4. Restart from the **Console** page

> 📝 **Note:** Startup parameters take priority over `serversettings.xml`. If a setting won't stick, check the Startup page first.

Editing serversettings.xml [#editing-serversettingsxml]

<div className="fd-steps">
  <div className="fd-step">
    Stop Your Server [#1-stop-your-server]

    Make sure your server is fully stopped before editing.
  </div>

  <div className="fd-step">
    Open Files [#2-open-files]

    In the sidebar, click **Files** and open `serversettings.xml`.

    ***
  </div>
</div>

Server Identity & Visibility [#server-identity--visibility]

| Setting         | Description                                                                   | Default    |
| --------------- | ----------------------------------------------------------------------------- | ---------- |
| `name`          | Server name shown in the browser                                              | `"Server"` |
| `public`        | List publicly in the server browser                                           | `true`     |
| `Password`      | Join password — leave blank for open access                                   | *(empty)*  |
| `ServerMessage` | Welcome message shown to connecting players                                   | *(empty)*  |
| `playstyle`     | Browser tag: `Casual`, `Serious`, `Roleplay`, `Rampage`, `SomethingDifferent` | `Casual`   |

Network [#network]

| Setting      | Description                           | Default |
| ------------ | ------------------------------------- | ------- |
| `port`       | Main UDP game port                    | `27015` |
| `queryport`  | Steam query/server browser port       | `27016` |
| `MaxPlayers` | Maximum simultaneous players          | `16`    |
| `tickrate`   | Server update rate (ticks per second) | `20`    |

> 📝 **Note:** On XGamingServer, ports are assigned by the panel — do not change these values manually.

Gameplay [#gameplay]

| Setting              | Description                                                  | Default    |
| -------------------- | ------------------------------------------------------------ | ---------- |
| `gamemodeidentifier` | Active mode: `sandbox`, `mission`, `campaign`                | `sandbox`  |
| `Submarine`          | Submarine filename without `.sub` extension (case-sensitive) | `Humpback` |
| `LevelDifficulty`    | Difficulty 0–100                                             | `20`       |
| `randomizeseed`      | Randomize the level seed each round                          | `true`     |
| `AllowSpectating`    | Allow spectator slots                                        | `true`     |
| `AllowFriendlyFire`  | Enable player-to-player damage                               | `true`     |
| `AllowRewiring`      | Allow players to rewire electrical systems                   | `true`     |
| `AllowDisguises`     | Allow disguise items to work                                 | `true`     |

Respawn Settings [#respawn-settings]

| Setting             | Description                                                       | Default |
| ------------------- | ----------------------------------------------------------------- | ------- |
| `AllowRespawn`      | Global respawn toggle                                             | `true`  |
| `UseRespawnShuttle` | Dead players arrive via shuttle instead of teleporting            | `true`  |
| `RespawnInterval`   | Seconds between respawn waves                                     | `300`   |
| `MaxTransportTime`  | Max time (seconds) the respawn shuttle has to reach the sub       | `180`   |
| `MinRespawnRatio`   | Fraction of crew that must be dead before a respawn wave triggers | `0.2`   |

Bots [#bots]

| Setting        | Description                                                     | Default  |
| -------------- | --------------------------------------------------------------- | -------- |
| `botcount`     | Current number of AI bots                                       | `0`      |
| `maxbotcount`  | Maximum allowed bots                                            | `16`     |
| `BotSpawnMode` | `Normal` — fill missing crew slots; `Fill` — always fill to max | `Normal` |

Voting & Kick [#voting--kick]

| Setting                 | Description                                    | Default |
| ----------------------- | ---------------------------------------------- | ------- |
| `AllowVoteKick`         | Enable vote-kick                               | `true`  |
| `AllowEndVoting`        | Enable vote to end a round                     | `true`  |
| `kickvoterequiredratio` | Fraction of players needed to pass a kick vote | `0.6`   |
| `endvoterequiredratio`  | Fraction needed to end the round by vote       | `0.6`   |

Auto-Management [#auto-management]

| Setting                      | Description                                              | Default |
| ---------------------------- | -------------------------------------------------------- | ------- |
| `autorestart`                | Automatically restart when server is empty               | `false` |
| `autorestartinterval`        | Seconds to wait before auto-restarting                   | `60`    |
| `StartWhenClientsReady`      | Start round when enough players ready up                 | `true`  |
| `StartWhenClientsReadyRatio` | Fraction of connected players that must be ready         | `0.8`   |
| `KillDisconnectedTime`       | Seconds before killing a disconnected player's character | `30`    |
| `KickAFKTime`                | Seconds of inactivity before AFK kick                    | `120`   |

Traitors [#traitors]

| Setting           | Description                                             | Default |
| ----------------- | ------------------------------------------------------- | ------- |
| `TraitorsEnabled` | `Yes`, `No`, or `Maybe` (random chance per round)       | `No`    |
| `TraitorRatio`    | If `Maybe`, probability a traitor is assigned (0.0–1.0) | `0.2`   |

> 💡 **Tip:** Set `TraitorsEnabled="Maybe"` and `TraitorRatio="0.3"` for occasional traitor rounds without guaranteeing one every game.

Karma [#karma]

| Setting        | Description                           | Default   |
| -------------- | ------------------------------------- | --------- |
| `KarmaEnabled` | Enable the karma anti-griefing system | `false`   |
| `KarmaPreset`  | `Default` (lenient) or `Strict`       | `Default` |

See the [Karma System](/docs/barotrauma/karma-system) guide for full details.

Auto-Ban [#auto-ban]

| Setting          | Description                                     | Default |
| ---------------- | ----------------------------------------------- | ------- |
| `autobantime`    | Duration (minutes) of first automatic karma ban | `60`    |
| `maxautobantime` | Maximum auto-ban duration in minutes            | `360`   |

Example Configuration [#example-configuration]

```xml
<serversettings
  name="My Barotrauma Server"
  public="true"
  MaxPlayers="16"
  Password=""
  playstyle="Casual"
  gamemodeidentifier="mission"
  Submarine="Humpback"
  LevelDifficulty="30"
  AllowRespawn="true"
  UseRespawnShuttle="true"
  RespawnInterval="300"
  AllowFriendlyFire="true"
  AllowRewiring="true"
  AllowVoteKick="true"
  TraitorsEnabled="Maybe"
  TraitorRatio="0.2"
  KarmaEnabled="true"
  KarmaPreset="Default"
  autobantime="60"
  maxautobantime="360"
/>
```

<div className="fd-steps">
  <div className="fd-step">
    Save and Restart [#3-save-and-restart]

    Save the file and start your server.

    > 💡 **Tip:** Need help with a specific setting? Join our [Discord](https://discord.xgamingserver.com) for support.
  </div>
</div>

Related Guides [#related-guides]

* [Game Modes](/docs/barotrauma/game-modes)
* [Change Submarine](/docs/barotrauma/change-submarine)
* [Karma System](/docs/barotrauma/karma-system)
* [Adding Admins](/docs/barotrauma/adding-admins)
