# How to Configure Your Holdfast: Nations At War Server (/docs/holdfast/configure-your-server)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Holdfast: Nations At War server configuration is managed through the `serverconfig_default.cfg` file located in the server's root directory. This file controls everything from the server name and password to game modes, player limits, and admin access.

Editing the Configuration File [#editing-the-configuration-file]

<div className="fd-steps">
  <div className="fd-step">
    Open the XGamingServer panel [#1-open-the-xgamingserver-panel]

    Log in to the [XGamingServer panel](https://panel.xgamingserver.com) and stop your Holdfast server.
  </div>

  <div className="fd-step">
    Navigate to Files [#2-navigate-to-files]

    In the sidebar, click `Files`.
  </div>

  <div className="fd-step">
    Open the config file [#3-open-the-config-file]

    Open `serverconfig_default.cfg` in the server root directory.
  </div>

  <div className="fd-step">
    Edit your settings [#4-edit-your-settings]

    Modify the values you want to change (see the reference tables below).
  </div>

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

    Click **Save** and start your server.

    > 📝 **Note:** Always stop your server before editing the config file. Some changes may not apply correctly if the server is running, and the server may overwrite your changes on shutdown.
  </div>
</div>

Server Identity Settings [#server-identity-settings]

These settings control how your server appears to players:

| Setting           | Description                                     | Example                          |
| ----------------- | ----------------------------------------------- | -------------------------------- |
| `server_name`     | Name displayed in the server browser            | `server_name My Holdfast Server` |
| `server_password` | Password required to join (blank = no password) | `server_password secret123`      |
| `max_players`     | Maximum number of players allowed               | `max_players 150`                |
| `server_region`   | Region code for server browser filtering        | `server_region 0`                |

For detailed guides on each setting:

* [Change Server Name](/docs/holdfast/change-server-name)
* [Set a Password](/docs/holdfast/set-a-password)

Game Mode Settings [#game-mode-settings]

Holdfast supports multiple game modes. Configure the active mode and its settings:

| Setting              | Description                      | Example                   |
| -------------------- | -------------------------------- | ------------------------- |
| `game_mode`          | Active game mode                 | `game_mode 0`             |
| `round_time_minutes` | Round duration in minutes        | `round_time_minutes 15`   |
| `auto_balance_teams` | Automatically balance team sizes | `auto_balance_teams true` |
| `friendly_fire`      | Enable friendly fire damage      | `friendly_fire false`     |
| `allow_spectators`   | Allow players to spectate        | `allow_spectators true`   |

See our full [Change Game Mode guide](/docs/holdfast/change-game-mode) for all game mode options and values.

Game Mode Values [#game-mode-values]

| Value | Game Mode         |
| ----- | ----------------- |
| `0`   | Army Battlefield  |
| `1`   | Army Deathmatch   |
| `2`   | Army Siege        |
| `3`   | Naval Battlefield |

Admin Settings [#admin-settings]

Configure who can administer your server:

| Setting             | Description                                       | Example                               |
| ------------------- | ------------------------------------------------- | ------------------------------------- |
| `admin_steam_id_64` | Steam64 IDs of admin players                      | `admin_steam_id_64 76561198012345678` |
| `admin_password`    | Password for admin login (if using password auth) | `admin_password adminpass`            |

Multiple admins can be added by listing each Steam64 ID on a separate `admin_steam_id_64` line. See our [Adding Admins guide](/docs/holdfast/adding-admins) for step-by-step instructions.

Map Rotation [#map-rotation]

The map rotation determines which maps are played and in what order. Maps are configured in the config file as a list:

```
map_rotation KF-BattleofWaterloo
map_rotation KF-FortBaxter
map_rotation KF-PortRoyal
map_rotation KF-TheFarm
```

> 💡 **Tip:** The server cycles through maps in the order listed. You can include the same map multiple times if you want it to appear more frequently in the rotation.

Gameplay Tweaks [#gameplay-tweaks]

| Setting                 | Description                                         | Default |
| ----------------------- | --------------------------------------------------- | ------- |
| `spawn_protection_time` | Seconds of invulnerability after spawning           | `3`     |
| `class_limit_enabled`   | Enable class limits per team                        | `false` |
| `officer_limit`         | Maximum officers per team (if class limits enabled) | `2`     |
| `musician_limit`        | Maximum musicians per team                          | `2`     |
| `cavalry_limit`         | Maximum cavalry per team                            | `4`     |
| `allow_flag_bearer`     | Allow the flag bearer class                         | `true`  |
| `allow_sapper`          | Allow the sapper class                              | `true`  |

Network Settings [#network-settings]

| Setting       | Description                                       | Default |
| ------------- | ------------------------------------------------- | ------- |
| `server_port` | Game port                                         | `20100` |
| `tick_rate`   | Server tick rate (higher = smoother but more CPU) | `30`    |
| `max_ping`    | Maximum allowed player ping (0 = no limit)        | `0`     |

> 📝 **Note:** The `server_port` in the config should match what's assigned in the `Network` tab on the XGamingServer panel. If they don't match, players won't be able to connect.

Example Configuration [#example-configuration]

Here's a complete example `serverconfig_default.cfg`:

```
// Server Identity
server_name [US East] Army Battlefield | XGaming Community
server_password
max_players 100
server_region 0

// Game Mode
game_mode 0
round_time_minutes 15
auto_balance_teams true
friendly_fire false
allow_spectators true

// Admin Access
admin_steam_id_64 76561198012345678
admin_steam_id_64 76561198087654321

// Map Rotation
map_rotation KF-BattleofWaterloo
map_rotation KF-FortBaxter
map_rotation KF-PortRoyal

// Gameplay
spawn_protection_time 3
class_limit_enabled false
allow_flag_bearer true
allow_sapper true

// Network
server_port 20100
tick_rate 30
max_ping 0
```

Verifying Your Configuration [#verifying-your-configuration]

After making changes and restarting the server:

<div className="fd-steps">
  <div className="fd-step">
    Check the Console [#1-check-the-console]

    Go to `Console` on the XGamingServer panel and verify the server starts without errors. Look for messages confirming your settings loaded correctly.
  </div>

  <div className="fd-step">
    Connect and verify [#2-connect-and-verify]

    [Connect to your server](/docs/holdfast/connect-to-your-server) and verify the settings are applied — check the server name in the browser, try the password, and confirm the game mode is correct.

    > 💡 **Tip:** If the server fails to start after a config change, check the Console output for error messages. A common issue is syntax errors in the config file. Double-check that each setting is on its own line and values don't contain unexpected characters.

    If you get stuck at any time, you can join our [Discord](https://discord.xgamingserver.com/).
  </div>
</div>
