# How to Configure Your Core Keeper Dedicated Server (/docs/core-keeper/server-config)



import { File, Folder, Files } from 'fumadocs-ui/components/files';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Core Keeper uses **both** a config file and command-line arguments. Some settings only work via command line.

Config File Location [#config-file-location]

<Files>
  <Folder name="Pugstorm" defaultOpen>
    <Folder name="CoreKeeper" defaultOpen>
      <Folder name="DedicatedServer" defaultOpen>
        <File name="ServerConfig.json" />

        <Folder name="worlds">
          <File name="0.world.gzip" />
        </Folder>
      </Folder>
    </Folder>
  </Folder>
</Files>

***

ServerConfig.json Settings [#serverconfigjson-settings]

| Setting            | Type   | Default  | Description                                               |
| ------------------ | ------ | -------- | --------------------------------------------------------- |
| `gameId`           | string | *(auto)* | Custom Game ID (min 28 chars, no `Y`, `y`, `x`, `0`, `O`) |
| `world`            | int    | `0`      | World slot index (0–29)                                   |
| `worldName`        | string | `""`     | Display name for the server                               |
| `worldSeed`        | int    | `0`      | World generation seed (0 = random)                        |
| `maxNumberPlayers` | int    | `100`    | Max players (default 8 via CLI if omitted)                |
| `worldMode`        | int    | `0`      | 0=Normal, 1=Hard, 2=Creative, 4=Casual                    |
| `seasonOverride`   | int    | `0`      | Override seasonal events (see below)                      |

Startup Parameters (Command Line) [#startup-parameters-command-line]

> ⚠️ **Important:** `-port`, `-password`, and `-ip` can ONLY be set via command line. Config file values are ignored for these.

| Argument                   | Description                                                                                              |
| -------------------------- | -------------------------------------------------------------------------------------------------------- |
| `-batchmode`               | Run without graphics (required for dedicated)                                                            |
| `-logfile <file>`          | Log output file                                                                                          |
| `-world <0-29>`            | World slot index                                                                                         |
| `-worldname "Name"`        | Server display name                                                                                      |
| `-worldseed <number>`      | World generation seed (0 = random)                                                                       |
| `-worldmode <0/1/2/4>`     | 0=Normal, 1=Hard, 2=Creative, 4=Casual                                                                   |
| `-season <name>`           | Season override: None, Easter, Halloween, Christmas, Valentine, Anniversary, CherryBlossom, LunarNewYear |
| `-gameid <id>`             | Custom Game ID                                                                                           |
| `-maxplayers <count>`      | Max players (default 8)                                                                                  |
| `-port <port>`             | Enable Direct Connect mode (required for crossplay)                                                      |
| `-ip <address>`            | Bind IP (default 0.0.0.0)                                                                                |
| `-password "pass"`         | Server password for Direct Connect (max 28 chars)                                                        |
| `-datapath <path>`         | Custom save location                                                                                     |
| `-allowonlyplatform <1-4>` | 1=Steam, 2=Epic, 3=Microsoft, 4=GOG                                                                      |

***

World Modes [#world-modes]

| Value | Mode     | Description                                   |
| :---: | -------- | --------------------------------------------- |
|   0   | Normal   | Standard difficulty                           |
|   1   | Hard     | Increased difficulty, harsher death penalties |
|   2   | Creative | Unlimited resources, building-focused         |
|   4   | Casual   | Easier difficulty, more forgiving             |

> ⚠️ **You cannot convert between Creative and non-Creative worlds.** Switching requires generating a new world on a different slot.

Season Overrides [#season-overrides]

| CLI Value       | Config Value | Season                              |
| --------------- | :----------: | ----------------------------------- |
| `None`          |      `0`     | No override (follows real calendar) |
| `Easter`        |      `1`     | Easter event                        |
| `Halloween`     |      `2`     | Halloween event                     |
| `Christmas`     |      `3`     | Christmas event                     |
| `Valentine`     |      `4`     | Valentine's Day                     |
| `Anniversary`   |      `5`     | Anniversary                         |
| `CherryBlossom` |      `6`     | Cherry Blossom Festival             |
| `LunarNewYear`  |      `7`     | Lunar New Year                      |

Network Modes [#network-modes]

<Tabs items={['SDR (Default)', 'Direct Connect']}>
  <Tab value="SDR (Default)">
    When `-port` is **not** set, traffic routes through Steam's relay network:

    * **No port forwarding needed**
    * Hides the server's real IP
    * **Steam players only** — no crossplay
    * Players connect via Game ID
  </Tab>

  <Tab value="Direct Connect">
    When `-port` IS set (e.g., `-port 27015`):

    * Requires **port forwarding** (UDP 27015 + 27016)
    * Enables **crossplay** between Steam, Epic, Microsoft, GOG
    * Players connect via IP:Port from `GameInfo.txt`
  </Tab>
</Tabs>

Ports (Direct Connect Mode) [#ports-direct-connect-mode]

| Port  | Protocol | Purpose             |
| ----- | -------- | ------------------- |
| 27015 | UDP      | Primary game port   |
| 27016 | UDP      | Secondary game port |

Related Guides [#related-guides]

* [How to Join Your Server](/docs/core-keeper/join-server)
* [World Seed Guide](/docs/core-keeper/seed-guide)
* [Install Mods](/docs/core-keeper/mod-setup)
