VPS Cho Game Server 2026 - Cài Minecraft, CS2, Palworld, Valheim, Terraria Trên VPS Giá Rẻ
Bạn muốn tự host game server để chơi với bạn bè mà không phụ thuộc vào hosting service đắt đỏ? Một VPS giá rẻ chỉ từ 40K-160K/tháng là đủ để chạy Minecraft, CS2, Palworld, Valheim hay Terraria cho 10-20 người chơi. Bài viết này sẽ hướng dẫn bạn chọn cấu hình VPS phù hợp với từng game, cài đặt server step-by-step, và tối ưu ping cho game thủ Việt Nam.
1. Tại Sao Nên Dùng VPS Để Chạy Game Server?
| Phương án | Chi phí/tháng | Ưu điểm | Nhược điểm |
|---|---|---|---|
| Host tại nhà (PC cá nhân) | Tiền điện ~100-200K | Miễn phí phần cứng | IP động, mất điện = server tắt, bảo mật kém, ping cao cho bạn ở xa |
| Game hosting service | 200K-1 triệu | Dễ cài, có panel quản lý | Đắt, giới hạn slot, không tùy chỉnh được, hiệu năng chia sẻ |
| VPS riêng | 40K-160K | Toàn quyền kiểm soát, IP tĩnh, uptime 24/7, hiệu năng riêng, rẻ hơn hosting service | Cần biết Linux cơ bản, tự cài đặt |
Rõ ràng VPS là lựa chọn tối ưu nhất về chi phí và quyền kiểm soát. Với hướng dẫn trong bài này, bạn không cần là chuyên gia Linux vẫn cài được.
2. Cấu Hình VPS Khuyên Dùng Cho Từng Game
| Game | RAM tối thiểu | RAM khuyên dùng | CPU | Ổ cứng | Slot | Giá VPS TrumVPS |
|---|---|---|---|---|---|---|
| Minecraft Vanilla | 2GB | 4GB | 2 Core+ | 20GB+ | 5-15 | 80K |
| Minecraft Modpack (FTB, ATM) | 4GB | 6-8GB | 4 Core+ | 30GB+ | 5-10 | 160K |
| CS2 (Counter-Strike 2) | 2GB | 4GB | 2 Core+ | 30GB | 10-32 | 80K |
| Palworld | 4GB | 8GB | 4 Core+ | 30GB | 4-16 | 160K |
| Valheim | 2GB | 4GB | 2 Core+ | 10GB | 5-10 | 80K |
| Terraria / tModLoader | 1GB | 2GB | 1 Core+ | 5GB | 4-16 | 40K |
| GTA FiveM (RP) | 4GB | 8GB | 4 Core+ | 40GB+ | 32-128 | 160K |
| ARK: Survival Evolved | 6GB | 12GB | 4 Core+ | 50GB+ | 10-30 | 320K |
bUseAuth=False để giảm CPU usage. Xem thêm so sánh VPS Windows vs Linux — game server nên chạy Linux để tiết kiệm RAM.
3. Hướng Dẫn Cài Đặt Từng Game Server
3.1. Minecraft Server (Paper/Spigot)
Paper là bản fork của Spigot, tối ưu hơn, hỗ trợ plugin Bukkit/Spigot đầy đủ.
# Cài Java 21
apt update && apt install openjdk-21-jre-headless -y
# Tạo user riêng cho Minecraft (bảo mật)
adduser --system --home /opt/minecraft minecraft
# Tải PaperMC (phiên bản 1.21)
cd /opt/minecraft
wget https://api.papermc.io/v2/projects/paper/versions/1.21/builds/latest/downloads/paper-1.21-latest.jar -O server.jar
# Chấp nhận EULA
echo "eula=true" > eula.txt
# Tạo start script với RAM tối ưu
cat > start.sh << 'EOF'
#!/bin/bash
java -Xms2G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC -XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 \
-jar server.jar nogui
EOF
chmod +x start.sh
# Chạy server
sudo -u minecraft ./start.sh
Sau khi server khởi động, chỉnh sửa server.properties:
# File: /opt/minecraft/server.properties
max-players=20
view-distance=10
simulation-distance=8
difficulty=normal
white-list=true # Chỉ cho phép người trong whitelist
online-mode=true # Xác thực qua Mojang (chống crack)
motd=§a§lMy Server §r- §6Viet Nam §r- §ePaper 1.21
3.2. CS2 Dedicated Server
# Cài SteamCMD
add-apt-repository multiverse
dpkg --add-architecture i386
apt update && apt install steamcmd lib32gcc-s1 lib32stdc++6 -y
# Tạo user và thư mục
adduser --system --home /opt/cs2 cs2
mkdir -p /opt/cs2/server
# Tải CS2 server
cd /opt/cs2
cat > update.sh << 'EOF'
#!/bin/bash
steamcmd +force_install_dir /opt/cs2/server \
+login anonymous +app_update 730 validate +quit
EOF
chmod +x update.sh && ./update.sh
# Tạo file start script
cat > start.sh << 'EOF'
#!/bin/bash
cd /opt/cs2/server/game/bin/linuxsteamrt64
./cs2 -dedicated \
+map de_dust2 \
+maxplayers 20 \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
+sv_hostname "Viet Nam CS2 Server" \
+sv_tags "vietnam,competitive,128tick" \
-tickrate 128 \
-port 27015
EOF
chmod +x start.sh
3.3. Palworld Server
# Cài dependencies
apt update && apt install steamcmd lib32gcc-s1 -y
adduser --system --home /opt/palworld palworld
# Tải Palworld server
su - palworld -s /bin/bash
steamcmd +force_install_dir /opt/palworld/server \
+login anonymous +app_update 2394010 validate +quit
# Cấu hình server
cat > /opt/palworld/server/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini << 'EOF'
[/Script/Pal.PalGameWorldSettings]
OptionSettings=(ServerName="Viet Nam Palworld",ServerDescription="PVE Friendly",AdminPassword="changeme123",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=True,RCONPort=25575,Region="",bUseAuth=False,BanListURL="https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=2394010",bEnablePlayerToPlayerDamage=False,DayTimeSpeedRate=1.0,NightTimeSpeedRate=1.2,ExpRate=1.5,PalCaptureRate=1.2,PalSpawnNumRate=0.8,bEnableInvaderEnemy=True,DeathPenalty=1,MaxPlayers=16)
EOF
# Start script
cat > /opt/palworld/start.sh << 'EOS'
#!/bin/bash
cd /opt/palworld/server
./PalServer.sh -port=8211 -players=16 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
EOS
chmod +x /opt/palworld/start.sh
su - palworld -c "/opt/palworld/start.sh"
3.4. Valheim Server
apt update && apt install steamcmd -y
adduser --system --home /opt/valheim valheim
# Tải Valheim server
su - valheim -s /bin/bash
steamcmd +force_install_dir /opt/valheim/server \
+login anonymous +app_update 896660 validate +quit
# Start script
cat > /opt/valheim/start.sh << 'EOF'
#!/bin/bash
export LD_LIBRARY_PATH=/opt/valheim/server/linux64:$LD_LIBRARY_PATH
cd /opt/valheim/server
./valheim_server.x86_64 \
-name "Viet Nam Valheim" \
-port 2456 \
-world "Dedicated" \
-password "changeme123" \
-public 1 \
-savedir /opt/valheim/data
EOF
chmod +x /opt/valheim/start.sh
3.5. Terraria Server (tModLoader hỗ trợ mod)
apt update && apt install steamcmd unzip -y
adduser --system --home /opt/terraria terraria
# Tải Terraria server
su - terraria -s /bin/bash
steamcmd +force_install_dir /opt/terraria/server \
+login anonymous +app_update 1281930 validate +quit
# Cấu hình
cat > /opt/terraria/server/serverconfig.txt << 'EOF'
world=/opt/terraria/worlds/world1.wld
autocreate=3
worldname=TerrariaVN
difficulty=1
maxplayers=16
port=7777
password=
motd=Chao mung den Terraria Viet Nam Server!
language=vi
EOF
# Chạy
su - terraria -c "cd /opt/terraria/server && ./tModLoaderServer -config serverconfig.txt"
4. Tối Ưu Ping Cho Game Thủ Việt Nam
Ping là yếu tố sống còn với game server, đặc biệt là game FPS như CS2. Đây là các mẹo giảm ping:
4.1. Chọn VPS Ở Datacenter Gần Nhất
TrumVPS có datacenter ở Hà Nội và TP.HCM — chọn datacenter gần với đa số người chơi của bạn. Ping nội địa Việt Nam thường dưới 30ms, tốt hơn nhiều so với thuê server Singapore (50-80ms) hay US (200ms+).
4.2. Tinh Chỉnh Kernel Linux
# File: /etc/sysctl.d/99-gameserver.conf
# Tối ưu network cho game server
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_low_latency = 1
# Áp dụng
sysctl -p /etc/sysctl.d/99-gameserver.conf
4.3. Dùng Screen/Tmux Để Chạy Server Nền
# Cài screen
apt install screen -y
# Tạo screen cho mỗi game
screen -S minecraft
# (Ctrl+A+D để detach, screen -r minecraft để reattach)
# Hoặc dùng tmux
apt install tmux -y
tmux new -s minecraft
# (Ctrl+B+D để detach, tmux attach -t minecraft để reattach)
4.4. Tường Lửa & Mở Port
# Mở port cho từng game
ufw allow 25565/tcp # Minecraft
ufw allow 27015/udp # CS2
ufw allow 27015/tcp # CS2 RCON
ufw allow 8211/udp # Palworld
ufw allow 2456:2458/udp # Valheim
ufw allow 7777/tcp # Terraria
ufw enable
5. So Sánh Chi Phí: Tự Host vs Thuê Dịch Vụ
| Giải pháp | Minecraft 10 slot | CS2 16 slot | Palworld 8 slot |
|---|---|---|---|
| Game hosting service (Shockbyte, Apex) | $7.99/tháng (~200K) | $12.99/tháng (~330K) | $15.99/tháng (~400K) |
| TrumVPS 80K (4GB) | 80K/tháng | 80K/tháng | — |
| TrumVPS 160K (8GB) | 160K/tháng | 160K/tháng | 160K/tháng |
| Tiết kiệm so với hosting | -60% | -76% | -60% |
Bạn tiết kiệm được 120K-250K/tháng cho mỗi game server, đồng thời có toàn quyền kiểm soát, có thể chạy nhiều game server trên cùng 1 VPS (nếu RAM cho phép).
6. Bonus: Kiếm Tiền Từ Game Server
Khi đã thành thạo việc cài đặt và quản lý game server, bạn có thể kiếm tiền bằng cách:
- Cho thuê slot: Bán slot cho người chơi khác, 50K-100K/slot/tháng. Server 20 slot = 1-2 triệu/tháng.
- Bán rank/kit ingame: VIP rank, kit khởi đầu, lệnh đặc biệt qua donor store (dùng plugin BuyCraft cho Minecraft).
- Dịch vụ cài đặt game server: Cài và cấu hình game server cho người không rành kỹ thuật, thu phí 200K-500K/lần.
- Hosting game server chuyên nghiệp: Thuê VPS mạnh, cài Pterodactyl Panel, bán hosting game server với giá cạnh tranh.
7. Các Câu Hỏi Thường Gặp
Q: VPS 40K có chạy được Minecraft không?
VPS 40K (1GB RAM) chỉ đủ chạy Terraria hoặc Minecraft server dưới 5 người với Paper (tối ưu). Nếu có mod thì không nên. Khuyên dùng ít nhất VPS 80K (2GB) cho Minecraft.
Q: Có cần VPS GPU cho game server không?
Game server (dedicated server) không render đồ họa — GPU không cần thiết. Tất cả game server trong bài này chạy hoàn toàn trên CPU. GPU chỉ cần cho AI/Deep Learning — xem thêm VPS GPU cho AI.
Q: Làm sao để tự động restart server khi crash?
Dùng systemd service:
# File: /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/opt/minecraft/start.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable --now minecraft
🎮 Sẵn Sàng Tạo Game Server Riêng?
TrumVPS — VPS giá rẻ, ping thấp nội địa, lý tưởng cho Minecraft/CS2/Palworld. Chỉ từ 40K/tháng.
Thuê VPS Chơi Game NgayCần VPS cấu hình cao hơn? Xem các gói VPS TrumVPS 80K-320K