- Published on
How to Set Up a Hetzner Server for Game Hosting in 15 Minutes
You can set up a Hetzner server for game hosting in under 15 minutes by creating a Cloud Console account and deploying a dedicated vCPU (virtual Central Processing Unit) instance. For most modern games like Minecraft or Palworld, selecting a server with at least 8GB of RAM and Ubuntu 26.04 LTS will provide a lag-free experience for 10 to 20 players.
What do you need before starting?
Before you jump into the technical steps, you need a few things ready. Having these prepared will prevent you from getting stuck halfway through the process.
- A Hetzner Account: Visit the Hetzner website and sign up for a Cloud account.
- A Valid Payment Method: You will need a credit card or PayPal account to verify your identity.
- An SSH Key: This is a secure way to log into your server without a password. You can generate one using "PuTTYgen" on Windows or the
ssh-keygencommand on macOS and Linux. - An SSH Client: You need a program to talk to your server, such as PuTTY (for Windows) or the built-in Terminal (for Mac/Linux).
Why choose Hetzner for your game server?
Hetzner offers a high performance-to-price ratio that is hard to beat for indie developers and hobbyists. Their Cloud servers use fast NVMe (Non-Volatile Memory Express) storage, which means game worlds and player data load much faster than on traditional hard drives.
We have found that their "Dedicated vCPU" instances are the best choice for gaming because they ensure your server doesn't share processing power with other users. This prevents "micro-stuttering," which is when a game freezes for a split second because another user on the same physical hardware is using too many resources.
How do you create your first server?
Once your account is verified, you will manage everything through the Hetzner Cloud Console. This is a web-based dashboard where you can start, stop, and delete your servers.
- Create a Project: Log in and click "New Project." Give it a name like "MyGameServer."
- Add a Server: Click the red "Add Server" button inside your project.
- Select a Location: Choose a data center closest to your players (e.g., Falkenstein for Europe or Ashburn for North America) to keep latency (the delay between a player's action and the server's response) low.
- Pick an Image: Select Ubuntu 26.04 LTS. This is a stable version of Linux that receives long-term support and security updates.
- Select the Type: Choose "Dedicated vCPU" and pick a plan like the CCX13 (2 vCPU, 8GB RAM). This is usually enough for most small community servers.
- Add your SSH Key: Paste your public SSH key into the box provided so you can log in securely.
- Give it a Name: Scroll to the bottom, name your server (e.g., "minecraft-live"), and click "Create & Buy Now."
How do you connect to your server?
After clicking create, your server will be ready in seconds. You will see an IP address (a string of numbers like 123.45.67.89) next to your server name in the dashboard.
- Open your Terminal or PuTTY: If using a terminal, type
ssh root@your_server_ip. - Accept the Fingerprint: The first time you connect, your computer will ask if you trust the server. Type "yes."
- Update the System: Once you are logged in, run the following command to make sure your server has the latest security fixes:
# Update the list of available software packages
sudo apt update
# Install the latest versions of all current software
sudo apt upgrade -y
How do you prepare the server for game software?
Most game servers require a specific environment to run. Since you are likely running a game like Minecraft or a Steam-based game (like Valheim), you will need to install a few foundational tools.
- Install Java (for Minecraft): Run
sudo apt install openjdk-21-jre-headless -y. - Install SteamCMD (for Steam games): This is a command-line version of Steam used to download game server files.
- Create a User: Never run a game server as the "root" (administrator) user for security reasons. Use this command:
# Create a new user named 'gaming'
sudo adduser gaming
# Switch to that user
su - gaming
What are the common mistakes to avoid?
It is normal to feel a bit overwhelmed the first time you see a black command-line screen. Even experienced developers make mistakes during the initial setup.
- Forgetting the Firewall: Hetzner has a built-in Cloud Firewall. If your players can't connect, check if you have opened the specific "Port" (a virtual door for data) your game uses, such as 25565 for Minecraft.
- Running out of Disk Space: Log files can grow quickly. Check your disk usage occasionally by typing
df -h. - Not using a "Screen": If you start a game server and then close your terminal window, the game will stop. Use a tool like
screenortmuxto keep the process running in the background.
To keep your game running even after you log off, you can use this simple command:
# Start a new virtual window
screen -S gameserver
# Run your game (example for Minecraft)
java -Xmx4G -jar server.jar nogui
# To leave the window running, press Ctrl+A, then D
How do you fine-tune performance?
To get the most out of your hardware, you should adjust the settings based on your player count. If the game feels laggy, you might need to adjust the "Start-up Flags" (extra instructions given to the software when it starts).
For example, in Java-based games, the -Xmx flag tells the server how much RAM it is allowed to use. If your server has 8GB of RAM, setting this to -Xmx6G leaves 2GB for the operating system to handle background tasks, which helps keep the connection stable.
Next Steps
Now that your server is running, you can start customizing your game with mods or plugins. You might also want to look into setting up automated backups so you never lose your world progress.
If you want to dive deeper into the technical side of managing your instance, there are many detailed guides available. For more information on specific commands and advanced features, visit the official Hetzner documentation.