Aller au contenu principal

How to Set Up a Minecraft Java Server

Why Run Your Own Minecraft Server?

Running a dedicated Minecraft server gives you full control over your world. You decide who joins, which mods or plugins to install, what the rules are, and when to update. Whether you are building with a small group of friends or running a public community, a dedicated server is the foundation of every great Minecraft experience.

This guide walks you through everything you need to know to get a Minecraft Java Edition server running.

Step 1: Choose Your Server Software

The first decision is which server software to run. Each option has distinct strengths.

Vanilla

The official Minecraft server JAR from Mojang. It runs unmodified gameplay with no plugin or mod support. Best for a pure vanilla experience with a small group.

Paper

Paper is the most popular plugin-based server software. Built on top of Spigot, it includes hundreds of performance patches, bug fixes, and configuration options. It supports the full Bukkit and Spigot plugin ecosystem. Switching from vanilla to Paper alone can improve TPS (ticks per second) by 20 to 50 percent on busy servers.

Fabric

Fabric is a lightweight mod loader that updates quickly when new Minecraft versions release. Nearly all major optimization mods like Sodium, Lithium, and Starlight are Fabric-exclusive. It is ideal for servers that want modded gameplay with minimal overhead.

Forge and NeoForge

Forge has been the dominant mod loader since 2011 and has the largest mod library. NeoForge is its modern successor, receiving stronger community support on newer Minecraft versions. Choose these when running large modpacks that require Forge-compatible mods.

Step 2: System Requirements

A Minecraft server's hardware needs depend on your player count and world complexity.

PlayersRAMCPUStorage
1-52 GB2 cores10 GB SSD
5-154 GB2-4 cores15 GB SSD
15-306-8 GB4 cores25 GB SSD
30+8-16 GB4+ cores25+ GB SSD

Modded servers with large modpacks may need significantly more RAM. Always use SSD storage rather than HDD, as chunk loading performance depends heavily on disk speed.

Step 3: Install Java

Minecraft Java Edition servers require Java. As of 2025, Minecraft 1.21.x requires Java 21 or newer.

Download the latest Java 21 JDK from Adoptium or your preferred distribution. Verify your installation by running java -version in your terminal.

Step 4: Download and Configure the Server

Download your chosen server software. For Paper, visit papermc.io and select the build matching your target Minecraft version.

Create a dedicated directory for your server files and place the JAR inside it. Run it once to generate the default configuration files:

java -Xms2G -Xmx4G -jar paper.jar --nogui

The -Xms flag sets the minimum memory allocation and -Xmx sets the maximum. Adjust these based on your available RAM and player count.

Accept the EULA

After the first run, open eula.txt and change eula=false to eula=true. This is required before the server will start.

Configure server.properties

Key settings to review in server.properties:

  • server-port: Default is 25565. Change only if running multiple servers.
  • max-players: Set based on your hardware capacity.
  • view-distance: Controls how many chunks are sent to players. Lower values (8-10) reduce server load.
  • simulation-distance: Controls how far from players the server simulates game logic. Set to 4-6 for best performance.
  • difficulty: Set to easy, normal, or hard.
  • motd: The message displayed in the server list.
  • white-list: Set to true to restrict access to approved players only.
  • online-mode: Keep this true to verify player accounts with Mojang. Setting it to false disables authentication and is a security risk.

Step 5: Port Forwarding (Self-Hosted)

If you are hosting the server on your own hardware, you need to forward port 25565 (TCP) on your router to your server machine's local IP address. The exact steps depend on your router model. Search for your router brand along with "port forwarding" for specific instructions.

Players outside your local network will connect using your public IP address, which you can find at whatismyip.com.

Step 6: Secure Your Server

Whitelist

Enable the whitelist in server.properties and add trusted players with /whitelist add playername. This prevents random players from joining.

Operator Permissions

Grant operator status sparingly with /op playername. Operators have access to powerful commands that can modify or damage a world.

Regular Backups

Schedule automated backups of your world folder. A corrupted world with no backup is an unrecoverable loss. Back up at least daily, and keep multiple copies.

Keep Software Updated

Update your server software promptly when new versions release. Updates contain security patches and stability improvements.

Step 7: Optimize for Performance

After your server is running, fine-tune for better performance:

  • Pre-generate chunks using the Chunky plugin. This eliminates lag from generating new terrain as players explore.
  • Set simulation-distance to 4-5 in server.properties. This handles the majority of performance issues.
  • Install Spark as a profiler to identify what is causing lag on your server.
  • Limit entity counts through Paper's configuration files to prevent mob farms from tanking TPS.
Reactor Hosting

Reactor's Minecraft hosting provides instant server deployment with full file access via SFTP, automatic backups, one-click version updates, and a web-based console. You get the control of running your own server without the infrastructure burden.

Whether you choose to self-host or use managed hosting, the most important thing is getting your community into a world together. Pick the approach that fits your technical comfort level and budget, and start building.