Ultimate Guide to Setting Up Your Minecraft Server
Are you ready to create your own Minecraft world and invite friends to join? Setting up a Minecraft server can be an exciting project, whether you’re looking to host a small group of friends or build a larger community. This guide will walk you through the process, from choosing the right hosting to getting your server up and running.
Choosing the Right Hosting
Before we dive into the technical setup, it’s crucial to choose the right hosting for your Minecraft server. While you can host a server on your own computer, dedicated hosting offers several advantages:
- 24/7 uptime
- Better performance
- No strain on your personal computer
- Professional support
We recommend Servers Guru for reliable and high-performance Minecraft server hosting. They offer plans tailored specifically for Minecraft, ensuring you get the best experience for your server.
Check out Servers Guru’s Minecraft hosting plans
Setting Up a Minecraft Server on Debian, Ubuntu, or Raspbian
Prerequisites
- A Debian-based system (Debian, Ubuntu, or Raspbian)
- Root or sudo access
- Basic knowledge of terminal commands
Step-by-Step Guide
-
Update Your System
sudo apt update && sudo apt upgrade -y
-
Install Java For Minecraft 1.17+, you need Java 16 or newer. Install OpenJDK 17:
sudo apt install openjdk-17-jre-headless -y
-
Create a Minecraft User and Directory
sudo adduser --system --home /opt/minecraft minecraft sudo mkdir /opt/minecraft sudo chown minecraft:minecraft /opt/minecraft
-
Download the Minecraft Server Jar
sudo -u minecraft wget -O /opt/minecraft/server.jar https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar
Note: Replace the URL with the latest server version from the Minecraft website.
-
Create a Start Script Create a file named
start.sh
in/opt/minecraft
:sudo nano /opt/minecraft/start.sh
Add the following content:
#!/bin/bash cd /opt/minecraft java -Xmx1024M -Xms1024M -jar server.jar nogui
Make it executable:
sudo chmod +x /opt/minecraft/start.sh
-
First Run and EULA Acceptance
sudo -u minecraft /opt/minecraft/start.sh
The server will start and stop. Edit
eula.txt
:sudo nano /opt/minecraft/eula.txt
Change
eula=false
toeula=true
-
Create a Systemd Service Create a file named
minecraft.service
in/etc/systemd/system/
:sudo nano /etc/systemd/system/minecraft.service
Add the following content:
[Unit] Description=Minecraft Server After=network.target [Service] User=minecraft Nice=1 KillMode=none SuccessExitStatus=0 1 ProtectHome=true ProtectSystem=full PrivateDevices=true NoNewPrivileges=true WorkingDirectory=/opt/minecraft ExecStart=/opt/minecraft/start.sh ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS. SAVING ALL MAPS..."\015' ExecStop=/bin/sleep 10 ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "save-all"\015' ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "stop"\015' ExecStop=/bin/sleep 10 [Install] WantedBy=multi-user.target
-
Start the Minecraft Server
sudo systemctl daemon-reload sudo systemctl start minecraft
-
Enable Auto-start on Boot
sudo systemctl enable minecraft
-
Open Firewall Port If you have a firewall enabled, open port 25565:
sudo ufw allow 25565
Your Minecraft server should now be running and accessible. Remember to configure server properties in server.properties
file as needed.
Optimizing Your Minecraft Server
To ensure the best experience for your players:
- Allocate enough RAM to your server (at least 1GB per 10 players)
- Keep your server and mods updated
- Use a plugin like Paper or Spigot for better performance
- Regularly backup your world data
Why Choose Servers Guru for Your Minecraft Server?
- Optimized for Minecraft: Their servers are specifically configured for optimal Minecraft performance.
- Easy Setup: Get your server running in minutes with their user-friendly control panel.
- 24/7 Support: Expert assistance whenever you need it.
- Scalability: Easily upgrade your plan as your community grows.
- Automatic Backups: Keep your world safe with regular backups.
Start your Minecraft server journey with Servers Guru today!
Remember, a great Minecraft server starts with great hosting. Whether you’re building a small server for friends or dreaming of a bustling Minecraft community, Servers Guru has the tools and support to make your vision a reality.
Happy crafting!