Running your own Minecraft server allows you to play with friends or build a community. This comprehensive guide will walk you through setting up a Minecraft server on both Windows and Linux systems.
Minimum: 2GB RAM, 2 CPU cores, 10GB storage
Recommended: 4GB+ RAM, 4 CPU cores, SSD storage
Internet: 10 Mbps+ upload speed (~100KB/s per player)
Java JDK 17+ (latest version)
OS: Windows 10/11 or Linux (Ubuntu recommended)
Download Oracle JDK or OpenJDK
Run the installer with default settings
Verify installation by running java -version
in command prompt/terminal
Create a new folder (e.g., mcserver
)
Download server.jar from Minecraft's official site
Place the .jar file in your created folder
Open command line (cmd on Windows, terminal on Linux)
Navigate to your server folder:
cd /path/to/mcserver
Start the server:
java -Xmx4G -Xms4G -jar server.jar nogui
(For 4GB RAM - use -Xmx8G -Xms8G
for 8GB)
After first run, locate eula.txt
Open with a text editor
Change eula=false
to eula=true
and save
Edit server.properties
:
server-port=25565
(Default port)
max-players=20
(Player limit)
online-mode=true
(Requires official Minecraft accounts)
view-distance=10
(Recommended 6-10 for performance)
java -Xmx4G -Xms4G -jar server.jar nogui
sudo apt update && sudo apt upgrade -y sudo apt install openjdk-17-jdk screen -y
mkdir mcserver && cd mcserver wget https://launcher.mojang.com/v1/objects/.../server.jar
screen -S minecraft java -Xmx4G -Xms4G -jar server.jar nogui
(Use Ctrl+A+D to detach)
Set enable-command-block=false
in server.properties
Only add trusted admins to ops.json
Maintain regular backups
Use optimized server software like PaperMC or Purpur
Tweak entity and chunk settings in spigot.yml
Clean world files monthly
1. "Can't bind to port" error
Another application may be using port 25565
Check with netstat -tulnp | grep 25565
Change port in server.properties
2. Memory errors
Reduce -Xmx
value or upgrade your VPS RAM
3. Connection issues
Check firewall settings:
sudo ufw allow 25565/tcp
Configure port forwarding on your router
Setting up a Minecraft server might seem complex at first, but by following these steps you'll have your own server running in no time. Remember to monitor performance regularly and listen to player feedback.
Leave your questions in the comments or check out our more advanced guides. Happy crafting!