Recommended VPS Specifications
| Server Size | RAM | CPU Cores | Storage | Max Players |
|---|---|---|---|---|
| Small | 2GB | 1 | 20GB | 5-10 |
| Medium | 4GB | 2 | 40GB | 10-20 |
| Large | 8GB | 4 | 80GB | 20-50 |
| XL | 16GB | 6 | 160GB | 50+ |
Prerequisites
Before starting, ensure you have:
System Requirements
- • Minimum: 2GB RAM (4GB+ recommended)
- • Ubuntu 24.04 or Debian 11/12
- • Root or sudo access
- • SSH client installed locally
Before You Begin
- • Basic Linux command line familiarity
- • Minecraft Java Edition account
- • Static IP address (included with VPS)
- • Optional: Domain name for easier access
Initial Server Setup
Connect to your RamNode VPS and prepare the system:
ssh root@your-server-ipapt update && apt upgrade -yCreate a Dedicated User
Running Minecraft as root is a security risk. Create a dedicated user:
adduser minecraft
usermod -aG sudo minecraftsu - minecraftInstall Java
Minecraft Java Edition 26.1 and later requires Java 25. Versions 1.20.5 through 1.21.11 require Java 21; Java 17 is only suitable for older versions such as 1.18 through 1.20.4. Install Java 25 for the current server download:
sudo apt install -y ca-certificates curl gnupg
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo gpg --dearmor -o /etc/apt/keyrings/adoptium.gpg
sudo chmod a+r /etc/apt/keyrings/adoptium.gpg
. /etc/os-release
echo "deb [signed-by=/etc/apt/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt update
sudo apt install -y temurin-25-jre
# If another Java version is installed, select Java 25:
sudo update-alternatives --config javajava -versionConfirm that java -version reports openjdk version "25... before continuing. Java 17 or 21 cannot start a 26.1+ server. See the official Temurin Linux installation instructions for supported distributions.
Install Screen
Screen allows you to run the Minecraft server in a persistent session that continues running even after you disconnect from SSH:
sudo apt install screen -yDownload Minecraft Server
Create a directory and download the server JAR:
mkdir ~/minecraft-server
cd ~/minecraft-serverCopy the current server JAR download URL from the official Minecraft website and paste it when prompted. This avoids accidentally downloading an old, pinned release:
read -r -p "Paste the official server JAR HTTPS URL: " SERVER_JAR_URL
curl --fail --location --proto '=https' --proto-redir '=https' "$SERVER_JAR_URL" -o minecraft_server.jar💡 Note: Use the official Minecraft server download page for the latest version URL. Match your Java runtime and players' clients to the server version you choose.
Configure Server
Accept the EULA
Run the server once to generate configuration files:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar noguiThis will fail because you haven't accepted the EULA yet. Edit the eula.txt file:
nano eula.txt
# Change eula=false to eula=trueConfigure Server Properties
nano server.properties# Server name and MOTD
motd=My RamNode Minecraft Server
# Game mode (survival, creative, adventure, spectator)
gamemode=survival
# Difficulty (peaceful, easy, normal, hard)
difficulty=normal
# Maximum players
max-players=20
# View distance (lower = better performance)
view-distance=10
# Enable whitelist for private servers
white-list=false
# Server port (default 25565)
server-port=25565
# Online mode (verify players with Mojang)
online-mode=trueSince Java Edition 1.21.9, PvP and command blocks are controlled by game rules, not server.properties. Both default to enabled. The old pvp and enable-command-block properties are ignored on current servers; adding them does not switch either feature off. Apply the optional rules after starting the server in Step 9.
JVM Optimization
Create a startup script with a simple Java 25-compatible G1 configuration. Older tuning bundles can contain flags removed from newer Java releases:
nano start.sh#!/bin/bash
# Minecraft Server Start Script
# Adjust -Xms and -Xmx values based on available RAM:
# For 4GB VPS: -Xms3G -Xmx3G
# For 8GB VPS: -Xms6G -Xmx6G
exec java -Xms2G -Xmx2G -XX:+UseG1GC -jar minecraft_server.jar noguichmod +x start.shUnderstanding the JVM Flags
- •
-Xmsand-Xmx: Initial and maximum heap size (allocate 50-80% of available RAM) - •
-XX:+UseG1GC: Use the G1 garbage collector - • Start with these basic flags and measure performance before adding version-specific tuning
Configure Firewall
Configure UFW to allow Minecraft traffic:
sudo apt install ufw -y
# Allow SSH
sudo ufw allow 22/tcp
# Allow Minecraft
sudo ufw allow 25565/tcp
# Enable firewall
sudo ufw enablesudo ufw statusStart the Server
Launch the server in a Screen session:
screen -S minecraft./start.sh✓ The server will start and begin generating the world. This may take a few minutes on the first run.
Optional: Disable Command Blocks or PvP
Once the server reports that it is ready, run either command once in its Minecraft console to disable that feature. These are Minecraft commands, not Linux shell commands. Console commands omit the leading slash; an operator running them in-game must add /.
gamerule command_blocks_work false
gamerule pvp falseOn Java Edition 1.21.9 and 1.21.10, use the older command block rule name instead; the PvP rule is unchanged:
gamerule commandBlocksEnabled false
gamerule pvp falseThe rules are saved with the world and persist across restarts; repeat them when creating a new world. Query a rule by omitting false, or set it to true to re-enable it. See the 1.21.9 changes and Minecraft Wiki game rule reference.
Screen Commands
- • Detach from screen: Press
Ctrl+AthenD - • Reattach to screen:
screen -r minecraft
Create Systemd Service
For automatic startup on boot and easier management, create a systemd service:
sudo nano /etc/systemd/system/minecraft.service[Unit]
Description=Minecraft Server
After=network.target
[Service]
Type=simple
User=minecraft
WorkingDirectory=/home/minecraft/minecraft-server
ExecStart=/home/minecraft/minecraft-server/start.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target# Reload systemd
sudo systemctl daemon-reload
# Enable service to start on boot
sudo systemctl enable minecraft
# Start the service
sudo systemctl start minecraft
# Check status
sudo systemctl status minecraftService Management Commands
sudo systemctl start minecraft
sudo systemctl stop minecraft
sudo systemctl restart minecraft
sudo journalctl -u minecraft -fBackup Configuration
Regular backups are essential. Create a backup script:
nano ~/backup-minecraft.sh#!/bin/bash
BACKUP_DIR="/home/minecraft/backups"
SERVER_DIR="/home/minecraft/minecraft-server"
DATE=$(date +%Y%m%d-%H%M%S)
# Create backup directory if it doesn't exist
mkdir -p $BACKUP_DIR
# Stop server gracefully
systemctl stop minecraft
# Create backup
tar -czf $BACKUP_DIR/minecraft-backup-$DATE.tar.gz -C $SERVER_DIR .
# Keep only last 7 backups
ls -t $BACKUP_DIR/minecraft-backup-*.tar.gz | tail -n +8 | xargs -r rm
# Start server
systemctl start minecraft
echo "Backup completed: minecraft-backup-$DATE.tar.gz"chmod +x ~/backup-minecraft.sh
# Add cron job for daily backups at 3 AM
crontab -e
# Add this line:
0 3 * * * /home/minecraft/backup-minecraft.sh >> /home/minecraft/backup.log 2>&1Performance Optimization
Optimize server properties for better performance:
# Reduce view distance on lower-spec servers
view-distance=8
# Simulation distance (1.18+)
simulation-distance=8
# Reduce network compression
network-compression-threshold=256If your world does not need command blocks, disable them using the version-specific console game rule in Step 9, not a server.properties setting.
Monitor Server Performance
sudo apt install htop -y
htopWorld Pre-generation
Pre-generating world chunks reduces lag during gameplay:
- Install a pre-generation plugin like Chunky
- Or use the /worldborder command to limit world size
- Pre-generate within the border
Security Hardening
Enable Whitelist
For private servers, enable the whitelist in the server console:
# In server console
whitelist on
whitelist add playernameInstall Fail2Ban
Protect against brute force attacks. See our Fail2Ban guide for detailed configuration.
sudo apt install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2banSSH Key Authentication
Disable password authentication for SSH:
sudo nano /etc/ssh/sshd_config
# Set: PasswordAuthentication no
sudo systemctl restart sshdInstall Plugins (Optional)
For enhanced functionality, consider using Paper (optimized Minecraft server):
Choose a build for your Minecraft version from the official Paper downloads, check its Java requirement, and copy its JAR download URL:
cd ~/minecraft-server
read -r -p "Paste the official Paper JAR HTTPS URL: " PAPER_JAR_URL
curl --fail --location --proto '=https' --proto-redir '=https' "$PAPER_JAR_URL" -o paper.jarUpdate your start.sh to use paper.jar instead of minecraft_server.jar.
Popular Plugins
- • EssentialsX: Core commands and features
- • WorldEdit: World editing tools
- • LuckPerms: Permissions management
- • Dynmap: Web-based map
- • CoreProtect: Block logging and rollback
Connecting to Your Server
Players can connect using your server IP address:
your-server-ip:25565Set Up a Domain Name (Optional)
For easier access, point a domain to your server:
- Create an A record pointing to your VPS IP
- Players can connect using: minecraft.yourdomain.com
Troubleshooting
Performance Benchmarks (4GB RAM, 2 CPU)
| Server Type | Player Capacity | TPS |
|---|---|---|
| Vanilla Server | 15-20 players | Stable 20 TPS |
| Paper Server | 20-30 players | Stable 20 TPS |
| Modded Server | 10-15 players | (resource-intensive mods) |
Minecraft Server Successfully Deployed!
You now have a fully functional Minecraft server running on your RamNode VPS! Your server is optimized for performance, secured against common threats, and configured with automated backups.
Next Steps:
- Customize spawn area and build welcome structures
- Install plugins to enhance gameplay
- Invite friends and build your community
- Monitor performance and adjust settings as needed
