The server.properties file is the primary configuration file for Minecraft Java Edition servers. It contains essential settings that control how your server behaves, including gameplay rules, performance parameters, network settings, and world generation options. This file is automatically created when you first run a Minecraft server and is located in the server's root directory.
Understanding and properly configuring your server.properties file is crucial for running a successful Minecraft server. Whether you're hosting a small server for friends or managing a large community, these settings determine everything from player limits to world generation rules.
Basic Server Settings
- server-port: The port your server listens on (default: 25565). Only change this if you're running multiple servers or have port conflicts.
- max-players: Maximum number of concurrent players. Set this based on your server's RAM and CPU resources. A general rule is 1GB RAM per 5-10 players for vanilla servers.
- motd: Message of the Day displayed in the server list. Supports Minecraft color codes (ยง) for formatting.
- online-mode Important: When true, authenticates players through Mojang's servers. Set to false only for offline/LAN servers.
World Generation
- level-type: World type (default, flat, large biomes, amplified, single biome). Use "minecraft:flat" for superflat worlds.
- level-seed: Seed for world generation. Leave empty for random seed, or specify a seed for reproducible worlds.
- generate-structures: Controls whether villages, temples, and other structures spawn. Disable for custom maps.
- max-world-size: Maximum world radius in blocks. Default is 29,999,984 (about 30 million blocks from spawn).
Performance Settings
These settings have the biggest impact on your server's performance. Tune them carefully based on your hardware!
- view-distance Critical: How far players can see (in chunks). Range: 2-32. Lower values improve performance but reduce visibility. Recommended: 6-8 for large servers, 10-12 for small servers.
- simulation-distance: How far entities and redstone are active (in chunks). Should be equal to or lower than view-distance. Recommended: 4-6 for large servers.
- network-compression-threshold: Packets larger than this (in bytes) are compressed. Lower values reduce bandwidth but increase CPU usage. Set to -1 to disable compression. Recommended: 256 for most servers, 128 for large networks.
- entity-broadcast-range-percentage: Controls how far entities are visible. Lower values improve performance. Recommended: 80-100 for large servers.
Gameplay Settings
- difficulty: peaceful, easy, normal, hard. Affects mob damage, hunger depletion, and more.
- gamemode: survival, creative, adventure, spectator. Default mode for new players.
- hardcore: When true, players are banned on death and difficulty is locked to hard.
- pvp: Enable/disable player vs player combat.
- spawn-protection: Radius around spawn where non-operators cannot build. Set to 0 to disable.
Security Settings
- enforce-secure-profile 1.19+: Requires players to have signed chat messages. Recommended: true.
- prevent-proxy-connections: Blocks players using proxies or VPNs. May cause issues with legitimate proxy setups.
- hide-online-players: Hides player list in server status queries. Useful for privacy.
Different server sizes need different configurations. Use these as starting points and adjust based on your performance monitoring.
1. Setting view-distance Too High
Many server admins set view-distance to 16+ thinking it will improve player experience. In reality, high view distances cause severe performance issues and lag for most servers. Each additional chunk increases server load exponentially. Start with 8 and only increase if your server has excellent hardware and few players.
2. Disabling online-mode Without Understanding
Setting online-mode to false allows "cracked" clients to join but disables Mojang authentication. This makes your server vulnerable to impersonation attacks and prevents features like player skins and capes. Only disable for LAN servers or if you understand the security implications.
3. Ignoring simulation-distance
Many admins focus on view-distance but ignore simulation-distance, which is equally important for performance. Simulation distance controls where crops grow, redstone activates, and mobs spawn. Set it lower than view-distance for better performance.
4. Setting max-players Too High
Your max-players setting should match your server's capabilities. Vanilla servers typically need 1-2GB RAM per 5-10 players, depending on view distance and plugins. Setting max-players to 100 on a 4GB server will result in severe lag and crashes.
5. Enabling Command Blocks on Public Servers
Command blocks are powerful but can be exploited if operators aren't trustworthy. Only enable command blocks on private servers or if you have strict operator controls.
Vanilla vs Paper/Spigot
Paper and Spigot servers have additional configuration files (paper.yml, spigot.yml) that provide more granular control over performance and gameplay. However, server.properties remains the primary configuration file and its settings apply regardless of server software.
Forge/Fabric Modded Servers
Modded servers may require different settings. Many mods add entities and blocks that increase server load. Consider lowering view-distance and simulation-distance on modded servers, and increase RAM allocation significantly (often 4-8GB minimum for modpacks).
Once you've configured your server.properties file, you may want to explore our other Minecraft server tools:
- JVM Arguments Generator - Optimize your server's Java flags for better performance
- RAM Calculator - Calculate required RAM based on player count and mods
- View Distance Calculator - Find optimal view distance for your server
- Whitelist Generator - Create whitelist.json files with automatic UUID lookup