This comprehensive guide will walk you through setting up a SteamCMD game server on your VPS, covering every step from preparing your environment to running your server for the first time.
📌 Prerequisites
-
A VPS hosted by VolticHost.com
-
A working Steam account.
-
Basic familiarity with command-line tools (SSH, terminal commands).
-
A text editor (e.g., nano, vim, or Notepad++ if working locally).
Step 1: Preparing Your Environment
-
Connect to Your VPS:
-
Use an SSH client (like PuTTY on Windows or the terminal on macOS/Linux) to log in to your VPS:
ssh root@your_vps_ip
-
-
Update Your System:
-
Update package lists and upgrade installed packages:
sudo apt-get update && sudo apt-get upgrade -y
-
(For CentOS/RHEL, use
yum update
.)
-
Step 2: Installing SteamCMD
-
Install Dependencies:
-
For Ubuntu/Debian-based systems:
sudo apt-get install lib32gcc1 -y
-
For CentOS/RHEL-based systems:
sudo yum install glibc.i686 -y
-
-
Download SteamCMD:
-
Create a directory for SteamCMD:
mkdir ~/steamcmd && cd ~/steamcmd
-
Download the SteamCMD tarball:
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
-
Extract the files:
tar -xvzf steamcmd_linux.tar.gz
-
Step 3: Setting Up the Game Server Directory
-
Create a Dedicated Server Folder:
-
Within your home directory, create a folder for your game server:
mkdir ~/YourGameServer
-
-
Set the Installation Directory:
-
Launch SteamCMD:
./steamcmd.sh
-
In the SteamCMD prompt, set the installation directory:
force_install_dir ~/YourGameServer/
-
Step 4: Downloading the Game Server Files
-
Log In to SteamCMD:
-
In the SteamCMD prompt, log in using your Steam account:
login your_steam_username
-
If prompted for a password or Steam Guard code, provide the necessary credentials.
-
-
Download the Game Server Files:
-
Identify the AppID for the game server you wish to install (consult the SteamDB website or game documentation).
-
Run the update command, for example:
app_update 2329680
-
Wait for the download to complete.
-
Once done, type:
quit
-
This will exit SteamCMD and leave the game server files installed in your designated folder.
-
Step 5: Configuring Your Game Server
-
Navigate to Your Game Server Directory:
cd ~/YourGameServer
-
Locate and Edit Configuration Files:
-
Identify key configuration files (commonly
server.cfg
or similar) for the game server. -
Use a text editor to modify settings:
nano server.cfg
-
Adjust parameters such as server name, max players, and game-specific settings.
-
-
Save and Exit the Editor:
- In nano, press
CTRL + O
to write changes, thenCTRL + X
to exit.
- In nano, press
Step 6: Running Your Game Server
-
Create a Startup Script (Optional):
-
Create a script to run the server. For example, create a file named
start_server.sh
:nano start_server.sh
-
Add the following lines (modify according to your server’s launch command):
#!/bin/bash cd ~/YourGameServer ./YourServerExecutable -server -log
-
Save the file and make it executable:
chmod +x start_server.sh
-
-
Start the Server:
-
Run your startup script:
./start_server.sh
-
Alternatively, launch the server directly from the command line.
-
-
Monitor the Server:
- Check the console output for any errors or confirmation messages indicating that the server is running.
Step 7: Connecting to Your Server
-
Obtain Your VPS IP Address:
- Note your VPS’s public IP address (provided by your host).
-
Launch the Game Client:
-
Open the game you’ve installed the server for.
-
Navigate to the multiplayer section and enter your VPS IP address to connect.
-
-
Verify Connectivity:
- Join the server and confirm that it’s functioning as expected.
🎉 Conclusion
You’ve successfully set up a SteamCMD game server on your VPS! With your server installed, configured, and running, you can now enjoy hosting games for your community. For further customization and troubleshooting, refer to game-specific documentation or reach out to our support team. Happy gaming!