← Volver al blog

How to Set Up a Minecraft Server on a VPS

  • Xernode
  • 1 min de lectura
  • 19 de marzo de 2026
Game Servers linux vps minecraft game server

Introduction:
Hosting your own Minecraft server on a VPS gives you full control, better performance, and the ability to play with friends anytime. This guide shows you how to set up a Minecraft server step by step.

Step-by-step Guide

  1. Update your system:
    • sudo apt update && sudo apt upgrade -y
  2. Install Java (required for Minecraft):
    • sudo apt install openjdk-17-jre-headless
  3. Create a new user for Minecraft:
    • sudo adduser --disabled-login minecraft
    • sudo su - minecraft
  4. Download the latest Minecraft server JAR:
    • wget https://launcher.mojang.com/v1/objects/$(curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | grep -oP '(?<="url":")[^"]release[^"]' | head -1 | xargs curl -s | grep -oP '(?<="server":")[^"]*' | head -1) -O minecraft_server.jarn
      • (Or download manually from the official Minecraft site if the above fails.)
  5. Start the server for the first time:
    • java -Xmx1024M -Xms1024M -jar minecraft_server.jar noguin
      • This will create the EULA file and initial configs.
  6. Accept the EULA:
    • ano eula.txtn
      • Change eula=false to eula=true and save.
  7. Start the server again:
    • java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
  8. (Optional) Open the Minecraft port in your firewall:
    • sudo ufw allow 25565/tcp

Recommendations

  • Use screen or tmux to keep your server running after closing SSH.
  • Regularly back up your world data.
  • Allocate more RAM if needed for larger servers.

Call To Action

Want lag-free Minecraft hosting? Try our powerful VPS plans! https://xernode.com/#pricing

Related Guides

How to Enable Firewall (UFW) in Ubuntu

How to Install Docker on a VPS