Dedicated Gaming Servers

Zomboid: how to update your server

Zomboid: how to update your server

Updating your Project Zomboid server is essential to ensure compatibility with the latest game features, bug fixes, and security patches. This guide will walk you through the necessary steps to prepare your server environment, install and configure the server, manage firewall settings, and perform the update process efficiently.

Key Takeaways

  • Always ensure your server environment is properly prepared before attempting an update, including enabling necessary repositories and installing required tools.
  • Managing firewall settings and opening the correct ports is crucial for the server to communicate effectively with clients.
  • Regularly updating your Project Zomboid server helps maintain compatibility with new game features and ensures a smooth gaming experience for players.

Preparing Your Server Environment

Enabling Non-Free Repository

To get started, you need to enable the non-free repository on your server. This is essential for installing certain packages that are not available in the default repositories. Run the following commands to enable it:

sudo apt-get install software-properties-common -y
sudo apt-add-repository non-free

Installing SteamCMD

Next, you’ll need to install SteamCMD, a command-line version of Steam. This tool is crucial for downloading and updating the Project Zomboid server files. Execute the following commands to install SteamCMD:

sudo dpkg --add-architecture i386
sudo apt-get update -y
sudo apt-get install steamcmd -y

Creating a Dedicated User

It’s a good practice to run your server under a dedicated user account rather than as root. This enhances security and makes management easier. Create a new user with the following command:

sudo adduser pzuser

After creating the user, you can switch to this user account using:

sudo -u pzuser -i

Note: Running your server as a non-root user minimizes security risks and helps in better management of server permissions.

Installing and Configuring Project Zomboid Server

Setting Up Installation Directory

First, you need to set up the installation directory for your Project Zomboid server. For Linux users, the default directory is /home/<YOURUSERNAME>/.steam/steam/steamapps/common/Project Zomboid [Dedicated Server](https://pzwiki.net/wiki/Dedicated_server)/. However, you can specify a different directory if you prefer. Use the following command to set the installation directory:

force_install_dir /opt/pzserver

Creating Configuration File

Next, create a configuration file that will manage SteamCMD. This file will contain the necessary commands to install and update the server. Create a file named update_zomboid.txt in your home directory with the following content:

cat >$HOME/update_zomboid.txt <<'EOL'
// update_zomboid.txt
//
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir /opt/pzserver/
login anonymous
app_update 380870 validate
quit
EOL

Running the Installation Script

Now, it’s time to run the installation script. This script will download and install the Project Zomboid server files. Use the following command to execute the script:

export PATH=$PATH:/usr/games
steamcmd +runscript $HOME/update_zomboid.txt

Note: You will use this same command every time you want to update the server to the latest version.

By following these steps, you will have your Project Zomboid dedicated server up and running. Make sure to verify the installation and configuration to ensure everything is set up correctly.

Managing Firewall and Ports

Opening Required Ports with UFW

To ensure your Project Zomboid server is accessible, you need to open specific ports on your firewall. A common firewall used on Linux is UFW (Uncomplicated Firewall). To open the required ports, run the following commands:

# Open the ports
sudo ufw allow 16261/udp
sudo ufw allow 16262/udp
# Reload the firewall to apply the changes
sudo ufw reload

These commands will open the necessary ports for your server to communicate with clients.

Verifying Port Configuration

After opening the ports, it’s crucial to verify that they are correctly configured. You can use tools like netstat or ss to check if the ports are listening. For example:

sudo netstat -tuln | grep 16261
sudo netstat -tuln | grep 16262

If the ports are listed, your configuration is correct.

Troubleshooting Connection Issues

If players are having trouble connecting to your server, there are a few steps you can take to troubleshoot:

  1. Check Firewall Rules: Ensure that the firewall rules are correctly set up and that the ports are open.
  2. Verify Server IP: Make sure the server’s IP address is correctly configured in the game console or device’s IP address settings.
  3. Use Online Tools: Utilize online tools like CanYouSeeMe.org to check if the ports are open from an external network.
  4. Review Logs: Check the server logs for any error messages that might indicate what the issue is.

Properly managing your firewall and ports is essential for a smooth gaming experience. Make sure to regularly check and update your configurations to avoid any connectivity issues.

Updating Your Project Zomboid Server

Running the Update Script

To keep your Project Zomboid server up-to-date, you’ll need to run the update script. First, ensure your server is stopped to prevent any issues during the update process. Then, execute the following command:

steamcmd +runscript $HOME/update_zomboid.txt

This script will connect to Steam’s servers and download the latest version of Project Zomboid. Make sure to monitor the process for any errors.

Verifying the Update

Once the update script has finished running, it’s crucial to verify that the update was successful. You can do this by checking the version number of the installed files. Navigate to your server’s installation directory and look for a file named version.txt or similar. Open this file and compare the version number to the latest release on the Project Zomboid website.

Restarting the Server

After verifying the update, restart your server to apply the changes. You can do this through your game server panel or by running the following command:

sudo systemctl restart pzserver

Restarting the server ensures that all updates are properly applied and that your server is running the latest version.

By following these steps, you can keep your Project Zomboid server updated and running smoothly, ensuring compatibility with new content and features.

Conclusion

Updating your Project Zomboid server is a crucial task to ensure compatibility with new content, features, bug fixes, and security patches. By following the steps outlined in this guide, you can efficiently update your server, whether you are using Windows or Linux. Remember to always stop your server before initiating an update and restart it afterward to apply the changes. Properly managing your server updates will help maintain a smooth and enjoyable gaming experience for all players.

More Project Zomboid Guides

Most Read Guides