How to Create a Minecraft Server on an Linux VPS

VPS and dedicated server2 dk okuma28 Ağu 2026 tarihinde güncellendi

This guide walks you through setting up a Minecraft server on a Linux VPS. We use Ubuntu because of its stability, simplicity and wide community support. Start by connecting to your server over SSH.

Update the System and Install Java

Modern Minecraft (1.20.5 and newer) requires Java 21 or higher. Very recent versions need an even newer Java, so if the server later refuses to start with an UnsupportedClassVersionError, install the newest Java release and try again.

  • Update your server:
sudo apt update && sudo apt upgrade -y
  • Install OpenJDK 21:
sudo apt install openjdk-21-jdk -y
  • Verify the installation:
java -version

Create a Directory and Download the Server Jar

  • Create a dedicated folder:
mkdir -p ~/minecraft-server
cd ~/minecraft-server
wget -O server.jar PASTE-THE-DOWNLOAD-LINK-HERE

First Run and EULA

  • Start the server once to generate the configuration files:
java -Xmx2048M -Xms2048M -jar server.jar nogui
  • It stops and asks you to accept the EULA. Open it:
nano eula.txt
  • Change eula=false to eula=true, then save and exit with Ctrl + O, Enter, Ctrl + X.

Start the Server

  • Run the same command again:
java -Xmx2048M -Xms2048M -jar server.jar nogui
  • Wait until the console reports Done. You can watch logs and player activity here.

Configure the Linux Firewall

  • If you use ufw, allow the default Minecraft port:
sudo ufw allow 25565
sudo ufw enable

Open the Port at VibeGAMES

On a VibeGAMES VPS, ports stay closed at the network edge until you open them, so the Linux firewall rule is not enough on its own.

  • In the VibeGAMES dashboard, open your VPS and go to the DDoS protection tab.
  • Press Add filter and pick the Minecraft profile, or use the Minecraft (25565) template on the Open a port card if it is shown. VibeSHIELD DDoS protection is applied automatically.

Run It as a Service (Optional)

To keep the server running in the background and restart it automatically:

  • Create a service file:
sudo nano /etc/systemd/system/minecraft.service
  • Paste the following, replacing <your-username> with your Linux username:
[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=<your-username>
WorkingDirectory=/home/<your-username>/minecraft-server
ExecStart=/usr/bin/java -Xmx2048M -Xms2048M -jar server.jar nogui
Restart=always

[Install]
WantedBy=multi-user.target
  • Enable and start it:
sudo systemctl daemon-reload
sudo systemctl start minecraft
sudo systemctl enable minecraft

Connect to Your Server

  • Copy the IPv4 address from your server's Details tab in the dashboard.
  • In Minecraft, go to Multiplayer, Add Server, and enter that IP.

Finished

Your Minecraft server is live and protected by VibeSHIELD. Give the IP to your players and have fun! Prefer not to manage Java and firewalls yourself? A Minecraft game server comes with a panel that handles all of this for you.

Bu, sorununuzu çözdü mü?

Hâlâ takıldınız mı?

Destek ekibimiz barındırdığımız oyunları gerçekten bilir. Bir ticket açın, birlikte çözelim.

Ticket aç