To install a game server on a VPS, you need a Linux VPS with at least 2 GB of RAM, an SSH connection, and the game's dedicated server software configured with the right firewall rules. The whole process takes between 20 and 40 minutes depending on the game.
This guide walks you through every step, from picking the right VPS plan to getting your friends connected.
Why Run a Game Server on a VPS?
Hosting a game server from your home PC has real drawbacks: your IP address changes, your home internet isn't reliable 24/7, and your machine must stay on at all times. A VPS solves all three problems.
- Static public IP — players always know where to connect.
- 24/7 uptime — the server runs independently of your personal computer.
- Low latency in Mexico — choose a local datacenter and gameplay will be noticeably smoother.
- Dedicated resources — RAM and CPU reserved for the game, not shared with other tenants.
For a broader look at VPS options available in Mexico, visit the VPS servers guide.
Minimum Resources by Game
Before ordering a plan, match the VPS specs to the game's requirements. The table below shows recommended minimums for the most popular titles:
| Game | Minimum RAM | CPU | Storage | Concurrent Players |
|---|---|---|---|---|
| Minecraft (vanilla) | 2 GB | 2 vCPU | 20 GB SSD | up to 10 |
| Minecraft (heavy mods) | 4–8 GB | 4 vCPU | 40 GB SSD | up to 20 |
| CS2 / CSGO | 2 GB | 2 vCPU | 30 GB SSD | 10–16 |
| Valheim | 4 GB | 2 vCPU | 20 GB SSD | up to 10 |
| ARK: Survival | 8 GB | 4 vCPU | 60 GB SSD | up to 30 |
For games not listed, check the official wiki's Dedicated Server Requirements section.
Step by Step: Installing Minecraft on a Ubuntu VPS
We use Minecraft as the example because it's the most requested setup. The general approach works for nearly any Java-based or binary Linux game server.
1. Connect to Your VPS via SSH
ssh root@YOUR_VPS_IP
Once logged in, update the system packages:
apt update && apt upgrade -y
2. Install Java
Minecraft requires Java 21 (or the version specified by the official wiki for your release).
apt install -y openjdk-21-jre-headless
java -version
3. Create a Dedicated User
Never run a game server as root. Create a limited user instead:
adduser minecraft --disabled-password --gecos ""
su - minecraft
4. Download the Server JAR
mkdir ~/server && cd ~/server
wget https://piston-data.mojang.com/v1/objects/.../server.jar -O server.jar
Replace the URL with the latest version from minecraft.net/download/server.
5. Accept the EULA and Start
echo "eula=true" > eula.txt
java -Xmx2G -Xms1G -jar server.jar nogui
Set -Xmx to roughly 75 % of your VPS's available RAM.
6. Open the Firewall Port
Minecraft uses port 25565 TCP/UDP. Open it with UFW:
ufw allow 25565/tcp
ufw allow 25565/udp
ufw enable
7. Keep the Server Running (screen or systemd)
To keep the server alive after you close SSH, use screen:
screen -S minecraft
java -Xmx2G -Xms1G -jar server.jar nogui
# Press Ctrl+A, D to detach without killing the process
For a permanent server, configure a systemd service so it restarts automatically whenever the VPS reboots.
Basic Server Configuration
The server.properties file controls the most important settings:
max-players— maximum number of simultaneous players.difficulty— easy, normal, or hard.online-mode— set totrueto require official Mojang accounts.motd— the message players see in the server list.white-list— enable this to restrict access to invited players only.
Restart the server after any change to server.properties for it to take effect.
Key Takeaways
- A VPS with a static IP and a Mexico-based datacenter delivers the lowest latency for local players.
- Match RAM and CPU to the specific game and expected player count before ordering.
- Always run the server as a non-root user for basic security.
- Open only the ports required by the game — nothing more.
- Use
screenfor quick setups orsystemdfor production-grade reliability. - Back up the world folder regularly, especially before updates.
Ready to launch your game server? The team at elenlace.com can help you choose the right VPS plan and get everything configured so you can start playing on day one.
FAQ
How much does a game server VPS cost in Mexico?
A basic 2 GB RAM VPS starts at around 150–250 MXN/month. For modded Minecraft or more demanding games, a 4–8 GB plan runs roughly 400–900 MXN/month, depending on the provider and whether you pay monthly or annually.
Can I run more than one game on the same VPS?
Yes, as long as you have enough resources and assign different ports to each game. For high-traffic servers it's better to keep each game on its own VPS so one doesn't degrade the other's performance.
Do I need Linux experience to set up a game server?
With the commands in this guide you can get it working even as a beginner — you just need to copy and paste into an SSH terminal. If you prefer a graphical interface, panels like Pterodactyl simplify management, though they require a bit more initial setup.
What happens if the VPS reboots?
If you used screen, the server process will stop. That's why configuring a systemd service with Restart=always is strongly recommended for any server you want to stay online automatically after a reboot or crash.
Prefer it done for you? El Enlace handles hosting and professional web development.
Compare providers
Other providers and guides worth comparing: