How to Set Up a Minecraft Server [2026]
Complete guide to setting up a Minecraft server in 2026. Covers self-hosted and paid hosting, vanilla and Paper/Spigot setup, essential plugins, port forwarding, and security.
Running your own Minecraft server gives you complete control over your gameplay experience. You decide the rules, the plugins, the player list, and the world settings. Whether you are hosting for a few friends or building a community, this guide walks you through every step of setting up a Minecraft server in 2026.
Self-Hosted vs. Paid Hosting
Before you start, decide whether you want to host the server yourself on your own hardware or pay a hosting provider to run it for you.
Self-Hosted (Your Computer or a VPS)
Pros:
- Complete control over hardware and software
- No monthly hosting fees if using your own PC
- Learn valuable server administration skills
- No restrictions on plugins, mods, or configuration
Cons:
- Your computer must stay on 24/7 if you want the server always available
- Requires port forwarding on your home router (minor security consideration)
- Your home internet upload speed limits player capacity
- Hardware costs if you need to upgrade RAM or CPU
Best for: Technical users, small friend groups (2-10 players), learning purposes.
Paid Hosting
Pros:
- Server runs 24/7 without tying up your hardware
- Professional DDoS protection
- Better upload bandwidth (data centers have gigabit connections)
- Automatic backups on most hosts
- No port forwarding needed
Cons:
- Monthly cost ($5-30+ depending on specs)
- Less direct control than self-hosting
- Some hosts restrict certain plugins or server types
Best for: Communities of 10+ players, anyone who wants reliability without the maintenance. If you are leaning toward paid hosting, check our comparison of the best Minecraft server hosts.
Part 1: Setting Up a Vanilla Server
A vanilla server runs the official Minecraft server software from Mojang with no modifications. This is the simplest setup and works well for small groups who want the default Minecraft experience.
System Requirements
| Players | RAM | CPU | Storage |
|---|---|---|---|
| 1-5 | 2 GB | 2 cores | 5 GB |
| 5-10 | 4 GB | 2-4 cores | 10 GB |
| 10-20 | 6 GB | 4 cores | 15 GB |
| 20+ | 8+ GB | 4+ cores | 20+ GB |
These are minimums. More RAM and faster CPU always help, especially with many players loading different chunks simultaneously.
Step 1: Install Java
Minecraft servers require Java to run. As of 1.21, you need Java 21 or newer.
Windows:
- Download the Java 21 JDK from Adoptium (the successor to AdoptOpenJDK)
- Run the installer, selecting the option to set JAVA_HOME
- Open Command Prompt and verify:
java -version
macOS:
brew install openjdk@21
Or download from Adoptium and install manually.
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install openjdk-21-jre-headless
java -version
Step 2: Download the Server JAR
- Go to the official Minecraft server download page
- Download
server.jar - Create a new folder for your server (e.g.,
minecraft-server) - Move
server.jarinto that folder
Step 3: First Run
Open a terminal or command prompt, navigate to your server folder, and run:
java -Xmx4G -Xms4G -jar server.jar nogui
-Xmx4Gsets the maximum RAM to 4 GB (adjust based on your resources)-Xms4Gsets the initial RAM allocation to matchnoguiruns the server without the graphical interface (recommended)
The first run will fail. This is expected. It generates a file called eula.txt that you must accept.
Step 4: Accept the EULA
Open eula.txt in a text editor. Change the line:
eula=false
To:
eula=true
Save and close the file.
Step 5: Configure Server Properties
Before the second run, edit server.properties to customize your server. Key settings:
# Server name shown in the multiplayer list
motd=My Minecraft Server
# Maximum players allowed
max-players=20
# Game mode: survival, creative, adventure, spectator
gamemode=survival
# Difficulty: peaceful, easy, normal, hard
difficulty=normal
# Render distance (lower = less RAM usage, 10 is a good default)
view-distance=10
# Simulation distance (how far from players entities are processed)
simulation-distance=8
# Whitelist (restrict who can join)
white-list=false
# Port (default 25565, only change if needed)
server-port=25565
# PvP toggle
pvp=true
# World seed (leave blank for random)
level-seed=
Step 6: Start the Server
Run the same command again:
java -Xmx4G -Xms4G -jar server.jar nogui
The server will generate the world and start listening for connections. You will see log output ending with something like:
[Server thread/INFO]: Done (12.345s)! For help, type "help"
Your server is now running.
Step 7: Connect
Same computer: Open Minecraft, go to Multiplayer, and connect to localhost.
Same network (LAN): Find your local IP address (usually 192.168.x.x) and connect to that IP.
Over the internet: Requires port forwarding (covered below).
Part 2: Upgrading to Paper (Recommended)
The vanilla server software is stable but limited. Paper is a high-performance fork of the Minecraft server that is fully compatible with vanilla clients while offering significant performance improvements and plugin support.
Why Paper Over Vanilla?
| Feature | Vanilla | Paper |
|---|---|---|
| Performance | Baseline | 30-50% faster tick times |
| Plugin support | None | Thousands of Bukkit/Spigot/Paper plugins |
| Configuration options | Limited | Extensive per-world tuning |
| Async chunk loading | No | Yes |
| Entity optimizations | No | Yes (reduces lag from mob farms) |
| Anti-cheat built-in | No | Basic anti-exploit protections |
| Bug fixes | Mojang timeline | Faster community patches |
Paper is the de facto standard for Minecraft servers in 2026. Unless you specifically need the unmodified vanilla experience, use Paper.
Installing Paper
- Go to papermc.io
- Download the latest build for Minecraft 1.21
- Rename the downloaded file to
paper.jar - Place it in your server folder (same one from the vanilla setup)
- Update your start command:
java -Xmx4G -Xms4G -jar paper.jar nogui
- Run it. Paper will generate additional configuration files (
paper-global.yml,paper-world-defaults.yml) alongside the standardserver.properties.
Your existing world and settings carry over. Players connect the same way. The only difference is better performance and the ability to install plugins.
Paper Performance Tuning
Paper generates detailed configuration files that let you fine-tune performance. The most impactful settings:
In paper-world-defaults.yml:
chunks:
auto-save-interval: 6000 # Save chunks every 5 minutes instead of every tick
max-auto-save-chunks-per-tick: 8 # Spread saves across ticks
entities:
spawning:
despawn-ranges:
monster:
soft: 30 # Start random despawning at 30 blocks
hard: 72 # Force despawn at 72 blocks (lower = better performance)
In paper-global.yml:
chunk-loading-basic:
player-max-chunk-generate-rate: 40.0 # Chunks per second per player
player-max-chunk-load-rate: 100.0
These defaults work well for most servers. Only tune further if you experience specific lag issues.
Part 3: Essential Plugins
Plugins extend your server’s functionality. With Paper installed, you can add plugins by dropping .jar files into the plugins/ folder and restarting the server.
Must-Have Plugins
EssentialsX — The foundational server plugin. Provides /home, /tpa (teleport request), /spawn, private messaging, kits, and hundreds of other utility commands. Almost every public server runs this.
LuckPerms — Permission management. Define groups (admin, moderator, member, guest) and control exactly which commands and areas each group can access. Essential for any server with more than a few players.
WorldGuard + WorldEdit — Region protection and building tools. WorldGuard lets you define protected areas where players cannot build or break blocks. WorldEdit gives admins powerful building tools (fill, copy, paste, replace).
CoreProtect — Block logging. Records every block placement, removal, and chest interaction. When someone griefs a build, you can see exactly who did it and roll back the damage. Non-negotiable for any public server.
Recommended Plugins
GriefPrevention — Lets players claim land by themselves using a golden shovel. Reduces admin workload because players protect their own builds.
Vault — Economy API that other plugins depend on. Required if you want an in-game economy.
DiscordSRV — Bridges your Minecraft server chat with a Discord channel. Players and non-players can communicate across platforms.
Dynmap — Generates a real-time web-based map of your server world. Players can view the map in a browser and see where everyone is. Uses additional RAM (1-2 GB for large worlds).
Plugin Sources
Only download plugins from trusted sources:
- Modrinth (modrinth.com) — Modern plugin repository with verified uploads
- Hangar (hangar.papermc.io) — PaperMC’s official plugin repository
- SpigotMC (spigotmc.org) — Long-standing community resource
- GitHub — Many plugins are open source with releases on GitHub
Never download plugins from random websites or “free premium plugin” sites. These commonly contain malware that can compromise your server.
Part 4: Port Forwarding
If you want players outside your local network to connect, you need to forward port 25565 on your router to your server’s local IP address.
Step-by-Step
-
Find your server’s local IP:
- Windows:
ipconfigin Command Prompt, look for IPv4 Address - macOS/Linux:
ifconfigorip addr, look for 192.168.x.x or 10.x.x.x
- Windows:
-
Log into your router:
- Open a browser and go to
192.168.1.1or192.168.0.1(varies by router) - Enter your router admin credentials (often on a sticker on the router)
- Open a browser and go to
-
Find the port forwarding section:
- Usually under Advanced, NAT, or Firewall settings
- The exact location varies by router brand
-
Create a port forwarding rule:
- External port: 25565
- Internal port: 25565
- Protocol: TCP
- Internal IP: Your server’s local IP from step 1
-
Save and test:
- Give your public IP address to friends (find it at whatismyip.com)
- They connect using your public IP in Minecraft’s multiplayer menu
Using a Static Local IP
Your router may assign a different local IP to your server after a reboot, breaking port forwarding. To prevent this, set a static IP or create a DHCP reservation in your router settings for your server’s MAC address.
Part 5: Security Basics
Running a Minecraft server exposes a port on your network. Follow these basics to stay safe.
Enable the Whitelist
If your server is only for friends, enable the whitelist in server.properties:
white-list=true
Then add players from the server console:
whitelist add PlayerName
Only whitelisted players can join. This is the single most effective security measure.
Keep Software Updated
Update Paper, plugins, and Java regularly. Security vulnerabilities in server software have been exploited in the past (the Log4Shell vulnerability in December 2021 is a notable example). Paper patches these issues faster than vanilla.
Backups
Set up automatic backups. The simplest approach:
# Simple backup script (Linux/macOS)
#!/bin/bash
DATE=$(date +%Y-%m-%d_%H-%M)
tar -czf backups/backup-$DATE.tar.gz world/ world_nether/ world_the_end/ plugins/ server.properties
Run this via cron every few hours. Keep at least a week of backups.
For Paper servers, the Backup plugin or a script triggered by a scheduled task works well.
Do Not Run as Root
On Linux servers, create a dedicated user for the Minecraft server:
sudo useradd -m -s /bin/bash minecraft
sudo su - minecraft
# Run server as this user, not root
This limits the damage if the server software is ever compromised.
Firewall Rules
Only open port 25565. Do not expose SSH (22), database ports, or other services to the public internet unless you specifically need to and have secured them.
On Linux:
sudo ufw allow 25565/tcp
sudo ufw enable
Part 6: Running 24/7
On Your Own PC
Create a startup script so you do not have to type the full Java command every time.
Windows (start.bat):
@echo off
java -Xmx4G -Xms4G -jar paper.jar nogui
pause
Linux/macOS (start.sh):
#!/bin/bash
java -Xmx4G -Xms4G -jar paper.jar nogui
To keep the server running after you close the terminal on Linux:
screen -S minecraft
./start.sh
# Press Ctrl+A then D to detach
# Reconnect with: screen -r minecraft
On a VPS
A VPS (Virtual Private Server) from providers like Hetzner, OVH, or DigitalOcean runs 24/7 in a data center. This is the best option if you want reliability without paying for managed Minecraft hosting.
A basic VPS with 4 GB RAM and 2 cores costs $5-15/month and comfortably handles 10-15 players.
Setup is the same as above (install Java, download Paper, configure, run), but you connect via SSH instead of being at the physical machine.
Using systemd (Linux VPS)
Create a systemd service so the server starts automatically on boot and restarts on crash:
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xmx4G -Xms4G -jar paper.jar nogui
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Save as /etc/systemd/system/minecraft.service, then:
sudo systemctl enable minecraft
sudo systemctl start minecraft
Troubleshooting Common Issues
”Can’t connect to server”
- Verify the server is running (check for the “Done!” message in the console)
- Check that the port is correct (default 25565)
- Confirm port forwarding is set up if connecting over the internet
- Disable your firewall temporarily to test if it is blocking the connection
- Make sure you are using the correct IP (local IP for LAN, public IP for internet)
Server Lag
- Reduce
view-distanceandsimulation-distanceinserver.properties - Install Paper if you are running vanilla
- Check for lag-causing plugins with
/timings report(Paper) - Allocate more RAM if you are below the recommended amount
- Reduce mob farm sizes or add limits to redstone machines
World Corruption
- Always stop the server gracefully with the
stopcommand, never kill the process - Maintain regular backups
- Use CoreProtect to roll back griefing damage without restoring entire backups
Java Version Mismatch
If you see errors about unsupported class versions, your Java is too old. Minecraft 1.21 requires Java 21. Check with java -version and update if needed.
Summary
Setting up a Minecraft server is straightforward once you know the steps. Install Java 21, download the server JAR (or Paper for better performance), accept the EULA, configure your settings, and start the server. For multiplayer access beyond your local network, set up port forwarding on port 25565. Secure your server with a whitelist, regular backups, and updated software. If you prefer to skip the self-hosting work, paid hosting providers handle the infrastructure for you.