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 22.04/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 requires Java to run. Install OpenJDK 17 (recommended for Minecraft 1.18+):
sudo apt install openjdk-17-jre-headless -yjava -version✓ You should see output indicating Java 17 is installed: openjdk version "17.0.x"
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-serverwget https://piston-data.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar -O minecraft_server.jar💡 Note: Check the official Minecraft website for the latest version URL.
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
# PvP enabled
pvp=true
# Server port (default 25565)
server-port=25565
# Online mode (verify players with Mojang)
online-mode=trueJVM Optimization
Create a startup script with optimized Java flags for better performance:
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
java -Xms2G -Xmx2G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 \
-XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 \
-XX:G1HeapWastePercent=5 \
-XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 \
-XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 \
-XX:+PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 \
-Dusing.aikars.flags=https://mcflags.emc.gs \
-Daikars.new.flags=true \
-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 G1 garbage collector (best for Minecraft) - •
-XX:MaxGCPauseMillis=200: Target maximum GC pause time - • Aikars flags: Community-optimized flags for Minecraft performance
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.
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=256
# Disable unnecessary features
enable-command-block=falseMonitor 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):
cd ~/minecraft-server
wget https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/latest/downloads/paper-1.20.4.jar -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
