Shopping Cart (0)

Your cart is empty.

NewsWelcome to the future of PineRiver: new website, new domain and New Year's sale! Read more
Support

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 own server up and running quickly.

Prerequisites

Before you begin, make sure 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 is recommended).
  • Java installed.
  • Basic knowledge of SSH (Linux) or Remote Desktop (Windows).

Setup on Linux (Ubuntu)

1. Update the system and install the necessary packages

First, update the system and install the 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 the official Minecraft website to find the latest server jar file. Download it by running:

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

Replace with the latest available version.

4. Accept the EULA and start the server

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

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

5. Configure the server

Edit server.properties to customize server settings:

nano server.properties

For example, change the server port, motd, and enable whitelist as needed.

6. Open the necessary ports in the firewall

sudo ufw allow 25565/tcp

7. Keep the server running

To restart the server after a shutdown:

screen -r minecraft

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


Setup 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 to it.

4. Accept the 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 will start the server with 4GB of RAM allocated.

6. Configure the server

Edit server.properties to customize server settings.

7. Open port 25565 in the firewall

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

8. Keep the server running

To run the server in the background, you can create a start.batfile with the following content:

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

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


Connecting to your server

Once the server has started, players can connect by entering your VPS's IP address in Minecraft's multiplayer menu.

Example:

connect :25565

Conclusion

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

Are you ready to begin?

Create Your Own ServerAre you ready to begin?

Start your server today and we'll give you a 25% discount on your first server. Use code NEW25 at checkout.