Guide to Setting Up a Minecraft Server with PineRiver VPS

Guide to Setting Up a Minecraft Server with PineRiver VPS

How to Set Up a Minecraft Server on a VPS

Introduction

Hosting a Minecraft server on a VPS (Virtual Private Server) gives you full control over your server, better performance, and stability. This guide covers setting up a Minecraft server on both Windows and Linux so you can get your server up and running quickly.

Prerequisites

Before getting started, ensure you have:

  • A VPS with at least 2 CPU cores and 4GB RAM (more is recommended for multiple players).
  • A 64-bit version of Windows Server or a Linux distribution (Ubuntu recommended).
  • Java installed.
  • Basic knowledge of SSH (Linux) or Remote Desktop (Windows).

Setting Up on Linux (Ubuntu)

1. Update System and Install Required Packages

First, update your system and install necessary tools:

sudo apt update && sudo apt upgrade -y
sudo apt install openjdk-17-jdk screen wget -y

2. Create a New Folder for the Minecraft Server

mkdir ~/minecraft-server && cd ~/minecraft-server

3. Download and Install the Minecraft Server

Go to Minecraft's official website to find the latest server JAR file. Download it by running:

wget https://launcher.mojang.com/v1/objects/<VERSION>-server.jar -O server.jar

Replace <VERSION> with the latest available version.

4. Accept EULA and Start the Server

echo "eula=true" > eula.txt
screen -S minecraft java -Xmx4G -Xms2G -jar server.jar nogui

This starts the server in the background with 4GB of allocated RAM.

5. Configure the Server

Edit server.properties to customize server settings:

nano server.properties

Modify server-port, motd, and enable whitelist as needed.

6. Open Necessary Firewall Ports

sudo ufw allow 25565/tcp

7. Keep the Server Running

To restart the server after shutdown:

screen -r minecraft

If you want to detach from the session without stopping the server, press CTRL+A followed by D.


Setting Up on Windows Server

1. Install Java

Download and install the latest version of Java JDK 17 from Java’s official website.

2. Download the Minecraft Server

Go to Minecraft's server download page and download the latest server.jar.

3. Create a Folder for the Minecraft Server

Create a folder, e.g., C:\MinecraftServer, and move server.jar there.

4. Accept EULA

Open Notepad and create a file eula.txt with the following content:

eula=true

Save the file in C:\MinecraftServer.

5. Start the Server

Open Command Prompt and navigate to the folder:

cd C:\MinecraftServer
java -Xmx4G -Xms2G -jar server.jar nogui

This starts the server with 4GB of allocated RAM.

6. Configure the Server

Edit server.properties to customize server settings.

7. Open Port 25565 in Firewall

Go to Windows Defender Firewall, create a new rule for port 25565 (TCP), and allow incoming traffic.

8. Keep the Server Running

To run the server in the background, create a start.bat file with the following content:

@echo off
java -Xmx4G -Xms2G -jar server.jar nogui
pause

Double-click start.bat to start the server automatically.


Connecting to Your Server

Once the server is running, players can join by entering your VPS’s IP address in Minecraft’s multiplayer menu.

Example:

connect <your-vps-ip>:25565

Conclusion

You have now set up a Minecraft server on both Linux and Windows. Hosting on a VPS provides better performance and stability compared to hosting on a personal computer. If you're looking for a reliable VPS for your Minecraft server, check out PineRiver's VPS hosting for high-performance solutions!