# How to Configure Your Necesse Dedicated Server (/docs/necesse/server-config)



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

Necesse uses a `server.cfg` file with a simple `key=value` format. This guide covers every setting, world creation options, admin setup, and all console commands.

Server File Structure [#server-file-structure]

<Files>
  <Folder name="(server root)" defaultOpen>
    <File name="server.cfg" />

    <File name="admins.txt" />

    <Folder name="saves" defaultOpen>
      <Folder name="YourWorld" />
    </Folder>

    <Folder name="mods">
      <File name="example-mod.jar" />
    </Folder>
  </Folder>
</Files>

How to Edit server.cfg [#how-to-edit-servercfg]

<Steps>
  <Step>
    Stop your server [#stop-your-server]

    Go to **Console** in the [XGamingServer Panel](https://panel.xgamingserver.com) and stop your server. Necesse overwrites `server.cfg` on shutdown, so always edit while stopped.

    {/* Screenshot needed: Console page with Stop button */}
  </Step>

  <Step>
    Open the file [#open-the-file]

    Click **Files** in the sidebar and open `server.cfg` in the root directory.

    {/* Screenshot needed: File Manager showing server.cfg */}
  </Step>

  <Step>
    Edit and save [#edit-and-save]

    Change the values you need, click **Save Content**, then start your server from **Console**.
  </Step>
</Steps>

server.cfg Reference [#servercfg-reference]

<Tabs items={['Server Settings', 'World Creation', 'Gameplay']}>
  <Tab value="Server Settings">
    | Setting            | Default            | Description                                                                                                                                |
    | ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
    | `serverName`       | `"Necesse Server"` | Name displayed in the server browser                                                                                                       |
    | `serverPassword`   | `""`               | Password required to join. Leave empty for a public server                                                                                 |
    | `maxClients`       | `10`               | Maximum simultaneous players                                                                                                               |
    | `pauseWhenEmpty`   | `true`             | Pause the world simulation when no players are online. Set to `false` if you want crops/settlers to progress while empty                   |
    | `giveClientsPower` | `true`             | When `true`, all players get admin-like permissions (can use settings GUI). Set to `false` for public servers and use `admins.txt` instead |

    > `giveClientsPower=true` is fine for friend groups but **dangerous on public servers** — it lets any player change world settings. Disable it and use `admins.txt` for proper access control.
  </Tab>

  <Tab value="World Creation">
    These settings are configured when the world is **first created**. Changing them in server.cfg after world creation has no effect — you'd need to delete the world and regenerate.

    Difficulty [#difficulty]

    | Level         | Description                                   |
    | ------------- | --------------------------------------------- |
    | **Casual**    | Low enemy damage, generous loot               |
    | **Adventure** | Balanced for new players                      |
    | **Classic**   | Standard difficulty (recommended)             |
    | **Hard**      | Tougher enemies, more damage                  |
    | **Brutal**    | Maximum challenge — not for the faint-hearted |

    Death Penalty [#death-penalty]

    | Option             | What Happens                                              |
    | ------------------ | --------------------------------------------------------- |
    | **Keep Inventory** | No penalty. Items stay in your inventory                  |
    | **Drop Inventory** | All items drop at your death location. Must retrieve them |
    | **Hardcore**       | Permanent death — character is deleted                    |

    Raid Frequency [#raid-frequency]

    Controls how often hostile raids attack your settlements:

    **None** — **Low** — **Normal** — **High** — **Very High**

    Higher raid frequency means more combat but also more loot from defeated raiders.
  </Tab>

  <Tab value="Gameplay">
    | Setting     | Default | Description                                                             |
    | ----------- | ------- | ----------------------------------------------------------------------- |
    | `worldSeed` | `""`    | World generation seed. Empty = random. Only applies at world creation   |
    | `port`      | `14159` | UDP port for game traffic. Can also be set via **Startup** in the panel |
  </Tab>
</Tabs>

Admin Setup [#admin-setup]

Necesse uses `admins.txt` to grant admin permissions. This is separate from `giveClientsPower` and gives specific players elevated commands.

<Steps>
  <Step>
    Find the player's Steam ID [#find-the-players-steam-id]

    You need their **SteamID64** (a 17-digit number like `76561198012345678`). Look it up at [steamid.io](https://steamid.io) using their profile URL.
  </Step>

  <Step>
    Edit admins.txt [#edit-adminstxt]

    In **Files**, open `admins.txt` in the root directory. Add one SteamID64 per line:

    ```
    76561198012345678
    76561198087654321
    ```
  </Step>

  <Step>
    Set giveClientsPower to false [#set-giveclientspower-to-false]

    In `server.cfg`, set:

    ```
    giveClientsPower=false
    ```

    This ensures only players listed in `admins.txt` have admin access, not everyone.
  </Step>

  <Step>
    Restart [#restart]

    Restart from **Console** to apply.
  </Step>
</Steps>

Console Commands [#console-commands]

Run these in **Console** in the panel:

<Tabs items={['Player Management', 'World & Items', 'Server']}>
  <Tab value="Player Management">
    | Command                         | Description                     |
    | ------------------------------- | ------------------------------- |
    | `/kick <player>`                | Kick a player from the server   |
    | `/ban <player>`                 | Ban a player permanently        |
    | `/unban <player>`               | Remove a ban                    |
    | `/permissions <player> <level>` | Set a player's permission level |
    | `/list`                         | Show all connected players      |
  </Tab>

  <Tab value="World & Items">
    | Command                            | Description                      |
    | ---------------------------------- | -------------------------------- |
    | `/give <player> <itemID> [amount]` | Give items to a player           |
    | `/tp <player> <x> <y>`             | Teleport a player to coordinates |
    | `/time set <value>`                | Set the world time               |
    | `/world save`                      | Force an immediate world save    |
  </Tab>

  <Tab value="Server">
    | Command          | Description                                  |
    | ---------------- | -------------------------------------------- |
    | `/stop`          | Graceful server shutdown (saves world first) |
    | `/say <message>` | Broadcast a message to all players           |
    | `/help`          | List all available commands                  |
  </Tab>
</Tabs>

Ports [#ports]

| Port      | Protocol | Purpose      |
| --------- | -------- | ------------ |
| **14159** | UDP      | Game traffic |

This port is configured via **Startup** in the panel or with the `-port` startup flag.

Related Guides [#related-guides]

* [Connect to Your Server](/docs/necesse/join-server)
* [Install Mods](/docs/necesse/mod-setup)
* [Upload a Save](/docs/necesse/import-save)
