Hosting a dedicated server for Project Zomboid allows you to customize your multiplayer experience, control server settings, and play with friends in a persistent world. Whether you are using Windows or Linux, this guide will help you set up and run your own Project Zomboid dedicated server.
Key Takeaways
- Understand the process of downloading server files through Steam or SteamCMD.
- Learn how to forward the necessary ports to ensure smooth connectivity.
- Get step-by-step instructions on running the server on both Windows and Linux platforms.
Downloading the Server Files
To host a dedicated Project Zomboid server, you’ll first need to download the server files. There are two main methods to do this: through the Steam client or using SteamCMD. Let’s break down both methods.
Through Steam
- Open your Steam client and navigate to your Library.
- Filter your library to show Tools.
- Locate and select "Project Zomboid Dedicated Server" from the list.
- Click the install button and wait for the download to complete.
Note: Do not launch the server directly from Steam. If you accidentally do, verify the integrity of the files before proceeding.
Through SteamCMD
SteamCMD is a command-line version of Steam, which is particularly useful for server management. Follow these steps to download the server files using SteamCMD:
- Download and extract SteamCMD from the Valve Developer Community.
- Open a command line interface and navigate to the SteamCMD directory.
- Run
steamcmd.exe
to start SteamCMD. - Set the installation directory for the server files. For example:
force_install_dir C:PZServer
- Log in anonymously to Steam:
login anonymous
- Download the Project Zomboid server files:
app_update 380870 validate
- Once the download is complete and you see the success message, close SteamCMD by typing:
quit
Using SteamCMD is a bit more involved but offers greater control over the installation process, especially useful for automated scripts and server management.
Forwarding Required Ports
To allow people to connect to your server, you will need to forward the necessary ports. Port forwarding guarantees a better gaming experience by ensuring smooth communication between the server and the clients.
Linux
A common firewall used to open ports on Linux is UFW (Uncomplicated Firewall). To open the required ports on the firewall, you can run the following commands:
# Open the ports
sudo ufw allow 16261/udp
sudo ufw allow 16262/udp
# Reload the firewall to make the added rules go into effect
sudo ufw reload
Make sure to test if your ports are forwarded properly using tools like canyouseeme.org or yougetsignal.com.
The necessary standard ports to forward are 16261 (UDP), which serves as a handshake port for communicating with the server. For each possible player slot on your server, you need to forward additional TCP ports, which are used to stream the world to the player clients. For example, if you want a server with 10 slots, you would have to forward:
- 16261 UDP
- 16262 – 16272 TCP
Running the Server
Windows
To get your dedicated server up and running on Windows, navigate to the folder where you downloaded the server files. If you followed the previous steps, this should be C:pzserver
. Inside, you’ll find three StartServer
batch files. Choose the one that matches your setup:
StartServer32
for the 32-bit versionStartServer64
for the 64-bit versionStartServer64_nosteam
for the non-Steam 64-bit version
Run the appropriate batch file. This will open a command console window that starts executing the server. On the first run, you’ll be prompted to set a password for the admin account. Once the server is set up with the default game settings, a message will indicate whether the setup was successful or not.
Make sure to leave the command prompt open to keep the server running. You can now launch Project Zomboid and select the Host option from the main menu.
Linux
For Linux users, start by opening a terminal window. It’s recommended to use tmux
to prevent the server from shutting down if the terminal window is closed or the SSH connection is lost. If tmux
is not installed, you can install it using:
apt-get install tmux
Once tmux
is installed, start it by running:
tmux
Next, navigate to the directory where you installed the server files. Run the following command to start the server:
bash start-server.sh -servername SERVERNAME
This will open a command console window that begins executing the server. On the first run, you’ll be prompted to set a password for the admin account. After the server finishes setting up with the default game settings, a message will indicate success or failure.
If you accidentally close the terminal or get disconnected, you can bring the server console back up by running tmux a.
Make sure to keep the terminal window open to ensure the server stays up and running.
Conclusion
Hosting a dedicated Project Zomboid server can significantly enhance your multiplayer experience by giving you full control over game settings and server management. Whether you choose to set up your server on Windows or Linux, the process involves downloading the necessary server files, configuring your system, and ensuring that the required ports are open. By following the steps outlined in this guide, you can create a stable and customized environment for you and your friends to enjoy. Remember to periodically update your server to keep up with the latest game versions and patches. With your dedicated server up and running, you’re all set to dive into the immersive world of Project Zomboid with your community.