How to host a dedicated server on the newly released b41multiplayer beta to play with your friend. Basic server configuration knowledge preferred.
Introduction
On December 9th 2021 the PZ Team shared what we’ve been waiting for so long, the build 41 including multiplayer. This is great news and I would like to thanks and congratulate the team for their hard work. I bought PZ back in 2013 on Desura and it has been supported and updated since then!
This guide will be concise, I just want everyone to be able to host a game quickly and I will most likely not dive into too much details as I haven’t even tried the multiplayer beta yet. I’m just sharing my current findings and will try to update the guide later on.
Before reading further please read the announcement : B41 MP Test 41.60 Branch Released! – [projectzomboid.com]
Getting started
For those who want to host a dedicated server using steamcmd, the appid is
380870
according to steamdb – [steamdb.info] .
Don’t forget to specify the beta channel by adding “-beta b41multiplayer” at the end of your command.
For everyone else your steam account must own the game. In your library display your “Tools” (just below “Home”), look for “Project Zomboid Dedicated Server” and install it.
If you are wondering why and how I have [b41multiplayer] in my listing please refer to the announcement link shared in the introduction section, it is explained there. You should do the procedure for both the game and the server.
Once the server is installed:
- Right click the server in your list on the left -> Properties
- In local files -> Browse
This will open the folder where the server is installed. This should look like this:
Double click “StartServer64MP.bat”, this will open a windows terminal which will ask you to set an admin password:
It will then ask you to confirm it. After that the server will load. Once it’s done you can exit the window which will stop the server. This is required a first time to initialize the multiplayer map and other files. We will start it again once configured.
Server configuration
The configs and saves are in
%UserProfile%/Zomboid
Windows + r to execute it will open the folder:
The server is named by default “servertest”, its config is in the “Server” folder inside “servertest.ini”. This is where you can set the server name as well as a password and much more.
Retrieve your public ip via https://www.myip.com/ – [myip.com] for example.
In servertest.ini update the following fields, use a text editor (such as VS Code – [visualstudio.com] ) and ctrl+f to look for them.
Open=true Public=true PublicName=Your servers name displayed in the server browser PublicDescription=Your servers description Password=your server password SteamVAC=true UPnP=false server_browser_announced_ip=your public ip retrieved earlier
Feel free to edit other fields, their name is self explanatory most of the time and the one I’ve listed are the minimum that should be edited for an online and private server.
I’ve also edited these fields on mine:
PauseEmpty=true ; I want my server to be paused when no one is online HoursForLootRespawn=48 ; Allow for item respawning MaxItemsForLootRespawn=6 AnnounceDeath=true ; I want to know when someone dies
Forward these ports on your router:
- 27015 (for Steam)
- 8766 (for Steam)
- 8767 (for Steam)
- 16261 (for PZ)
If you don’t know how to do that have a look: https://www.noip.com/support/knowledgebase/general-port-forwarding-guide/ – [noip.com]
Before you restart your server right click -> edit on “StartServer64MP.bat” and remove “-nosteam” next to the end if present.
Once satisfied launch the server as the first time by double clicking “StartServer64MP.bat”.
Server db is in the “db” folder and SQLite browser – [sqlitebrowser.org] is able to open it.
Some more stuff in “Saves\Multiplayer\servertest”.
Troubleshooting
- If you have issues and want to start anew WHICH WILL DELETE YOUR SERVER SAVE!!!
Delete:
- %UserProfile%\Zomboid\db\servertest.db
- %UserProfile%\Zomboid\Saves\Multiplayer\servertest (the folder)
- %UserProfile%\Zomboid\Server (the folder’s content whose name is servertest)
If you have a message:
- Failed to commit memory
This might be because your computer doesn’t have enough RAM. By default the server tries to allocate 16Go.
If you edit the file “StartServer64MP.bat” (right click -> Edit) you will see “-Xms16g -Xmx16g” (underlined in the code below) which is what sets 16Go of RAM. If you don’t see it you can add it.
@setlocal enableextensions @cd /d "%~dp0" SET PZ_CLASSPATH=java/istack-commons-runtime.jar;java/jassimp.jar;java/javacord-2.0.17-shaded.jar;java/javax.activation-api.jar;java/jaxb-api.jar;java/jaxb-runtime.jar;java/lwjgl.jar;java/lwjgl-natives-windows.jar;java/lwjgl-glfw.jar;java/lwjgl-glfw-natives-windows.jar;java/lwjgl-jemalloc.jar;java/lwjgl-jemalloc-natives-windows.jar;java/lwjgl-opengl.jar;java/lwjgl-opengl-natives-windows.jar;java/lwjgl_util.jar;java/sqlite-jdbc-3.27.2.1.jar;java/trove-3.0.3.jar;java/uncommons-maths-1.2.3.jar;java/ ".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=1 -Dzomboid.znetlog=1 -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Xms16g -Xmx16g -Djava.library.path=natives/;natives/win64/;. -cp %PZ_CLASSPATH% zombie.network.GameServer -statistic 10 -debuglog=Multiplayer,Death,Damage,Fall PAUSE
- If you don’t see “StartServer64MP.bat”
Make sure you are on the proper beta channel and read this guide’s introduction where it is explained.
Here we come to an end for Project Zomboid Configure and Start a Dedicated Server hope you enjoy it. If you think we forget something to include or we should make an update to the post let us know via comment, and we will fix it asap! Thanks and have a great day!
- Check All Project Zomboid Posts List
I read all the related articles and followed the steps and my dedicated server folder is still missing the “StartServer64MP.bat” file.