How to Set Up a Minecraft Server on a VDS Print

  • 0

How to Set Up a Minecraft Server on a VDS

Hosting your own Minecraft server on a VDS (Virtual Dedicated Server) gives you complete control, full root access, and the flexibility to customize the game exactly how you want. This guide walks you through the entire setup process — from preparing your server to letting your friends join the fun. The steps focus on the standard Java Edition of Minecraft, which runs on Linux (Ubuntu).


Prerequisites

Before you begin, make sure you have:

 
 
Requirement Details
VDS with Linux Ubuntu 22.04 LTS or 24.04 LTS is recommended
SSH access Root or sudo user access to your server
Basic Linux knowledge Comfortable with terminal commands like cd, ls, mkdir
Open port TCP port 25565 (default Minecraft port) must be accessible

Step-by-Step Installation

Step 1: Connect and Update Your System

Connect to your VDS via SSH and update the package list:

ssh root@your-server-ip
sudo apt update && sudo apt upgrade -y

Step 2: Install Required Software

You'll need three key components: Java (Minecraft server is written in Java), the screen utility (to keep the server running in the background), and a text editor.

Install them with:

sudo apt install openjdk-21-jdk screen wget -y

To verify Java was installed correctly, run:

java -version

Step 3: Open the Firewall

Allow traffic on port 25565, which Minecraft uses by default :

sudo ufw allow 25565/tcp
sudo ufw enable

Check the firewall status with sudo ufw status to confirm the rule is active.

Step 4: Download the Minecraft Server Files

Create a directory for your server, navigate into it, and download the official server file:

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

Important: The download link changes with each game update. Visit the official Minecraft download page to get the latest link. Use the wget command with that link . For example:

wget -O server.jar [paste-the-latest-server-link-here]

The -O server.jar option saves the file with a predictable name.

Step 5: Run the Server for the First Time

Start the server to generate the necessary configuration files:

java -Xmx1024M -Xms1024M -jar server.jar nogui

The server will stop after a few moments because you haven't accepted the End User License Agreement (EULA) yet .

Step 6: Accept the EULA

Open the eula.txt file that was generated:

nano eula.txt

Change eula=false to eula=true, save the file (Ctrl+O, then Enter), and exit (Ctrl+X) .

Step 7: Start the Server with Screen

To keep the Minecraft server running even after you disconnect from SSH, use screen :

screen -S minecraft
java -Xmx1024M -Xms1024M -jar server.jar nogui

You can now detach from the screen session by pressing Ctrl+A, then D. The server will continue running in the background. To reattach, use:

screen -r minecraft

Step 8: Configure Your Server

The main configuration file is server.properties, located in your server directory. Open it to adjust settings like game mode, difficulty, and player slots:

nano ~/minecraft-server/server.properties

Common settings to adjust include:

  • gamemode=survival (or creative)

  • difficulty=normal

  • max-players=20

  • motd=My Awesome Minecraft Server (message of the day)

Save the file and restart your server for changes to take effect.

Step 9: Connect to Your Server

  1. Open Minecraft Java Edition on your computer

  2. Go to MultiplayerDirect Connect

  3. Enter your VDS IP address (and port if not default): your-server-ip:25565

  4. Click Join Server


Server Performance Tips

The right VDS resources depend on how many players you expect and whether you use mods:

 
 
Scenario Recommended Resources
Vanilla server (up to 10 players) 4 vCPU, 8 GB RAM, 50 GB SSD
Modded server or 10–25 players 6–8 vCPU, 12–16 GB RAM, 100 GB SSD
Large modpacks or 25+ players 8–12 vCPU, 32 GB+ RAM, 200 GB+ SSD

Key CPU factor: Most game servers, including Minecraft, rely heavily on single-core performance rather than core count. A VDS with high clock-speed CPUs (3.5 GHz+) will perform better than one with many slower cores .


Frequently Asked Questions

Q: Can I install mods on my server?
A: Yes. You'll need to use a modded server software like PaperMC, Spigot, or Forge. These are drop-in replacements for the vanilla server.jar file.

Q: How do I update my server to a new version?
A: Stop the server (in your screen session, type stop), download the new server.jar from the official site, replace the old file, and start the server again.

Q: Can I run a Bedrock Edition server instead?
A: Yes. Bedrock has its own dedicated server software available from Mojang. It has similar system requirements and runs on both Windows and Linux .

Q: How do I keep the server running after I log out?
A: That's what screen does. After you detach with Ctrl+A, D, the server stays active in the background. You can log out of SSH and the server will continue running.


Ready to Start Your Minecraft Server?


Was this answer helpful?

« Back