Save File Architecture
Nitrox saves world data in multiple files for better organization and performance:Version
Nitrox version metadata for save compatibility
PlayerData
All player information (stats, inventory, permissions)
WorldData
Game settings, seed, story state, and timing
EntityData
All spawned entities and their states
GlobalRootData
Persistent root-level entities (bases, large structures)
File Formats
Nitrox supports two serialization formats:Format Comparison
Format Comparison
JSON Format
- Files:
Version.json,PlayerData.json, etc. - Readable and editable in text editor
- Useful for debugging and manual fixes
- Larger file size
- Supports save file upgrades between Nitrox versions
- Files:
Version.nitrox,PlayerData.nitrox, etc. - Binary serialization for better performance
- Smaller file size
- Faster save/load times
- Cannot be manually edited
- Cannot be upgraded - must use JSON for version migrations
World Persistence
Save Directory Structure
World Data Structure
Automatic Saving
The server automatically saves world state at regular intervals:Post-Save Commands
You can configure an external command to run after each successful save:- Automated backups to cloud storage
- Discord notifications
- File compression
- Remote backup synchronization
Backup System
Nitrox includes an automatic backup system that creates restore points:Backup Configuration
How Backups Work
Backups are stored as ZIP files with human-readable timestamps. You can manually extract and restore them if needed.
Restoring from Backup
To restore a backup:World Seed
Each Nitrox world has a unique seed that determines random generation:- Seeds are 10 alphanumeric characters
- Determines spawn positions, entity placements, and randomized elements
- Saved in
WorldDataafter first world generation - Cannot be changed after world creation
World Loading
When the server starts, it attempts to load existing world data:Fresh World Creation
If no save files exist, a new world is created:Entity Caching
To improve performance when players join, Nitrox can pre-cache entities:Entity Cache Details
Entity Cache Details
When Enabled:
- Server loads and caches ALL entities for the entire map on startup
- Significantly increases initial server load time (5-15 minutes)
- Players joining experience much faster initial sync
- Higher server memory usage
- Entities loaded on-demand as players explore
- Fast server startup
- Player initial sync takes longer
- Lower memory footprint
- Servers with many players joining frequently
- High-performance server hardware
- Mature worlds with extensive player exploration
Game Mode & Settings
World settings are configured inserver.cfg and saved in world data:
Game mode changes affect the entire world and all players. Individual players cannot have different game modes.
Host Migration
Implications:- Server must remain running for players to stay connected
- Server crashes disconnect all players
- Cannot transfer hosting to another player mid-session
- Use automatic restarts and monitoring for server reliability
Server Commands
World management commands available via server console or in-game (with admin perms):/save
/save
Manually trigger a world save immediately
/backup
/backup
Create a backup of the current world state
/autosave [on|off]
/autosave [on|off]
Enable or disable automatic saving
/stop
/stop
Gracefully shut down the server (saves world first)
Troubleshooting
Corrupted Save Files
If world fails to load:- Check server logs for specific error messages
- Restore from most recent backup in
Backups/folder - If using ProtoBuf, switch to JSON and retry
- Contact Nitrox support with error logs
Save File Upgrades Failing
Performance Issues
- Reduce
SaveIntervalif saves are causing lag spikes - Enable
CreateFullEntityCachefor faster joins (slower startup) - Check save file size - very large worlds may need optimization
- Monitor server RAM usage during saves
Related Pages
Multiplayer
Session management and player connections
Synchronization
Real-time entity and state synchronization
Communication
Commands for world management
