Install Minecraft Server on VPS: Complete Setup Guide
Learn how to install a Minecraft server on VPS with this complete setup guide. Get dedicated resources, guaranteed uptime & full control for optimal gameplay.
Install Minecraft Server on VPS: Complete Setup Guide
A Virtual Private Server (VPS) provides an optimal hosting environment for Minecraft servers, offering dedicated resources, guaranteed uptime, and full administrative control. This setup eliminates the limitations of personal computer hosting while providing a stable, dedicated IP address for your server.
Note: This guide uses Ubuntu 22.04 as the base operating system.
Java Edition Installation
Prerequisites and Java Setup
Connect to your VPS server via SSH
Update the system package repository:
sudo apt-get updateInstall the appropriate Java version based on your Minecraft version:
sudo apt install [OpenJDK version]
Java Version Requirements
| Minecraft Version | Java Version | OpenJDK Package |
|---|---|---|
| 1.16.x and below | Java 8 | openjdk-8-jre-headless |
| 1.17.x | Java 16 | openjdk-16-jre-headless |
| 1.18.x - 1.20.4 | Java 17 | openjdk-17-jre-headless |
| 1.20.5 and above | Java 21 | openjdk-21-jre-headless |
- Confirm installation when prompted by entering
y
Server Environment Setup
Install screen for session management:
sudo apt install screen -yCreate a dedicated user for the Minecraft server:
sudo useradd -r -U -d /usr/local/games/minecraft_server/ -s /usr/sbin/nologin [Username]Security Note: Never use root or privileged users to prevent security vulnerabilities.
Create the server directory structure:
sudo mkdir -p /usr/local/games/minecraft_server/javaAssign ownership to the Minecraft user:
sudo chown -R [Username]: /usr/local/games/minecraft_server/
Server Installation and Configuration
Switch to the Minecraft user:
sudo su - [Username] -s /bin/bashNavigate to the Java server directory:
cd /usr/local/games/minecraft_server/javaDownload the server JAR file (obtain links from MCVersions.net):
wget [server.jar link]Create a screen session:
screen -S [Screen name]Perform initial server boot:
java -Xmx1024M -Xms1024M -jar server.jar noguiAccept the End User License Agreement:
sed -i 's/\bfalse\b/TRUE/' eula.txtLaunch the server with custom RAM allocation:
java -Xmx1024M -Xms1024M -jar server.jar noguiAdjust
-Xmxand-Xmsvalues based on your VPS RAM allocation.
Bedrock Edition Installation
Initial Setup
Connect to your VPS server via SSH
Install required packages:
sudo apt install screen -yNavigate to the temporary directory:
cd /tmpDownload the Bedrock server (obtain links from the official Minecraft wiki):
wget [server link]
Server Extraction and Configuration
Install unzip utility and extract server files:
apt-get install unzip sudo unzip -d /usr/local/games/minecraft_server/bedrock [.zip filename]Create a dedicated user account:
sudo useradd -r -U -d /usr/local/games/minecraft_server/ -s /usr/sbin/nologin [Username]Create the Bedrock directory:
sudo mkdir -p /usr/local/games/minecraft_server/bedrockSet directory permissions:
sudo chown -R [Username]: /usr/local/games/minecraft_server/
Launch Script Creation
Switch to the Minecraft user:
sudo su - [Username] -s /bin/bashNavigate to the Bedrock directory:
cd bedrockCreate the launch script:
nano launch_mc_bedrock_server.shAdd the following content to the script:
#!/bin/bash LD_LIBRARY_PATH=. ./bedrock_serverSave and exit (Ctrl+S, then Ctrl+X)
Make the script executable:
chmod +x launch_mc_bedrock_server.sh
Server Launch
Create a screen session:
screen -S [Screen name]Launch the Bedrock server:
./launch_mc_bedrock_server.sh
Related Articles
- SSH Connection Guide - Connect to your VPS before starting setup
- Common Ubuntu Commands - Reference for Linux commands used in this guide
- VPS Setup Guide - Initial VPS configuration before installing Minecraft
- Configure Windows Firewall Ports - Open ports for player connections
Want hassle-free Minecraft hosting? View Vluxon Minecraft Server plans with instant setup, or deploy on your own VPS for full control.