Want to play with friends without depending on your PC being on? A Minecraft server on a VPS solves that: it stays online 24 hours a day, with resources reserved for you and a fixed IP. For a small group, start with 2 to 4 GB of RAM; for communities running mods, plan on 6 GB or more. Below you can see how to choose and how to set it up, step by step.
Why host a Minecraft server on a VPS
Running the server on your computer works until the moment you turn the machine off, your home internet drops, or the game and the server compete for the same memory. On shared plans, the problem is different: you share resources with other customers and have little control.
With a VPS server you get root (or administrator) access, reserved resources and the freedom to install whatever you want: Paper, Fabric, Forge, plugins, mods. If your focus is playing, it's worth looking at VPS for games, designed for stability and low latency.
The practical benefits:
- Server online 24/7, even when you're offline.
- Fixed IP, easy to share with friends.
- Full control over version, mods and settings.
- Option to upgrade the plan when the group grows.
How much RAM does a Minecraft server need: table by player count
There's no single number. The amount of RAM depends on the version, the size of the world, how many players are exploring new areas at the same time, and how many plugins or mods you use. The table below is a qualitative reference to get you started and adjust later.
| Group | Server type | Suggested RAM | CPU |
|---|---|---|---|
| Up to 5 friends | Vanilla or Paper | 2 to 4 GB | 2 vCPU |
| 5 to 15 players | Paper with a few plugins | 4 to 6 GB | 2 to 4 vCPU |
| 15 to 30 players | Various plugins | 6 to 8 GB | 4 vCPU |
| Any group | Heavy modpacks | 8 GB or more | 4 vCPU or more |
Keep in mind that part of the RAM is used by the operating system. Don't allocate all of the VPS memory to Java: leave some headroom.
RAM, CPU and disk: what really matters
CPU: Minecraft depends heavily on the performance of a single core. More cores help with parallel tasks, but a fast core makes a difference in the server tick rate.
RAM: more players, more loaded chunks and more mods mean more memory. Allocating too much RAM doesn't help either: it can worsen Java's garbage collection.
Disk: NVMe SSD speeds up loading and saving the world, especially on large maps and when generating new areas.
Which VPS plan fits your group
For a group of friends, an entry-level plan is usually enough. The VPS SSD 2GB 2vCPU Starter handles small servers and lightweight vanilla. If you plan to use plugins or receive more people, the VPS SSD 8GB 4vCPU Starter gives plenty of headroom, including for moderate modpacks.
The tip is to start small, watch RAM and CPU usage over the first few days, and upgrade only when you need to. That way you don't pay for idle resources.
Choose the location: latency for players
Latency is the time it takes for a player's action to reach the server and come back. The farther the datacenter, the higher the ping, and the result shows up as lag when hitting mobs, building or fighting.
If most of your players are in Brazil, the ideal is a server in a national datacenter. The VPS Brasil has a datacenter in Minas Gerais (a state in southeastern Brazil) and a Brazilian IP, which usually lowers ping for players in Brazil. If your group is spread around the world, choose the most central region for your players.
How to set up the Minecraft server on the VPS, step by step
The most common path is to use a Linux VPS with Ubuntu or Debian. The commands below apply to Ubuntu; check the Java version required by your Minecraft version.
1. Order the VPS and connect via SSH
Choose Linux, complete the order and receive the IP and access password. In your computer's terminal, connect with:
ssh root@IP_DA_SUA_VPS
On first access, update the system:
apt update && apt upgrade -y
2. Install Java and download the server
Install a compatible Java. Recent Minecraft versions require newer Java (for example, 21), so check first:
apt install openjdk-21-jre-headless -y
Create a dedicated folder and download the server file (the official one or Paper, from each project's download page):
mkdir /opt/minecraft && cd /opt/minecraft
3. Accept the EULA and start with the RAM you set
Run the server once to generate the files. It will stop and ask you to accept the EULA. Edit the eula.txt file and change eula=false to eula=true.
Then start it, setting the memory with -Xms (initial) and -Xmx (maximum):
java -Xms2G -Xmx3G -jar server.jar nogui
In this example, a 4 GB VPS leaves about 1 GB for the system. Adjust the values to your plan.
4. Open the port and keep the server running
The default port is 25565. With UFW, open it and keep SSH allowed before enabling the firewall:
ufw allow 22/tcp
ufw allow 25565/tcp
ufw enable
To keep the server running after you close the terminal, use screen:
apt install screen -y
screen -S minecraft
Start the server inside that session and detach with Ctrl+A and then D. For something more robust, create a system service (systemd) that restarts the server automatically.
Done: in Minecraft, add the server with the VPS IP and join.
Anti-DDoS protection and security for games
Game servers are frequent targets of denial-of-service attacks, which flood the connection to knock the server offline. This happens because of rivalry between communities or simple vandalism, and even small servers can be hit.
A VPS Anti-DDoS filters this malicious traffic before it reaches your server, keeping the game online. At HostMF, 1.3 Tbps Anti-DDoS protection comes at no additional cost.
Along with network protection, adopt good practices:
- Enable the whitelist so that only authorized players can join.
- Use strong passwords and, if possible, SSH keys.
- Keep the system and the server updated.
- Make regular backups of the world.
- Grant operator (OP) permission only to those who really need it.
Tips to keep the server lightweight and stable
Small adjustments make a big difference in performance:
- Reduce the render distance (
view-distance) to lower the chunk load. - Limit entities, such as animals in huge pens and items lying on the ground.
- Monitor RAM: if usage stays close to the limit, it's a sign that it's time to upgrade your plan.
- Automate world backups and keep copies outside the VPS.
- Prefer Paper when you want better performance with plugins.
If something gets stuck, HostMF's 24/7 support, available in English and Portuguese, can help you identify the problem.
Next step
Group defined, RAM estimated and commands ready: now it's time to bring the world online. Check out HostMF's VPS plans, choose the one that fits your crew and start playing with immediate activation.