Project Zomboid

Project Zomboid

376 avaliações
How to create a (Steam) server
Por nasKo e 2 colaborador(es)
Instructions on how to create a Project Zomboid Multiplayer server, both LAN and online as well as non-Steam and Steam.
   
Premiar
Adic. a Favoritos
Nos Favoritos
Desfavoritar
Creating a Steam server
THIS GUIDE IS OUTDATED.
IF GOOGLE OR BING (lol) BROUGHT YOU HERE, USE THIS GUIDE INSTEAD:
https://steamcommunity.com/sharedfiles/filedetails/?id=2682141370



-
-
-
-
-
-
-
-


Through the game (AKA EASY CO-OP)
This guide is in the process of being updated for Build 41.

We recommend you try hosting a server through the game first before bothering with the more complicated process of hosting a dedicated server.
If that works and it suits your needs, you can ignore the rest of this guide.

Simply click the "HOST" button on the main menu. The rest should be self explanatory.

Go here for more info and help:

The most common mistake people make is still having the -nosteam parameter set for the launch options. That's obviously not going to work. Make sure you don't have this set and tell your friend to make it even surer.

Easy Co-Op FAQ
http://steamcommunity.com/app/108600/discussions/7/357285562492254551/


The rest of this guide describes how to host a dedicated server, which 90% of the users would not need to do.



Through the Steam Client
Client on your Library and then Tools.
Scroll until you see "Project Zomboid Dedicated Server" and right click it. Select "Properties", "Betas" and from the dropdown, pick "b41multiplayer" to let Steam download and install it.
Once downloaded, you start it through the StartServer64.bat from the install directory.

That's it. Now you connect to the server through the game (if you're hosting it on the same computer you play on, connect to it via its LAN IP, or alternatively 127.0.0.1 or "localhost" without the quotes)

Windows
You will now go to the folder you've just downloaded the files to, in this example to C:\PZserver and run the startServer64.bat for a 64bit server or StartServer32.bat for the 32bit version:
.png]

Note: While the exes may work, sometimes it'll result in a dedicated server that cannot be connected to locally.

Linux
The default installation folder is in /home/YOURUSERNAME/.steam/steam/steamapps/common/Project Zomboid Dedicated Server

From here start the start-server.sh file.

If you don't know how, navigate to the installation folder via terminal. The following example uses the default folder:
cd ~/.steam/steam/steamapps/common/Project\ Zomboid\ Dedicated\ Server\/

Then simply start the start-server.sh by typing
bash start-server.sh
.png]


If this is the first time you're creating the server, you will be asked for an admin password after the userdatabase was created. This automatically creates an account with the name "admin" and the password you're setting.
If you read "*** SERVER STARTED ***" after setting up the password, the server is successfully launched.
.png]

Starting the Server

As stated in the cmd window, the ports 8766 and 16261 have to be port forwarded in order to allow people to successfully connect to it.

When using the Steam version of the game (starting the game through Steam), connecting to the LAN/WAN server requires both the local IP and the internet IP of the server (there are two fields for this purpose). The host (assuming they're playing on the same computer as the server is running on) can use 0.0.0.0 or 127.0.0.1 as the local IP.

In case the test of the TCP port fails on the LAN server, enter the LAN IP in the optional field as well as the public IP address in the intended field.
A started steam server shows you the public IP address in the cmd window.

Note for Hamachi users: You will have to use the Hamachi IP as the "public" IP ("IP" field in the MP server list menu) in order to connect to your own server.
Example:
.png]
Downloading the Steam server files
First of all, in order to host a Steam server you will need to download the server files.

There are two ways to go about this

Through the Steam Client (THE EASIEST WAY)
Go to your Library and then select "Tools".
Scroll until you see "Project Zomboid Dedicated Server" and download/install it like you would with a game.
Once downloaded, you start it.

That's it.

Through SteamCMD.
I'm saving myself from telling you how to do that because there already is a guide on Valve's dev wiki:
https://developer.valvesoftware.com/wiki/SteamCMD

Once installed, run SteamCMD (by running the steamcmd.exe in the installation folder of SteamCMD).

In the open SteamCMD window, type in the following:

login anonymous
.png]This will log you in anonymously, so you won't even need a Steam account in order to host a Steam server.

If you want, you can now set up the installation directory. Linux users can skip this; the server will then install to /home/YOURUSERNAME/.steam/steam/steamapps/common/Project Zomboid Dedicated Server/.
The following is an example (for Windows), installing the server on your C: drive in a folder called "PZServer":
force_install_dir C:\PZServer


Once done, we will download the server files to the specified folder by typing in:
app_update 380870 validate
.png]
When the download is done and you see the success message, you can close Steam CMD by typing in
quit
Creating a Non-Steam Server
To host a non-Steam-server, navigate to your game installation folder (the default location is Steam\SteamApps\common\ProjectZomboid) and find the batch-file called ProjectZomboidServer.bat.
Start it by double clicking it.

A command prompt window will pop up. Upon first startup, it will create a userdatabase and create an admin account while asking you to set up a password for it.
After setting up the password, it will finish creating and starting up the server and say "*** SERVER STARTED****".

(Note: If you are getting an error, saying "The system cannot find the path specified" while trying to create the spawnregions or user database, let it go through and once the server started without those, close the cmd window and start up the server again by executing the ProjectZomboidServer.bat.)

To allow people to connect to your server you will need to forward the necessary ports.
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.
If you want a server with 10 slots, you would have to forward
16261 UDP
16262 - 16272 TCP

A quick and easy way to test if your ports are forwarded properly are http://www.canyouseeme.org/ and http://www.yougetsignal.com/tools/open-ports/

Good guides on how to forward ports are found all over the internet. Portforward.com has good guides on hand and covers a lot of routers. Port Forwarding sounds harder in theory that it actually is and mostly just involves getting into the menu of your router.
If you have no access to your router, please consult whoever is in charge of your network (parents, room mates, admins, etc).
Running the Non-Steam version of the game
Go to your Steam Library, right click Project Zomboid and select "Properties"
.png]

On the "General" tab, click the "Set Launch Options"-button
.png]

Now enter "-nosteam" (without the quotes) and press OK:
.png]


Running the game through Steam with this launch-parameter will start the game without the Steam-integration.
ANY QUESTIONS/PROBLEMS?

Please open a support thread on our Discussion Hub. The comments are just not suited for constant back and forth.

http://steamcommunity.com/app/108600/discussions/1/