Back to articles
Gaming News & Servers

Guide to Setting Up Minecraft and Valheim Servers on VPS with Maximum Performance

Detailed guide to setting up Minecraft and Valheim servers on VPS with maximum performance, including system configuration, software optimization, security, and monitoring. Suitable...

DPTCloud Engineering4 min read
Guide to Setting Up Minecraft and Valheim Servers on VPS with Maximum Performance

Preparation Before Setup

To set up Minecraft and Valheim servers with maximum performance, you need a VPS or Dedicated Server with appropriate specifications. Below are the basic requirements:

  • OS: Ubuntu 22.04 LTS or Debian 11 (optimized for game servers)
  • RAM: Minimum 8GB, recommended 16GB or higher
  • CPU: Xeon Gold or equivalent, with high clock speed (especially important for Minecraft and FiveM)
  • Storage: NVMe or SATA SSD, minimum 100GB capacity
  • Bandwidth: Under 100Mbps, but ensure it is not throttled

For VPS, you can use the Anti-DDoS Game Hosting & Pterodactyl Wings service. For Dedicated Server, refer to Xeon Gold Dedicated Servers at CMC & FPT Q9.

Setting Up Game Servers on VPS

1. Install and Configure Pterodactyl Wings

Use Pterodactyl Wings to easily manage game servers. Detailed instructions are available at Fixing Pterodactyl Wings Daemon TLS, SFTP Port, and Container Allocation Errors.

Run the following commands to install Pterodactyl:

sudo apt update
sudo apt install -y curl

curl -sL https://pterodactyl.io/install/panel.sh | bash

2. Create Containers for Minecraft and Valheim

In Pterodactyl, create a new container for each game. Select the appropriate Docker image (e.g., itzg/minecraft-server for Minecraft, valheim-server for Valheim).

Set the environment variables:

  • Minecraft: MEMORY=4G, TYPE=VANILLA, VERSION=1.19.2
  • Valheim: SERVER_NAME=MyValheimServer, SERVER_PASSWORD=yourpassword, SERVER_WORLD=MyWorld

3. Optimize Game Server Performance

To achieve maximum performance, optimize both software and system settings:

Security and Monitoring

1. Install Firewall

Set up a firewall to protect the server from DDoS attacks. Refer to FiveM Server Hardening: Anti-DDoS Firewall & Port 30120 Protection Guide for guidance.

Run the following commands to install UFW:

sudo apt install -y ufw
sudo ufw allow 25565/tcp  # Minecraft
sudo ufw allow 2457/tcp    # Valheim
sudo ufw allow 22/tcp       # SSH
sudo ufw enable

2. Monitor Performance

Monitor server performance using tools like htop, iotop, or glances. Track CPU, RAM, I/O, and network usage.

3. Schedule Regular Backups

Automate daily backups of game server data. Use cron jobs to perform the task:

0 2 * * * tar -czf /backup/minecraft-valheim-$(date +\%Y\%m\%d).tar.gz /home/pterodactyl/servers/minecraft /home/pterodactyl/servers/valheim

Testing and Troubleshooting

1. Test Performance

Run the following command to check CPU and RAM performance:

htop

Ensure CPU and RAM are not overloaded.

2. Fix Common Errors

References

As no direct web source evidence is available, this guide is based on general technical knowledge and previously published related documentation. Installation and configuration steps may vary depending on software versions and operating systems.

Recommended Game Infrastructure

Recommended Game Hosting Plans For This Guide

Powered by high-clock Intel Xeon Gold 6138 / 6146, Gen4 NVMe storage & Pterodactyl Panel with Anti-DDoS.

Game Server Calculator
Xeon 6138

ECO 6138-02

37.400 ₫ / mo

VAT included

  • CPU: 200% vCPU
  • RAM: 4 GB
  • Storage: 20 GB NVMe
Xeon 6138Popular

ECO 6138-04

82.500 ₫ / mo

VAT included

  • CPU: 600% vCPU
  • RAM: 8 GB
  • Storage: 20 GB NVMe
Xeon 6146Popular

ECO 6146-04

242.000 ₫ / mo

VAT included

  • CPU: 600% vCPU
  • RAM: 8 GB
  • Storage: 20 GB NVMe
Instant Pterodactyl deployment in under 60s · 24/7 engineering support.Browse all 16 Game Hosting plans

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478