If friends should be able to join after you turn off your computer, you can run a Minecraft Java server on a VPS. It is self-managed: you choose the server software and maintain Java, the world, plugins and access rules. This guide sets up a Linux server; it is not managed game hosting and it does not install a modpack for you.
Choose the edition and server software
This guide covers Java Edition. The official Bedrock server is a different program with different system requirements. Download the vanilla JAR from Minecraft’s official Java server download page. If you want Paper for plugins, check Paper’s Java compatibility table for the exact version you plan to run. Do not choose a Java runtime just because it is newest; it must match the server and mods.
Make sure you can comply with the Minecraft EULA. Read its terms and accept eula.txt only if you agree. Do not automate eula=true to bypass that step. Download server software and plugins from the sources for their respective projects.
Prepare Linux and a dedicated account
Choose a Hostbrid VPS with a Linux distribution compatible with the Java version your server needs. Connect over SSH, update the system, and install the compatible runtime. Create an unprivileged game account:
sudo adduser --system --group --home /srv/minecraft minecraft
sudo install -d -o minecraft -g minecraft /srv/minecraft/server
Place the official JAR at /srv/minecraft/server/server.jar and verify its source and version before running it. For Paper, use the artifact for the version you selected and follow that project’s documentation. Do not run the server as root or use an untrusted JAR.
Start once and accept the EULA
Run the server manually as minecraft to generate its initial configuration. Set the memory ceiling after measuring: version, player count, world, simulation distance and plugins all affect usage. Leave memory for Linux and other services; giving Java all available RAM can cause the operating system to terminate the process.
sudo -u minecraft sh -c 'cd /srv/minecraft/server && java -Xms2G -Xmx4G -jar server.jar nogui'
Those example values are not a requirement or capacity guarantee. Review the generated eula.txt. If you agree to its terms, edit the file to set eula=true; then start the server again and inspect logs/latest.log.
Open only the required port
Java Edition normally listens on TCP 25565, unless you change server.properties. Allow that port in the system firewall and any applicable network rules; keep SSH restricted. If you change the port, tell players the new value. Do not expose RCON to the Internet. If you need it, limit access to a trusted network and use a strong password.
Keep online-mode=true unless you understand and accept the implications of a compatible proxy architecture. Consider enabling a whitelist for a private world, limit operator permissions, and keep plugin credentials out of your repository.
Keep it running with systemd
Once the manual test works, create /etc/systemd/system/minecraft.service:
[Unit]
Description=Minecraft Java server
After=network-online.target
Wants=network-online.target
[Service]
User=minecraft
Group=minecraft
WorkingDirectory=/srv/minecraft/server
ExecStart=/usr/bin/java -Xms2G -Xmx4G -jar server.jar nogui
Restart=on-failure
RestartSec=10
NoNewPrivileges=true
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Adjust the Java path and memory after measuring actual use. Enable the unit and inspect status and logs:
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft
journalctl -u minecraft -f
Restart=on-failure recovers from some unexpected exits; it cannot fix an incompatible Java version, broken plugin, memory exhaustion or network problem.
Test, update and back up the world
Connect from outside the VPS network using its IP address and port. Check startup, version, whitelist, client access and error messages. Measure CPU, memory and latency during a session with players; idle usage does not size a busy world.
Before updating, plan a maintenance window, back up the world directory and verify that the backup can be restored. Stop the server cleanly before copying files to reduce corruption risk. Keep at least one backup outside the VPS. Worlds, plugins, loaded chunks and player count all affect memory and storage.
A VPS provides root access to install Java and keep a process running, but the Minecraft server is self-managed. You handle application updates, security, backups and availability. Compare VPS options and current prices against measurements from your own server.
Official sources: Java server download, Minecraft EULA, Paper Java requirements and Paper server properties.