Dedicated Gaming Servers

Zomboid: how to save your server

Zomboid: how to save your server

Setting up and maintaining a Project Zomboid server can be a daunting task, especially for those new to server management. This guide aims to simplify the process by providing clear, step-by-step instructions on how to set up, configure, and maintain your server, including how to manage backups and network settings.

Key Takeaways

  • Proper initial setup, including enabling the non-free repository and creating a dedicated user, is crucial for a stable server.
  • Regular backups and understanding how to manage both automatic and manual saves can prevent data loss.
  • Correct network configuration, including port forwarding and firewall settings, ensures smooth server operation and connectivity.

Setting Up Your Project Zomboid Server

Enabling Non-Free Repository

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

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

Installing SteamCMD

SteamCMD is a command-line version of Steam that is used to install and update dedicated servers. Follow these steps to install SteamCMD:

  1. Add the i386 architecture:

    sudo dpkg --add-architecture i386
    sudo apt-get update -y
    
  2. Install SteamCMD:

    sudo apt-get install steamcmd -y
    

Creating a Dedicated User

For security reasons, it’s recommended not to run your server as the root user. Instead, create a dedicated user for running the server. You can create a user named pzuser with the following command:

sudo adduser pzuser

Next, create a directory for the server files and assign ownership to the new user:

sudo mkdir /opt/pzserver
sudo chown pzuser:pzuser /opt/pzserver

Log in as the new user to proceed with the server setup:

sudo -u pzuser -i

Installing and Configuring the Server

Downloading Server Files

To get started, you’ll need to download the Project Zomboid server files. You can do this through Steam or SteamCMD. For Steam, navigate to your library, filter for tools, and download ‘Project Zomboid Dedicated Server’. If you prefer using SteamCMD, follow the instructions on the Valve Developer wiki to download and configure it. Remember not to launch the server via Steam; if you do, verify the integrity of the files.

Creating Configuration Files

Once the server files are downloaded, you’ll need to create configuration files. Run the server once to generate the necessary .ini files. After that, copy settings from your local .ini file to the server’s .ini file. Ensure that parameters like DefaultPort, PublicName, MaxPlayers, RCONPort, RCONPassword, Password, SteamPort1, and SteamPort2 are correctly set.

Running the Server

To run the server, navigate to the directory where the server files are located. On Windows, you’ll find batch files like StartServer64 and StartServer32. Choose the appropriate one for your system. On Linux, it’s recommended to use tmux to keep the server running even if your terminal closes. Start tmux, then run the server. The first time you run it, you’ll be prompted to set an admin password. Once the setup is complete, the server will indicate whether it started successfully.

Pro Tip: Always make sure your server is stopped before making any changes to the configuration files. This prevents any potential data corruption or loss.

Managing Server Backups and Saves

Automatic and Manual Saves

Ensuring your server data is safe is crucial. Project Zomboid offers both automatic and manual save options. Automatic saves occur at regular intervals, but it’s always a good idea to perform manual saves before making significant changes. You can find your save files in C:UsersYourusernameZomboidSavesMultiplayer. The folder names will match your server settings, such as servertest and servertest_player. Copy these folders to a secure location to back up your data.

Creating and Restoring Backups

Creating backups is a straightforward process. Simply copy your save folders to another location. If something goes wrong, you can restore your server by copying these folders back to their original location. This step-by-step guide will help you manage your server effectively.

Uploading Existing Saves

To upload existing saves, navigate to the directory /.cache/Saves/Multiplayer for save files and /.cache/Server for server settings files. Upload the respective files to these directories to ensure your server runs with the desired settings and progress. This process allows you to adjust gameplay settings and continue from where you left off.

Network Configuration and Port Forwarding

Required Ports for Project Zomboid

To ensure your Project Zomboid server runs smoothly, you’ll need to open specific ports. The essential ports are:

  • 16261 UDP: Main communication port.
  • 16262 UDP: Direct connection port.

Configuring UFW on Linux

If you’re using a Linux server, UFW (Uncomplicated Firewall) is a straightforward way to manage your firewall settings. To open the necessary ports, execute the following commands:

sudo ufw allow 16261/udp
sudo ufw allow 16262/udp
sudo ufw reload

This will allow the required traffic through your firewall and ensure your server is accessible.

Running Multiple Servers

Running multiple instances of Project Zomboid on a single machine requires additional configuration. Each server instance needs its own set of ports. For example, if you’re setting up a second server, you might use ports 16263 UDP and 16264 UDP. Follow these steps:

  1. Create separate user accounts for each server instance.
  2. Install SteamCMD under each user account.
  3. Open additional UDP ports for each server instance.
  4. Edit the SERVERNAME.ini file for each instance to reflect the new port settings.

Tip: Each server instance requires two unique UDP ports. Make sure to document your port assignments to avoid conflicts.

Conclusion

In conclusion, managing and saving your Project Zomboid server involves a series of detailed steps, from setting up the server environment to ensuring regular backups and updates. By following the outlined procedures, including enabling necessary repositories, installing essential tools like SteamCMD, and configuring server settings, you can maintain a stable and efficient server. Additionally, understanding the importance of port forwarding and utilizing admin commands effectively will enhance your server management experience. Regularly backing up your server data and knowing how to restore it ensures that your progress is safeguarded against any potential issues. With these practices in place, you can provide a seamless and enjoyable multiplayer experience for all players on your Project Zomboid server.

More Project Zomboid Guides

Most Read Guides