LinuxGSM is an automated game server management script for Linux operating systems, allowing you to easily install, configure, and manage a wide variety of dedicated game servers. This script is designed to be used by anyone with basic knowledge of Linux, as it takes care of automatically installing all the necessary packages and dependencies for the game server you want to install.
LinuxGSM supports a wide variety of popular games, including Counter-Strike: Global Offensive, Minecraft, Project Zomboid, Team Fortress 2, ARK: Survival Evolved, Rust, among others. Additionally, the script also has a number of useful features, such as the ability to automatically update the game server, the option to create backups and restore data, and the ability to send email or text message alerts in case any issues occur on the server.
In summary, LinuxGSM is a useful and efficient tool for those looking to set up and manage dedicated game servers on Linux systems. It automates much of the process and makes it user-friendly for those without advanced technical expertise.
Requirements and Prerequisites
The minimum requirements suggested by the official LinuxGSM site for a Project Zomboid server are as follows:
- Operating System: 64-bit Linux (Debian/Ubuntu or CentOS)
- Processor: 2 vCores or more
- RAM: 8 GB or more
- Hard Disk Space: 25 GB or more
Keep in mind that these are just the minimum requirements, and for better performance and a smoother gaming experience, it's recommended to use more resources. Additionally, if you plan to host many players and add mods to the server, higher resource specifications may be required.
Activate Strict Anti-DDoS
Remember to enable strict Anti-DDoS filtering during server creation and do not modify the default ports of Project Zomboid or SteamCMD. You can read more about strict Anti-DDoS by clicking here.
Installation of Dependencies
First, access the server through an SSH connection with the root user to install the dependencies.
Execute the following to install the dependencies:
# dpkg --add-architecture i386; apt update; apt install curl wget file tar bzip2 screen \
gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux \
netcat lib32gcc1 lib32stdc++6 default-jre rng-tools rng-tools5 -y
Execute the following to install the dependencies:
# dpkg --add-architecture i386; apt update; apt install curl wget file tar bzip2 \
gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq \
tmux netcat lib32gcc1 lib32stdc++6 default-jre rng-tools screen -y
Execute the following to install the dependencies:
# yum install epel-release && yum install screen wget tar bzip2 gzip unzip python3 \
binutils bc jq tmux glibc.i686 libstdc++ libstdc++.i686 java-11-openjdk rng-tools
Execute the following to install the dependencies:
# dpkg --add-architecture i386; apt update; apt install apt install screen curl wget \
file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates \
binutils bc jq tmux netcat lib32gcc-s1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd \
default-jre rng-tools rng-tools5 -y
LinuxGSM Installation
Create a specific user for the Project Zomboid server and make sure you have logged in with that account. This can be done with the following command*:
# adduser pzserver
*For security reasons, make sure to set a strong password.
Then, log in with the created user to the system; you can run the following to do so:
# su - pzserver
With the user session, download the LinuxGSM installation script via the command line using the wget command and run the LinuxGSM installation script with the following commands:
# wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh pzserver
Once done, install the Project Zomboid server:
# ./pzserver install
When the installation is complete, you can start the server by running the following command:
# ./pzserver start
Now, the Project Zomboid server is running on the server using LinuxGSM. You can use LinuxGSM commands to manage and configure the server according to your needs (remember to open the default ports in the Firewall panel).
Start Non-Steam Project Zomboid Server (for Other Platforms)
You can also use the same article to set up a non-Steam server for other platforms, such as GOG. You will need to modify a parameter in the following configuration file:
# nano /home/pzserver/serverfiles/ProjectZomboid64.json
In particular, you will need to disable the Steam line by setting it to zero:
"-Dzomboid.steam=0",
Additionally, you can input your server configuration in /home/pzserver/Zomboid/Server/ and then start it with the following command*:
# /home/pzserver/serverfiles/start-server.sh -servername configuration_server_name
*This is also valid for Steam servers; you can create your configuration from a game's GUI to later import the configuration via SFTP to the server (How to Use WinSCP for SFTP Access).
Set Up Service for Project Zomboid Server
The best option to keep the Project Zomboid server running is to run it as a system service with a screen. This way, the server will start automatically when the system boots and will automatically restart in case of an error or if the server stops for any reason.
To do this, you'll need to create a system service file that contains the necessary configuration to start and stop the server. Below are the steps to create and configure the system service file.
First, create a service file in the /etc/systemd/system/ directory using the following command:
# nano /etc/systemd/system/pzserver.service
Paste the following text into the service file:
[Unit]
Description=Project Zomboid Server
After=network.target
[Service]
User=pzserver
Group=pzserver
Restart=always
KillMode=process
WorkingDirectory=/home/pzserver/
ExecStart=screen -S zomboid -d -m /home/pzserver/serverfiles/start-server.sh -servername configuration_server_name
RemainAfterExit=yes
ExecStop=screen -S zomboid -X stuff "^C"
TimeoutSec=300
[Install]
WantedBy=multi-user.target
Reload the systemd configuration with the following command:
# systemctl daemon-reload
Enable the service to start automatically at system boot with the following command:
# systemctl enable pzserver.service
Start the service with the following command:
# systemctl start pzserver.service
Now, the server will start automatically every time the system boots and will restart automatically if it stops for any reason. You can stop or restart the service at any time using systemd commands, such as systemctl stop pzserver.service or systemctl restart pzserver.service.
You can also access the server's screen with the pzserver user by running the following:
# sudo -u pzserver screen -r zomboid
We hope this article has been helpful to you. If you have any questions about this or other matters related to your servers on Clouding, don't hesitate to contact us at soporte@clouding.io. We're here to help!