Configuration File Location
Server configuration is stored inserver.cfg within each world save directory:
Each world save has its own independent configuration file. Changes only affect that specific world.
Configuration File Format
Theserver.cfg file uses a simple key-value format:
Core Settings
Network Configuration
ServerPort
- Type: Integer
- Default:
11000 - Description: UDP port the server listens on for incoming connections
- Note: Must be forwarded through your router for internet play
MaxConnections
- Type: Integer
- Default:
100 - Range: Must be greater than 0
- Description: Maximum number of simultaneous player connections
AutoPortForward
- Type: Boolean
- Default:
true - Description: Automatically attempts to open the server port on your router via UPnP
- Note: Requires UPnP support on your router
SubnauticaServerConfig.cs:118-119
LANDiscoveryEnabled
- Type: Boolean
- Default:
true - Description: Allow the server to respond to LAN discovery broadcasts
- Note: Enables automatic server detection for players on the same local network
SubnauticaServerConfig.cs:120-121
Authentication & Security
ServerPassword
- Type: String
- Default: Empty (no password)
- Description: Password required for players to join the server
- Note: Leave empty for a public server
AdminPassword
- Type: String
- Default: Randomly generated 12-character string
- Description: Password for admin privileges
- Important: Change this from the default!
SubnauticaServerConfig.cs:93
DefaultPlayerPerm
- Type: Enum
- Default:
PLAYER - Options:
NONE- No permissionsPLAYER- Basic player permissions, cannot use cheatsMODERATOR- Can manage players, use vanilla cheatsADMIN- Full server administrationCONSOLE- All permissions (reserved for console)
- Description: Default permission level for new players
Perms.cs:5-27
LocalhostIsAdmin
- Type: Boolean
- Default:
true - Description: Players connecting from localhost (127.0.0.1) automatically get admin permissions
- Warning: Disable this if using a proxy server
SubnauticaServerConfig.cs:104-105
Gameplay Settings
Game Mode
- Type: Enum
- Default:
SURVIVAL - Options:
SURVIVAL(0) - Standard survival modeFREEDOM(2) - No hunger/thirstHARDCORE(257) - PermadeathCREATIVE(1790) - Unlimited resources, no threats
- Description: World game mode
NitroxGameMode.cs:6-12
World Seed
- Type: String
- Default: Empty (random)
- Description: Leave blank for random spawn position, or specify a seed for reproducible worlds
SubnauticaServerConfig.cs:25-26
PvP Settings
- Type: Boolean
- Default:
true - Description: Enables or disables player-versus-player damage and interactions
SubnauticaServerConfig.cs:129-130
Death Settings
- Type: Boolean
- Default:
false - Description: Prevents players from losing items when they die
SubnauticaServerConfig.cs:30-31
Save & Backup Configuration
Save Interval
- Type: Integer (milliseconds)
- Default:
120000(2 minutes) - Minimum:
1000(1 second) - Description: Time between automatic world saves
- Note: More frequent saves = more safety but slightly more disk I/O
SubnauticaServerConfig.cs:34-43
Auto-Save Control
- Type: Boolean
- Default:
false - Description: Completely disable automatic saving
- Warning: Not recommended - use manual
savecommands only
SubnauticaServerConfig.cs:87
Backup Settings
- Type: Integer
- Default:
10 - Range: 0 or greater (0 = unlimited)
- Description: Number of backup saves to retain
SubnauticaServerConfig.cs:45-54
DisableAutoBackup:
- Type: Boolean
- Default:
false - Description: Disable automatic backup creation
SubnauticaServerConfig.cs:89
Post-Save Command
- Type: String (file path)
- Default: Empty
- Description: Path to executable/script to run after successful save (e.g., for custom backup solutions)
- Examples:
- Windows:
C:\Scripts\backup.bat - Linux:
/home/user/scripts/backup.sh
- Windows:
SubnauticaServerConfig.cs:56-61
Performance Settings
Entity Cache
- Type: Boolean
- Default:
false - Description: Pre-load all 504,732 world entities on server start
- Warning: Initial startup will take several minutes, but improves player experience in new areas
SubnauticaServerConfig.cs:14-15
Initial Sync Timeout
- Type: Integer (milliseconds)
- Default:
120000(2 minutes) - Description: Maximum time allowed for initial world sync when a player joins
- Note: Increase if players with slow connections timeout during join
SubnauticaServerConfig.cs:74-83
Safe Building
- Type: Boolean
- Default:
true - Description: Reject build actions detected as desynced
- Note: Prevents building glitches but may occasionally reject valid builds
SubnauticaServerConfig.cs:123-124
Serialization Settings
Serializer Mode
- Type: Enum
- Default:
JSON - Options:
JSON- Human-readable, easier to debugPROTOBUF- Binary format, smaller file size
- Description: Format for save files
- Warning: Cannot easily switch between formats without data conversion
SubnauticaServerConfig.cs:98-99
UI Settings
Console Disable
- Type: Boolean
- Default:
false - Description: Disable server console for all players
SubnauticaServerConfig.cs:85
Embedded Mode
- Type: Boolean
- Default:
true - Description: When started via launcher, use launcher UI instead of external window
SubnauticaServerConfig.cs:126-127
Player Stats Configuration
Default values for new players joining the server:SubnauticaServerConfig.cs:107-116
DefaultInfectionValue: Recommended to keep at
0.1 (default starting value). Set to 0 to cure new players by default.Example Configurations
Public Casual Server
Private Hardcore Server
High-Performance Server
Applying Configuration Changes
Configuration via Console Commands
Some settings can be changed while the server is running:Troubleshooting Configuration Issues
Server won't start after config change
Server won't start after config change
Solution:
- Check for syntax errors in
server.cfg - Verify values are within valid ranges
- Restore from a backup config if needed
- Check server logs for specific error messages
Configuration changes not taking effect
Configuration changes not taking effect
Solution:
- Ensure you edited the correct save folder’s
server.cfg - Fully restart the server (stop and start, not just reload)
- Some settings only apply to new players/worlds
Can't find server.cfg
Can't find server.cfg
Solution:
- File is created on first server start
- Check the correct save folder:
%AppData%/Nitrox/saves/<WorldName>/ - Create manually if needed - server will populate defaults
Next Steps
Hosting a Server
Learn how to start and manage your server
Troubleshooting
Solve common server issues
