Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

Making your own Minecraft Java server on a VPS, step by step

A Minecraft server on a VPS stays online when your PC is off and avoids the port-forwarding problems of home broadband. This guide takes you from a fresh Ubuntu server to friends joining on port 25565.

Short answer: To make a Minecraft server, install Java 25 on a Linux VPS, download Paper or the vanilla server.jar, run it once and set eula=true in eula.txt. Start it with matching -Xms and -Xmx values under systemd, open TCP 25565 in ufw and your provider's firewall, enable the whitelist and online-mode, then players join using the server's IP.

How to make a Minecraft server on a Linux VPS

To make a Minecraft server for Java Edition, you need a Linux machine with a public IP address, the Java version your Minecraft release expects, and the server software: Paper or the vanilla server.jar from minecraft.net. You accept the EULA, run it under systemd and open TCP port 25565, and players join with your IP address. The steps below assume Ubuntu 24.04 on a VPS, but any recent Debian or Ubuntu release works the same way.

Minecraft server setup: quick checklist

  1. Secure the VPS first: SSH key login, updates, a non-root sudo user.
  2. Install Java 25 (needed from Minecraft 26.1 onwards).
  3. Create a dedicated minecraft user to run the server.
  4. Download Paper or the vanilla server jar.
  5. Run it once, then set eula=true in eula.txt.
  6. Write a start script with matching -Xms and -Xmx values.
  7. Run it under systemd so it starts on boot and restarts after a crash.
  8. Open TCP 25565 in ufw and in your provider's firewall.
  9. Turn on the whitelist, add operators, and schedule backups.

Requirements for a Minecraft server on VPS hosting

Minecraft Java Edition 26.1 and later needs Java 25. Releases 1.20.5 to 1.21.11 need Java 21, 1.18 to 1.20.4 need Java 17, and 1.17 needs Java 16, so match Java to the version you plan to run. Memory matters more than CPU count: a small vanilla or Paper server for a group of friends runs comfortably on 4 GB of RAM, while modpacks need far more. Our guide on how much RAM a VPS needs covers sizing in more detail.

Before installing anything, follow Ubuntu VPS initial setup and switch to SSH key login.

Install Java and create a server user

On Ubuntu 24.04 the OpenJDK 25 runtime is in the standard repositories. The headless package is enough, since a server needs no graphics:

sudo apt update
sudo apt install openjdk-25-jre-headless jq tmux
java -version

Never run the server as root. A plugin bug or exploit would then have full control of the machine. Create a system user that owns only the game files:

sudo adduser --system --group --home /opt/minecraft minecraft
sudo -u minecraft -H bash
cd /opt/minecraft

How to create a Minecraft server: download Paper or vanilla

Paper is a widely used, faster fork of the vanilla server that also loads Bukkit and Spigot plugins. Fetch the latest stable build through PaperMC's download service. It asks for a User-Agent that identifies you, so replace the example below with your own name or contact URL:

UA="my-mc-server/1.0 (admin@example.com)"
VER=$(curl -s -H "User-Agent: $UA" https://fill.papermc.io/v3/projects/paper | jq -r '.versions | to_entries[0] | .value[0]')
URL=$(curl -s -H "User-Agent: $UA" "https://fill.papermc.io/v3/projects/paper/versions/$VER/builds" | jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // empty')
echo "$VER $URL"
[ -n "$URL" ] && curl -fL -H "User-Agent: $UA" -o paper.jar "$URL"

If URL comes back empty, that Minecraft version has no stable Paper build yet; pick the previous version or wait. For the vanilla server, copy the server.jar link from the official download page on minecraft.net and fetch it with curl -fL -o server.jar followed by the link. The rest of this guide uses paper.jar; swap the file name if you chose vanilla.

Accept the EULA and write a start script

Run the server once. It creates its folders and an eula.txt file, then stops:

java -Xms2G -Xmx2G -jar paper.jar --nogui

Read the Minecraft EULA at minecraft.net, especially if you plan to charge players for anything, then accept it:

sed -i 's/eula=false/eula=true/' eula.txt

Now create /opt/minecraft/start.sh. PaperMC's docs set -Xms and -Xmx to the same value. Leave roughly 1 to 1.5 GB for the operating system, so on a 4 GB VPS give the server 3 GB:

#!/bin/sh
cd /opt/minecraft
exec java -Xms3G -Xmx3G -jar paper.jar --nogui

Make it executable with chmod +x start.sh, then type exit to leave the minecraft user's shell.

Run the server under systemd or tmux

tmux is the quickest way to get going and gives you the live server console. Start a session with sudo -u minecraft tmux new -s mc /opt/minecraft/start.sh, detach with Ctrl+B then D, and reattach later with sudo -u minecraft tmux attach -t mc. Use it for the first run so you can type console commands such as op.

For a server that should stay up, systemd is better: it starts the server at boot and restarts it after a crash. Create /etc/systemd/system/minecraft.service:

[Unit]
Description=Minecraft server
After=network-online.target
Wants=network-online.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/opt/minecraft/start.sh
Restart=on-failure
RestartSec=10
SuccessExitStatus=0 1 143
TimeoutStopSec=90

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
journalctl -u minecraft -f

On stop, systemd sends SIGTERM: the server saves the world and exits with code 143, which SuccessExitStatus treats as a clean stop. Do not run the tmux session and the service at the same time; two copies on one world folder will corrupt it.

Minecraft server port 25565: open the firewall

Java Edition listens on TCP 25565 by default. Allow SSH before enabling ufw so you do not lock yourself out, then open the game port:

sudo ufw allow OpenSSH
sudo ufw allow 25565/tcp
sudo ufw enable
sudo ufw status

Many providers also run a network firewall in front of the VPS. If that firewall blocks inbound traffic by default, add a rule for TCP 25565 there as well, or players will time out even though ufw is open. If you change server-port, open the new port instead.

server.properties basics

Stop the server before editing server.properties, then start it again. The settings that matter most on a public server:

SettingRecommendedWhy
online-modetrueOnly players with a verified Minecraft account can join, so nobody can impersonate your username.
white-listtrueOnly listed players can join. Recent versions (from the 26.3 snapshots) enable it by default; set it explicitly.
enforce-whitelisttrueKicks anyone removed from the list when it reloads.
view-distance8 to 10Chunks sent to each player (3 to 32). Lower it first if the server lags.
simulation-distance6 to 10How far from players the world keeps ticking.
max-playersYour real group sizeDefault is 20.

Operators and the whitelist

From the server console (the tmux session), add players and make yourself an operator:

whitelist add YourName
whitelist add FriendName
op YourName

Operators can run admin commands in game, so give it only to people you trust. After that, manage the whitelist in game and run the server under systemd.

Backups and updates

Back up the whole /opt/minecraft folder, not just the world. The simplest consistent backup stops the server for a moment:

sudo systemctl stop minecraft
sudo tar -czf /root/mc-$(date +%F).tar.gz -C /opt minecraft
sudo systemctl start minecraft

Run it nightly from cron and copy the archives off the server. To update, take a backup, stop the service, replace paper.jar with the new build, check that your plugins support the new Minecraft version, and start again. Check whether the new release needs a newer Java first. Opening a world in an older version after a newer one has converted it is not supported, so the backup is your only way back.

Bedrock players: Bedrock Dedicated Server or Geyser

Bedrock Edition (phones, consoles, Windows Bedrock) cannot join a Java server directly. You have two options:

  • Bedrock Dedicated Server: Mojang's separate server for Bedrock only. It listens on UDP 19132 (and 19133 for IPv6), and Ubuntu 22.04 or later is the officially supported Linux.
  • Geyser: a Paper plugin that lets Bedrock players join your Java server for crossplay. Put the jar in plugins, restart, and open its port (19132 by default). Geyser's setup docs ask for that port on both TCP and UDP, for example sudo ufw allow 19132. The optional Floodgate plugin lets Bedrock players join without a Java account.

How players connect

In Minecraft Java, players choose Multiplayer, then Add Server, and enter your VPS IP address. On the default port, no :25565 suffix is needed. To use a name such as play.example.com, create a DNS A record pointing at the server IP with your DNS provider. Bedrock players add the same address with port 19132.

How to host a Minecraft server at home in India

If you are working out how to make a Minecraft server on a home PC instead, you must forward port 25565 on your router to that PC. That only works if your connection has a public IPv4 address, and many Indian broadband ISPs, and every mobile network, put customers behind CGNAT. If the WAN address in your router's status page does not match the public IP that websites show you, you are behind CGNAT and port forwarding cannot work. Home connections also change IP and lose power. A VPS avoids all of this.

Running a Minecraft server on Bigdomainhost

A Bigdomainhost KVM VPS gives you full root access, NVMe storage and out-of-band console access, with servers in Mumbai (BOM-1) and Delhi NCR (DEL-1) so Indian players get low ping. Every server sits behind a panel firewall that denies inbound traffic except SSH on port 22, so add a rule for TCP 25565 (and 19132 if you use Bedrock) in the control panel as well as in ufw. The networking docs explain how. To skip the manual work, Minecraft server hosting plans are the same kind of VPS with the Pterodactyl panel pre-installed on request, and support Java and Bedrock. For sizing help, call +91 75994 50220 during IST hours, WhatsApp the same number at any time, or email support@bigdomainhost.com.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

How do I make a Minecraft server?

Get a Linux VPS, install Java 25, and download Paper or the vanilla server.jar. Run it once, change eula=false to eula=true in eula.txt, then start it with a script that sets -Xms and -Xmx. Run it under systemd, open TCP port 25565 in your firewall, and share the server's IP with your players.

What port does a Minecraft server use?

Java Edition uses TCP port 25565 by default, set by server-port in server.properties. Bedrock Dedicated Server uses UDP 19132 for IPv4 and 19133 for IPv6. If you add Geyser for Bedrock crossplay, its setup docs ask for port 19132 on both TCP and UDP. Open these in ufw and in any provider firewall.

What Java version does a Minecraft server need?

Minecraft Java Edition 26.1 and later needs Java 25. Versions 1.20.5 to 1.21.11 need Java 21, 1.18 to 1.20.4 need Java 17, and 1.17 needs Java 16. On Ubuntu 24.04 you can install the runtime with sudo apt install openjdk-25-jre-headless, then check it with java -version before starting the server.

How do I host a Minecraft server for free at home?

You can run it on your own PC and forward port 25565 on your router, but only if your connection has a public IPv4 address. Many Indian broadband ISPs and all mobile networks use CGNAT, which blocks this. Your IP may also change, and the server goes offline whenever the PC or power does.

Can Bedrock players join my Java Minecraft server?

Not directly. Install the Geyser plugin on your Paper server so Bedrock players on phones and consoles can join, and open its port, 19132 by default. Add Floodgate if Bedrock players do not own a Java account. Alternatively, run Mojang's separate Bedrock Dedicated Server, which only Bedrock players can join.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.