# How to Configure Your Unturned Server (Commands.dat) (/docs/unturned/server-config)



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

Unturned uses `Commands.dat` — a simple text file with one command per line. This is the primary config file for your server.

Server File Structure [#server-file-structure]

<Files>
  <Folder name="Servers" defaultOpen>
    <Folder name="MyServer" defaultOpen>
      <Folder name="Server" defaultOpen>
        <File name="Commands.dat" />

        <File name="Config.json" />

        <File name="Adminlist.dat" />

        <File name="Whitelist.dat" />

        <File name="Blacklist.dat" />
      </Folder>

      <Folder name="Workshop">
        <File name="WorkshopDownloadConfig.json" />
      </Folder>

      <Folder name="Level" />

      <Folder name="Players" />
    </Folder>
  </Folder>
</Files>

How to Edit Commands.dat [#how-to-edit-commandsdat]

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

    Go to **Console** in the [XGamingServer Panel](https://panel.xgamingserver.com) and stop the server.

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

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

    Click **Files** in the sidebar. Navigate to `Servers/<ServerName>/Server/` and open `Commands.dat`.

    {/* Screenshot needed: File Manager showing Commands.dat */}
  </Step>

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

    One command per line. No `=` signs — just the command followed by a space and the value. Click **Save Content** and start from **Console**.
  </Step>
</Steps>

Commands.dat Reference [#commandsdat-reference]

<Tabs items={['Server Identity', 'Gameplay', 'Toggle Settings', 'Advanced']}>
  <Tab value="Server Identity">
    | Command       | Example                   | Description                                                                    |
    | ------------- | ------------------------- | ------------------------------------------------------------------------------ |
    | `Name`        | `Name My Server`          | Name shown in the server browser                                               |
    | `Port`        | `Port 27015`              | Game port (UDP)                                                                |
    | `Password`    | `Password secret`         | Join password. Omit the line entirely for a public server                      |
    | `Maxplayers`  | `Maxplayers 24`           | Player limit (default 8)                                                       |
    | `Welcome`     | `Welcome Hello!`          | Message shown to players on join                                               |
    | `Owner`       | `Owner 76561198012345678` | Server owner SteamID64. Has all permissions, cannot be removed in-game         |
    | `Login_Token` | `Login_Token GSLT_HERE`   | GSLT for reliable browser listing. See [GSLT Setup](/docs/unturned/gslt-setup) |
  </Tab>

  <Tab value="Gameplay">
    | Command       | Example            | Description                                                                 |
    | ------------- | ------------------ | --------------------------------------------------------------------------- |
    | `Map`         | `Map PEI`          | Active map name. See [Maps & Mods](/docs/unturned/map-mods) for all options |
    | `Mode`        | `Mode Normal`      | Difficulty: `Easy`, `Normal`, or `Hard`                                     |
    | `Perspective` | `Perspective Both` | Camera: `First`, `Third`, `Both`, or `Vehicle`                              |
    | `Cycle`       | `Cycle 3600`       | Day/night cycle length in seconds (3600 = 1 hour)                           |
    | `Decay`       | `Decay 604800`     | Structure decay time in seconds (604800 = 7 days)                           |
    | `Loadout`     | `Loadout 15/15/81` | Starting items — item IDs separated by `/`                                  |

    Perspective Options [#perspective-options]

    | Value     | Description                                      |
    | --------- | ------------------------------------------------ |
    | `First`   | First-person only. Preferred for competitive PvP |
    | `Third`   | Third-person only                                |
    | `Both`    | Players toggle freely (default)                  |
    | `Vehicle` | First-person on foot, third-person in vehicles   |

    Difficulty Modes [#difficulty-modes]

    | Mode       | Item Spawns | Zombie Difficulty        | Loot     |
    | ---------- | ----------- | ------------------------ | -------- |
    | **Easy**   | Frequent    | Low damage               | Generous |
    | **Normal** | Balanced    | Standard                 | Standard |
    | **Hard**   | Scarce      | High damage, more health | Rare     |
  </Tab>

  <Tab value="Toggle Settings">
    Toggle commands are **enabled by including the line** and **disabled by removing it**. They take no value.

    | Command           | Effect When Present                                            |
    | ----------------- | -------------------------------------------------------------- |
    | `PvE`             | Disables player damage. Omit for PvP                           |
    | `Cheats`          | Enable cheat commands for admins                               |
    | `BattlEye_Secure` | Enable BattlEye anti-cheat. **Recommended for public servers** |
    | `Gold`            | Restrict to Unturned Gold Edition players only                 |
  </Tab>

  <Tab value="Advanced">
    | Command | Example        | Description                      |
    | ------- | -------------- | -------------------------------- |
    | `Bind`  | `Bind 0.0.0.0` | IP to bind to (leave as default) |
  </Tab>
</Tabs>

Ports [#ports]

| Port      | Protocol | Purpose                                   |
| --------- | -------- | ----------------------------------------- |
| **27015** | UDP      | Game traffic                              |
| **27016** | UDP      | Steam query (automatically game port + 1) |

Example Commands.dat [#example-commandsdat]

```
Name XGaming Unturned Server
Port 27015
Maxplayers 24
Map PEI
Mode Normal
Perspective Both
PvE
Welcome Welcome to our server!
Owner 76561198012345678
Login_Token YOUR_GSLT_HERE
BattlEye_Secure
Cycle 3600
Decay 604800
```

Related Guides [#related-guides]

* [Admin Setup](/docs/unturned/admin-setup)
* [Maps & Mods](/docs/unturned/map-mods)
* [Connect to Your Server](/docs/unturned/join-server)
* [GSLT Setup](/docs/unturned/gslt-setup)
