How to Set Up an Aftershock Dedicated Server
Hosting your own Aftershock server gives you full control, reliable performance, and a persistent world for your players. Follow this detailed guide to set it up on a Linux machine using SteamCMD.
⚙️ System Requirements
- OS: Ubuntu 18.04+, Debian 10+, CentOS 8+
- CPU: Dual-core or better
- RAM: Minimum 8 GB
- Storage: At least 20 GB SSD
- Access: Root or sudo privileges
✈️ Step 1: Update Your Server
# Ubuntu/Debian sudo apt update && sudo apt upgrade -y # CentOS/RHEL sudo yum update -y
👥 Step 2: Create a Dedicated User
sudo adduser aftershock sudo passwd aftershock su - aftershock
🔐 Step 3: Install Required Packages
Ubuntu/Debian:
sudo dpkg --add-architecture i386 sudo apt update sudo apt install lib32gcc-s1 screen wget curl nano -y
CentOS/RHEL:
sudo yum install glibc.i686 libstdc++.i686 ncurses-libs.i686 screen wget curl nano -y
💾 Step 4: Install SteamCMD
mkdir ~/steamcmd cd ~/steamcmd curl -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd.tar.gz
📥 Step 5: Install the Aftershock Server
cd ~/steamcmd ./steamcmd.sh +login anonymous \ +force_install_dir ./aftershock-server \ +app_update 123456 validate \ +quit
Replace 123456
with the actual Steam AppID for Aftershock.
🛠 Step 6: Create a Startup Script
nano ~/steamcmd/aftershock-server/start_aftershock.sh
Paste the following content:
#!/bin/bash SERVER_NAME="MyAftershock" PORT="7777" QUERY_PORT="27015" RCON_PORT="32330" ADMIN_PASSWORD="YourAdminPassword" MAX_PLAYERS="32" screen -dmS aftershock \ ./AftershockServer \ -Port=$PORT \ -QueryPort=$QUERY_PORT \ -RCONPort=$RCON_PORT \ -ServerName="$SERVER_NAME" \ -MaxPlayers=$MAX_PLAYERS \ -AdminPassword="$ADMIN_PASSWORD" \ -log
Make it executable:
chmod +x ~/steamcmd/aftershock-server/start_aftershock.sh
🚀 Step 7: Start the Server
sh ~/steamcmd/aftershock-server/start_aftershock.sh
Stop the server:
screen -S aftershock -X quit
🌐 Step 8: Configure Firewall
UFW (Ubuntu/Debian):
sudo ufw allow 7777/udp sudo ufw allow 27015/udp sudo ufw allow 32330/udp
iptables:
sudo iptables -A INPUT -p udp --dport 7777 -j ACCEPT sudo iptables -A INPUT -p udp --dport 27015 -j ACCEPT sudo iptables -A INPUT -p udp --dport 32330 -j ACCEPT
✅ Step 9: Optional – Create a systemd Service
sudo nano /etc/systemd/system/aftershock.service
Paste this:
[Unit] Description=Aftershock Dedicated Game Server After=network.target [Service] User=aftershock WorkingDirectory=/home/aftershock/steamcmd/aftershock-server ExecStart=/home/aftershock/steamcmd/aftershock-server/start_aftershock.sh Restart=on-failure [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl enable aftershock sudo systemctl start aftershock
🔄 Step 10: Update the Server
cd ~/steamcmd ./steamcmd.sh +login anonymous \ +force_install_dir ./aftershock-server \ +app_update 123456 validate \ +quit sudo systemctl restart aftershock
🎮 Step 11: Connect to Your Server
- Launch Aftershock
- Find your server in the browser or use direct IP
🎉 Conclusion
Your Aftershock dedicated server is now live! You’ve got automated startup, secured user access, and a persistent game world under your control. Happy hosting!
Login or create account to leave comments
Comments (0)