Skip to main content
The server configuration file (server.cfg) controls all aspects of your Nitrox server’s behavior. This file is automatically created in your save directory when you first start a server.

Configuration File Location

The server.cfg file is located in your server’s save directory:
%APPDATA%/Nitrox/saves/<ServerName>/server.cfg
Replace <ServerName> with your actual server name.

Configuration Format

The configuration file uses a simple key-value format:
# Comment lines start with #
PropertyName=Value
AnotherProperty=100

Network Settings

ServerPort

ServerPort
integer
default:"11000"
The port number the server listens on for incoming connections.Example:
ServerPort=11000
If you change this port, players must specify it when connecting. Make sure to forward this port in your router if hosting publicly.

MaxConnections

MaxConnections
integer
default:"100"
Maximum number of players that can connect simultaneously.Constraints: Must be greater than 0Example:
MaxConnections=20

ServerPassword

ServerPassword
string
default:""
Password required for players to join the server. Leave empty for no password.Example:
ServerPassword=MySecurePassword
# or leave empty for public access
ServerPassword=

AutoPortForward

AutoPortForward
boolean
default:"true"
If enabled, the server attempts to open the port on your router via UPnP.Example:
AutoPortForward=true
Your router must support UPnP for this to work. If it fails, you’ll need to manually port forward.

LANDiscoveryEnabled

LANDiscoveryEnabled
boolean
default:"true"
Determines whether the server responds to LAN discovery requests.Example:
LANDiscoveryEnabled=true
When enabled, your server will appear in the LAN servers list for players on the same network.

World Settings

Seed

Seed
string
default:""
World generation seed. Leave blank for a random spawn position.Example:
Seed=MyCustomSeed123
# or leave empty for random
Seed=

GameMode

GameMode
enum
default:"SURVIVAL"
Default game mode for the server.Possible Values:
  • SURVIVAL - Standard survival mode with hunger, thirst, and oxygen
  • FREEDOM - No hunger or thirst requirements
  • HARDCORE - Permadeath mode
  • CREATIVE - Creative mode with unlimited resources
Example:
GameMode=SURVIVAL

KeepInventoryOnDeath

KeepInventoryOnDeath
boolean
default:"false"
Prevents players from losing items when they die.Example:
KeepInventoryOnDeath=false

PvPEnabled

PvPEnabled
boolean
default:"true"
Enables or disables player versus player damage and interactions.Example:
PvPEnabled=true

Save Settings

SaveInterval

SaveInterval
integer
default:"120000"
Time in milliseconds between automatic world saves.Constraints: Must be at least 1000 (1 second)Example:
# Save every 2 minutes (default)
SaveInterval=120000

# Save every 5 minutes
SaveInterval=300000

DisableAutoSave

DisableAutoSave
boolean
default:"false"
Disables automatic world saving.Example:
DisableAutoSave=false
Disabling autosave may result in data loss if the server crashes. Use the /save command manually if disabled.

MaxBackups

MaxBackups
integer
default:"10"
Maximum number of backup saves to keep.Constraints: Must be 0 or greaterExample:
MaxBackups=10
Setting to 0 disables backups entirely. Older backups are automatically deleted when this limit is reached.

DisableAutoBackup

DisableAutoBackup
boolean
default:"false"
Disables automatic backup creation.Example:
DisableAutoBackup=false

PostSaveCommandPath

PostSaveCommandPath
string
default:""
Path to a script or executable to run after each successful save.Example:
# Windows
PostSaveCommandPath=C:\Scripts\backup-world.bat

# Linux
PostSaveCommandPath=/home/user/scripts/backup-world.sh
Useful for custom backup solutions or external monitoring scripts.

Performance Settings

InitialSyncTimeout

InitialSyncTimeout
integer
default:"120000"
Time in milliseconds to wait for initial world sync when a player connects.Example:
InitialSyncTimeout=120000
Increase this value if players are timing out during initial connection on slower networks.

CreateFullEntityCache

CreateFullEntityCache
boolean
default:"false"
If enabled, caches entities for the entire map on next server start.Example:
CreateFullEntityCache=false
WARNING! Enabling this will make server startup significantly longer, but players will experience better performance when exploring new areas.

SafeBuilding

SafeBuilding
boolean
default:"true"
When enabled, rejects build actions detected as desynchronized.Example:
SafeBuilding=true
This prevents building glitches but may occasionally reject legitimate builds on high-latency connections.

Permission Settings

AdminPassword

AdminPassword
string
default:"randomly generated"
Password players use with /login command to gain admin permissions.Example:
AdminPassword=MySecureAdminPass123
This password is auto-generated on first run. Change it to something secure and keep it private!

DefaultPlayerPerm

DefaultPlayerPerm
enum
default:"PLAYER"
Default permission level for new players.Possible Values:
  • PLAYER - Basic player permissions
  • MODERATOR - Can kick, mute, and use moderation commands
  • ADMIN - Full server control
Example:
DefaultPlayerPerm=PLAYER

LocalhostIsAdmin

LocalhostIsAdmin
boolean
default:"true"
If enabled, players connecting from localhost automatically get admin permissions.Example:
LocalhostIsAdmin=true
Disable this if you’re using a proxy server or want stricter permission control.

Player Default Stats

These settings control the starting stats for new players.

DefaultOxygenValue

DefaultOxygenValue
float
default:"45"
Starting oxygen level for new players.Example:
DefaultOxygenValue=45

DefaultMaxOxygenValue

DefaultMaxOxygenValue
float
default:"45"
Maximum oxygen capacity for new players.Example:
DefaultMaxOxygenValue=45

DefaultHealthValue

DefaultHealthValue
float
default:"80"
Starting health for new players.Example:
DefaultHealthValue=80

DefaultHungerValue

DefaultHungerValue
float
default:"50.5"
Starting food level for new players.Example:
DefaultHungerValue=50.5

DefaultThirstValue

DefaultThirstValue
float
default:"90.5"
Starting water level for new players.Example:
DefaultThirstValue=90.5

DefaultInfectionValue

DefaultInfectionValue
float
default:"0.1"
Starting Kharaa infection level for new players.Example:
DefaultInfectionValue=0.1
Recommended to keep at 0.1 (the default starting value). Setting to 0 means new players are cured by default.

Advanced Settings

SerializerMode

SerializerMode
enum
default:"JSON"
Format used for saving world data.Possible Values:
  • JSON - Human-readable JSON format
  • PROTOBUF - Binary format (smaller file size, faster)
Example:
SerializerMode=JSON
Changing this after creating a world may require migration. Stick with JSON unless you have a specific reason to change.

DisableConsole

DisableConsole
boolean
default:"false"
Disables the server console.Example:
DisableConsole=false

IsEmbedded

IsEmbedded
boolean
default:"true"
When true and started in launcher, uses the launcher UI instead of a separate window.Example:
IsEmbedded=true

Example Configuration

Here’s a complete example configuration file:
server.cfg
# Server settings can be changed here

# Network Settings
ServerPort=11000
MaxConnections=20
ServerPassword=
AutoPortForward=true
LANDiscoveryEnabled=true

# World Settings
Seed=
GameMode=SURVIVAL
KeepInventoryOnDeath=false
PvPEnabled=true

# Save Settings
# Measured in milliseconds
SaveInterval=120000
DisableAutoSave=false
MaxBackups=10
DisableAutoBackup=false
PostSaveCommandPath=

# Performance
# Measured in milliseconds
InitialSyncTimeout=120000
# Set to true to Cache entities for the whole map on next run.
# WARNING! Will make server load take longer on the cache run but players will gain a performance boost when entering new areas.
CreateFullEntityCache=false
# When true, will reject any build actions detected as desynced
SafeBuilding=true

# Permissions
AdminPassword=GeneratedPassword123
DefaultPlayerPerm=PLAYER
# If true, players using localhost get admin by default - disable if you're using a proxy server
LocalhostIsAdmin=true

# Default player stats below here
DefaultOxygenValue=45
DefaultMaxOxygenValue=45
DefaultHealthValue=80
DefaultHungerValue=50.5
DefaultThirstValue=90.5
# Recommended to keep at 0.1f which is the default starting value. If set to 0 then new players are cured by default.
DefaultInfectionValue=0.1

# Advanced
# Possible values: JSON, PROTOBUF
SerializerMode=JSON
DisableConsole=false
# When true and started in launcher, will use launcher UI as opposed to external window
IsEmbedded=true

Runtime Configuration

Some settings can be changed while the server is running using commands:

Change Admin Password

changeadminpassword NewPassword

Change Server Password

changeserverpassword NewPassword

Change Game Mode

changeservergamemode CREATIVE

Toggle PvP

pvp on
Changes made via commands are automatically saved to the configuration file.

Troubleshooting

Symptoms: Settings don’t apply, server uses defaultsSolutions:
  • Check that the file is named exactly server.cfg
  • Verify the file is in the correct save directory
  • Check for syntax errors (use Property=Value format)
  • Look for warnings in the server log
Symptoms: Log shows “invalid value” warningsSolutions:
  • Check that numeric values are within valid ranges
  • Verify boolean values are true or false (lowercase)
  • Ensure enum values match exactly (case-sensitive)
Symptoms: Players can’t connect from outside your networkSolutions:
  • Set AutoPortForward=true
  • Check if your router supports UPnP
  • Manually forward the port in your router settings
  • Verify firewall allows the port

See Also

Server Commands

Control your server with console commands

Getting Started

Set up your first Nitrox server

Build docs developers (and LLMs) love