Hosting your own Minecraft server allows you to create a customized multiplayer world for you and your friends. Whether you want a survival adventure or a creative build server, this guide will walk you through the setup process.
1. Requirements
Before you start, make sure your system meets the basic requirements:
- Java Edition: Minecraft servers require Java.
- Decent Hardware: At least 4GB RAM (8GB+ recommended).
- Stable Internet Connection: Needed for hosting players.
2. Install Java
First, download and install Java (if not already installed). Check your Java version with:
java -version
If Java is missing, install it:
Windows: Download Java from Oracle's official website.
Linux: Install via terminal:
sudo apt update && sudo apt install openjdk-17-jdk -y
3. Download the Minecraft Server Software
Visit the official Minecraft website and download the latest server.jar file.
Move the file to a dedicated folder:
mkdir ~/minecraft-server && mv server.jar ~/minecraft-server cd ~/minecraft-server
5. Accept the EULA
Open eula.txt and change false to true:
nano eula.txt
Save and exit, then restart the server:
java -Xmx4G -Xms4G -jar server.jar nogui
6. Configure the Server (Optional)
Edit server.properties
to customize your server settings, such as:
gamemode=survival
(Change to creative or hardcore)
pvp=true
(Set false to disable player combat)
max-players=20
(Adjust for more or fewer players)
7. Port Forwarding (For Public Servers)
If you want friends outside your network to join, forward port 25565 on your router.
Log into your router settings.
Locate Port Forwarding settings.
Forward TCP/UDP 25565 to your local server IP.
You can find your local IP with:
ipconfig (Windows) ifconfig (Linux/macOS)
8. Connecting to Your Server
LAN Players: Use your local IP (192.168.x.x).
Online Players: Use your public IP (find it on WhatIsMyIP).
In Minecraft, go to Multiplayer > Add Server, then enter your IP.
9. Running the Server in the Background
Use screen or tmux to keep the server running when you close the terminal:
screen -S minecraft java -Xmx4G -Xms4G -jar server.jar nogui
Press CTRL + A, then D to detach.
10. Installing Plugins (Spigot/Paper)
For advanced features, install Spigot or Paper instead of Vanilla Minecraft:
Download from PaperMC.
Replace server.jar with paper.jar.
Restart the server and place plugins in the plugins/ folder.
Conclusion
Now your Minecraft server is up and running! Customize it with mods, plugins, and settings to create the perfect experience.
Happy crafting! 🛠️🎮