Gaming Server

    Deploying Minecraft Java Edition Server on RamNode VPS

    Host your own Minecraft server with complete control over your gaming experience. Whether you're setting up a private server for friends or a public community server, RamNode's high-performance VPS infrastructure provides low latency and reliable uptime for your Minecraft adventures.

    Ubuntu/Debian
    Java Edition
    ⏱️ 20-30 minutes

    Recommended VPS Specifications

    Server SizeRAMCPU CoresStorageMax Players
    Small2GB120GB5-10
    Medium4GB240GB10-20
    Large8GB480GB20-50
    XL16GB6160GB50+

    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
    2

    Initial Server Setup

    Connect to your RamNode VPS and prepare the system:

    Connect via SSH
    ssh root@your-server-ip
    Update System Packages
    apt update && apt upgrade -y

    Create a Dedicated User

    Running Minecraft as root is a security risk. Create a dedicated user:

    Create Minecraft User
    adduser minecraft
    usermod -aG sudo minecraft
    Switch to Minecraft User
    su - minecraft
    3

    Install Java

    Minecraft Java Edition requires Java to run. Install OpenJDK 17 (recommended for Minecraft 1.18+):

    Install OpenJDK 17
    sudo apt install openjdk-17-jre-headless -y
    Verify Installation
    java -version

    ✓ You should see output indicating Java 17 is installed: openjdk version "17.0.x"

    4

    Install Screen

    Screen allows you to run the Minecraft server in a persistent session that continues running even after you disconnect from SSH:

    Install Screen
    sudo apt install screen -y
    5

    Download Minecraft Server

    Create a directory and download the server JAR:

    Create Server Directory
    mkdir ~/minecraft-server
    cd ~/minecraft-server
    Download Server JAR (v1.20.4 example)
    wget 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.

    6

    Configure Server

    Accept the EULA

    Run the server once to generate configuration files:

    Initial Run
    java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

    This will fail because you haven't accepted the EULA yet. Edit the eula.txt file:

    Accept EULA
    nano eula.txt
    # Change eula=false to eula=true

    Configure Server Properties

    Edit Server Properties
    nano server.properties
    Key Settings
    # 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=true
    7

    JVM Optimization

    Create a startup script with optimized Java flags for better performance:

    Create Start Script
    nano start.sh
    Optimized Start Script (Aikars Flags)
    #!/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 nogui
    Make Script Executable
    chmod +x start.sh

    Understanding the JVM Flags

    • -Xms and -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
    8

    Configure Firewall

    Configure UFW to allow Minecraft traffic:

    Install and Configure UFW
    sudo apt install ufw -y
    
    # Allow SSH
    sudo ufw allow 22/tcp
    
    # Allow Minecraft
    sudo ufw allow 25565/tcp
    
    # Enable firewall
    sudo ufw enable
    Verify Firewall Rules
    sudo ufw status
    9

    Start the Server

    Launch the server in a Screen session:

    Create Screen Session
    screen -S minecraft
    Start the Server
    ./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+A then D
    • Reattach to screen: screen -r minecraft
    10

    Create Systemd Service

    For automatic startup on boot and easier management, create a systemd service:

    Create Service File
    sudo nano /etc/systemd/system/minecraft.service
    Service Configuration
    [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
    Enable and Start Service
    # 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 minecraft

    Service Management Commands

    Manage Service
    sudo systemctl start minecraft
    sudo systemctl stop minecraft
    sudo systemctl restart minecraft
    sudo journalctl -u minecraft -f
    11

    Backup Configuration

    Regular backups are essential. Create a backup script:

    Create Backup Script
    nano ~/backup-minecraft.sh
    Backup Script
    #!/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"
    Make Executable and Schedule
    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>&1
    12

    Performance Optimization

    Optimize server properties for better performance:

    Optimized server.properties
    # 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=false

    Monitor Server Performance

    Install htop
    sudo apt install htop -y
    htop

    World 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
    13

    Security Hardening

    Enable Whitelist

    For private servers, enable the whitelist in the server console:

    Whitelist Commands
    # In server console
    whitelist on
    whitelist add playername

    Install Fail2Ban

    Protect against brute force attacks. See our Fail2Ban guide for detailed configuration.

    Install Fail2Ban
    sudo apt install fail2ban -y
    sudo systemctl enable fail2ban
    sudo systemctl start fail2ban

    SSH Key Authentication

    Disable password authentication for SSH:

    Disable Password Auth
    sudo nano /etc/ssh/sshd_config
    # Set: PasswordAuthentication no
    sudo systemctl restart sshd
    14

    Install Plugins (Optional)

    For enhanced functionality, consider using Paper (optimized Minecraft server):

    Download Paper
    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.jar

    Update 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
    15

    Connecting to Your Server

    Players can connect using your server IP address:

    Server Address
    your-server-ip:25565

    Set Up a Domain Name (Optional)

    For easier access, point a domain to your server:

    1. Create an A record pointing to your VPS IP
    2. Players can connect using: minecraft.yourdomain.com
    16

    Troubleshooting

    Performance Benchmarks (4GB RAM, 2 CPU)

    Server TypePlayer CapacityTPS
    Vanilla Server15-20 playersStable 20 TPS
    Paper Server20-30 playersStable 20 TPS
    Modded Server10-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