Sunday, March 30, 2014

Dedicated Linux Project Zomboid Server......Similar to Minecraft

As a reference: I am Running Linux Mint 13 Cinnamon on our Dedicated server Machine.....

This will work if Setting up the Server on a Dedicated machine, or you can alter it to run the server on your game machine, you would just need to NOT do the copy and paste bit to a Jump Drive.

01. Use Steam Linux to Install Project Zomboid On the Gaming PC
02. "Right-Clicked" Project Zomboid
03. Choose Properties on the Drop Down Menu
04. Clicked on the "BETAS" Tab
05. Told it use the "onlinetest -" Version
06. Use your File Browser to find /home/yourusername/.steam/steam/SteamApps/common/ on your Gaming PC and then Copy & Pasted the Folder "ProjectZomboid" to a Jump Drive.
07. When copy was complete, take the Jump Drive to your Dedicated in Home Server PC and recreate the Path above on your Server to look like /home/yourusername/.steam/steam/SteamApps/common and then Copy & Paste the "ProjectZomboid" Folder from the Jump Drive to the common folder.
08. Then enter into the "ProjectZomboid" folder you just Pasted into the common folder
09. Here you will find a file called "projectzomboid-dedi-server.sh"
10. "Right-Click" the File "projectzomboid-dedi-server.sh"
11. From the drop down menu choose "Properties"
12. On the properties Window that opens select the "Permissions" Tab
13. Find the empty check box regarding "Allow executing file as program" and Select the Check box and then Close the properties Window.
14. Now back in the File browser Double-Click the "projectzomboid-dedi-server.sh" File
15. You should get a pop-up window that asks several things of you, mine indicates with buttons that read "Run in Terminal", "Display", "Cancel" and "Run"
16. On this first time of seeing this, I elected to use "Display" which opens the File in a Text-editor and I edited the amount of Memory that java would be allowed to use. Find these two lines in the file and change to what you would like to limit or expand it to.

    -Xms4096m \ (= Starting Memory)
    -Xmx4096m \ (= Maximum Memory)

I changed mine to read.

    -Xms1024m \
    -Xmx2048m \

17. Then save the File and close the Text-editor.
18. Now back in the File Browser "Double-click" the "projectzomboid-dedi-server.sh" File again and this time choose "Display in Terminal"
19. You will see a Terminal Window open and shortly you should see text running down you and it will end with "Server-Started".
20. Congrats......Your server is running!!!

21. This does not cover setting up a port forward in your router to allow people to join, nor does it cover making sure that your server firewall is configured to allow traffic in to the open port in the router.

I set a port forward for 16261 thru 16276 to allow 15 or so join.

After setting this Port Forward we discovered that all players use the same port to Join, just like in Minecraft, so it seemed as if we only needed 16261 to be open for forwarding, I dont know where the Idea came that every player needs there own port to use......but that is what the Server Tutorials kept saying to do. I decided to take a moment and revisit the Router and change the Port Forwarding to only include port 16261. As soon as this was done then no one was able to join.....Set the port forwarding to include 16261 thru 16276 and again the players were able to join again. So just as a FYI......It is confirmed you need to have multiple ports open to allow joining.