This guide is made for people who want setup a dedicated server on Linux :]
1) Setup server on Linux (Debian 11)
1) Download PuTTy (https://www.putty.org/)
2) Start PuTTy
3) Enter the IP of your VPS in Host Name
4) Enter the port of your VPS (22 by default )
1) Enter the login ID
2) Enter the password
Put the commands in the console following this order
- dpkg –add-architecture i386
- sudo apt install screen libsdl2-2.0-0:i386
- sudo apt-get update && apt-get upgrade
You can change “pzuser” by what you want
- sudo adduser pzuser
- enter the password when the console ask you
- usermod -aG sudo pzuser
- su – pzuser
You can change “pzserver” by what you want, it’s the directory of ProjectZomboid Dedicated server’s files
- mkdir steamcmd pzserver
- cd pzserver
- wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
- tar -xvzf steamcmd_linux.tar.gz
- ./steamcmd.sh
- force_install_dir /home/pzuser/pzserver/
- login anonymous
- app_update 380870 -beta b41multiplayer validate
- exit
2) Start the server
- cd
- cd pzserver
- ./start-server.sh
You must put the password of the admin account in Project Zomboid (it’s a new password)
After this message, you can launch Project Zomboid and connect to your server
- Launch Project Zomboid
- Go to Online
- Go to server list
- Enter the IP of you server in IP input
- Enter the port (default : 16261)
- Enter “admin” as username or other name if you don’t want to log in as admin
- Enter the admin password or your user account’s password
2.1) Run server 24h/24h
Commands
- screen
- cd pzserver
- ./start-server.sh
- CTRL + A + D
You can quit PuTTy, your server will run in background.
You can resume the server’s console when you will connect again to PuTTy
- screen -r
3) Stop a server
Write : quit
4) Server configuration
- cd
- cd Zomboid
- cd Server
Files :
> servertest.ini
> servertest_SandboxVars.lua
> servertest_spawnpoints.lua
> servertest_spawnregions.lua
4.1) servertest.ini
The parameters’ description are written in it
- nano servertest.ini
- CTRL + O (save)
- CTRL + X (exit)
nightlengthmodifier=1 PVP=false PauseEmpty=true GlobalChat=true ChatStreams=s,r,a,w,y,sh,f,all Open=true ServerWelcomeMessage=WELCOME<LINE><LINE> Survivor LogLocalChat=false AutoCreateUserInWhiteList=true DisplayUserName=true ShowFirstAndLastName=false SpawnPoint=0,0,0 SafetySystem=false ShowSafety=false SafetyToggleTimer=2 SafetyCooldownTimer=3 SpawnItems= DefaultPort=16261 ResetID=831494815 Mods= Map=Muldraugh, KY DoLuaChecksum=true DenyLoginOnOverloadedServer=true Public=true PublicName= Public server PublicDescription= Nice server MaxPlayers=32 PingFrequency=10 PingLimit=400 HoursForLootRespawn=48 MaxItemsForLootRespawn=4 ConstructionPreventsLootRespawn=true DropOffWhiteListAfterDeath=false NoFire=false AnnounceDeath=false MinutesPerPage=0.2 SaveWorldEveryMinutes=10 PlayerSafehouse=true AdminSafehouse=false SafehouseAllowTrepass=true SafehouseAllowFire=false SafehouseAllowLoot=true SafehouseAllowRespawn=true SafehouseDaySurvivedToClaim=0 SafeHouseRemovalTime=144 AllowDestructionBySledgehammer=false KickFastPlayers=false ServerPlayerID=313828062 RCONPort=27015 RCONPassword= DiscordEnable=false DiscordToken= DiscordChannel= DiscordChannelID= Password= MaxAccountsPerUser=0 SleepAllowed=false SleepNeeded=false SteamPort1=8766 SteamPort2=8767 WorkshopItems= SteamScoreboard=true SteamVAC=true UPnP=true UPnPLeaseTime=86400 UPnPZeroLeaseTimeFallback=true UPnPForce=true CoopServerLaunchTimeout=20 CoopMasterPingTimeout=60 VoiceEnable=true VoiceComplexity=5 VoicePeriod=20 VoiceSampleRate=24000 VoiceBuffering=8000 VoiceMinDistance=10.0 VoiceMaxDistance=20.0 Voice3D=true PhysicsDelay=500 SpeedLimit=70.0 server_browser_announced_ip= UseTCPForMapDownloads=false PlayerRespawnWithSelf=false PlayerRespawnWithOther=false FastForwardMultiplier=40.0 PlayerSaveOnDamage=true SaveTransactionID=true DisableSafehouseWhenPlayerConnected=false Faction=true FactionDaySurvivedToCreate=0 FactionPlayersRequiredForTag=1 AllowTradeUI=true DisableRadioStaff=false DisableRadioAdmin=true DisableRadioGM=true DisableRadioOverseer=false DisableRadioModerator=false DisableRadioInvisible=true ClientCommandFilter=-vehicle.*;+vehicle.damageWindow;+vehicle.fixPart;+vehicle.installPart;+vehicle.uninstallPart ItemNumbersLimitPerContainer=0 BloodSplatLifespanDays=7 AllowNonAsciiUsername=true BanKickGlobalSound=true RemovePlayerCorpsesOnCorpseRemoval=false ZombieUpdateMaxHighPriority=50 ZombieUpdateDelta=0.5 ZombieUpdateRadiusLowPriority=45.0 ZombieUpdateRadiusHighPriority=10.0 TrashDeleteAll=true PVPMeleeWhileHitReaction=true MouseOverToSeeDisplayName=true HidePlayersBehindYou=true PVPMeleeDamageModifier=30.0 PVPFirearmDamageModifier=50.0 CarEngineAttractionModifier=0.5
nightlengthmodifier
The night’s length, this can be edited to change the speed at which the night will progress. 0.5 will make it last twice as normal, 2 will make it go double as fast.
PVP
Player vs Player combat – true = on, false = off
PauseEmpty
If set to true, this will pauset your server if there are no players on it.
GlobalChat
If set to true, it allows the “/all” channel, making your players able to safely communicate with everyone.
Open
Whitelisting – If true, anyone can join, if false, players need to be added to a whitelist in order to play.
ServerWelcomeMessage
Welcome to Project Zomboid MP ! to chat locally press ‘t’, to global chat press ‘y’ or add ‘/all’ before chatting <LINE> Type ‘/help’ to have a list of available commands <LINE> <RGB:1,1,1>
You can change the message players see each time they log-in.
LogLocalChat
When using the “/say” command nearby people will be able to read it in the chat log, if set to false people can only view the message on their screen.
SpawnPoint
To set a custom spawn point, change 0,0,0 to something like 1,2,0 the 1 is the first number (x position), 2 is the 2nd (y position), and 0 is the level (z position). So if you want to be upstairs in a room then you change that number. you can use the Project Zomboid Map to look for specific coordinates to spawn onto.
DoLuaChecksum
Are you getting an error that says “you have been kicked! Your lua version does not match the server.” ? This usually means you have mods installed and need to either turn off this by setting the argument to false, or you have to uninstall all mods, including ones which are directly installed into your media files.
MaxItemsForLootRespawn
This option is very important when you want to keep your house items from disapearing because of respawn ! Whatever this is set at, any chest/item that doesn’t equal this amount will respawn. So if it’s 4, make sure every container in your house has at least 4 items in it or they will respawn !
AnnounceDeath
Make it so your embarrassing death is broadcasted to your friends
4.2) Add mods to your server
Search parameters
mods=
WorkshopItems=
Go to a Workshop mod page
(example :Just Throw Them Out The Window)
Commands
- cd Zomboid
- mkdir mods
Get the Workshop ID and Mod ID at the end of the description of the mod
And copy past here
mods=OutTheWindow
WorkshopItems=2659216714
(in screen, you can see that two added mods are separated by “;”
Save your servertest.ini file and exit
- CTRL + O
- CTRL + X
The parameters’ description are written in it
- nano servertest_SandboxVars.lua
- CTRL + O (save)
- CTRL + X (exit)
SandboxVars = { VERSION = 4, Zombies = 4, Distribution = 1, DayLength = 3, StartYear = 1, StartMonth = 7, StartDay = 9, StartTime = 2, WaterShut = 2, ElecShut = 2, WaterShutModifier = 14, ElecShutModifier = 14, FoodLoot = 2, CannedFoodLoot = 2, LiteratureLoot = 2, SurvivalGearsLoot = 2, MedicalLoot = 2, WeaponLoot = 2, RangedWeaponLoot = 2, AmmoLoot = 2, MechanicsLoot = 2, OtherLoot = 2, Temperature = 3, Rain = 3, ErosionSpeed = 3, ErosionDays = 0, XpMultiplier = 1.0, ZombieAttractionMultiplier = 1.0, VehicleEasyUse = false, Farming = 3, CompostTime = 2, StatsDecrease = 3, NatureAbundance = 3, Alarm = 4, LockedHouses = 6, StarterKit = false, Nutrition = true, FoodRotSpeed = 3, FridgeFactor = 3, LootRespawn = 1, SeenHoursPreventLootRespawn = 0, WorldItemRemovalList = "Base.Vest,Base.Shirt,Base.Blouse,Base.Skirt,Base.Shoes,Base.Hat,Base.Glasses", HoursForWorldItemRemoval = 24.0, ItemRemovalListBlacklistToggle = false, TimeSinceApo = 1, PlantResilience = 3, PlantAbundance = 3, EndRegen = 3, Helicopter = 2, MetaEvent = 2, SleepingEvent = 1, GeneratorSpawning = 3, GeneratorFuelConsumption = 1.0, SurvivorHouseChance = 3, VehicleStoryChance = 3, ZoneStoryChance = 3, AnnotatedMapChance = 4, CharacterFreePoints = 0, ConstructionBonusPoints = 3, NightDarkness = 3, InjurySeverity = 2, BoneFracture = true, HoursForCorpseRemoval = 216.0, DecayingCorpseHealthImpact = 3, BloodLevel = 3, ClothingDegradation = 3, FireSpread = true, DaysForRottenFoodRemoval = -1, AllowExteriorGenerator = true, MaxFogIntensity = 1, MaxRainFxIntensity = 1, EnableSnowOnGround = true, MultiHitZombies = false, RearVulnerability = 3, AttackBlockMovements = true, AllClothesUnlocked = false, CarSpawnRate = 3, ChanceHasGas = 1, InitialGas = 2, FuelStationGas = 4, CarGasConsumption = 1.0, LockedCar = 3, CarGeneralCondition = 2, CarDamageOnImpact = 3, DamageToPlayerFromHitByACar = 1, TrafficJam = true, CarAlarm = 2, PlayerDamageFromCrash = true, SirenShutoffHours = 0.0, RecentlySurvivorVehicles = 1, EnableVehicles = true, Map = { AllowMiniMap = false, AllowWorldMap = true, }, ZombieLore = { Speed = 1, Strength = 2, Toughness = 2, Transmission = 1, Mortality = 5, Reanimate = 3, Cognition = 3, CrawlUnderVehicle = 5, Memory = 2, Decomp = 1, Sight = 2, Hearing = 2, Smell = 2, ThumpNoChasing = false, ThumpOnConstruction = true, ActiveOnly = 1, TriggerHouseAlarm = false, ZombiesDragDown = true, ZombiesFenceLunge = true, }, ZombieConfig = { PopulationMultiplier = 1.0, PopulationStartMultiplier = 1.0, PopulationPeakMultiplier = 1.5, PopulationPeakDay = 28, RespawnHours = 72.0, RespawnUnseenHours = 16.0, RespawnMultiplier = 0.1, RedistributeHours = 12.0, FollowSoundDistance = 100, RallyGroupSize = 20, RallyTravelDistance = 20, RallyGroupSeparation = 15, RallyGroupRadius = 3, }, }
4.4) Allocate more RAM to Java (IMPORTANT)
Commands
- cd
- cd pzserver
- nano ProjectZomboid64.json
- -Xmx put -Xmx=8g (if your server have 16go RAM).
- CTRL + O
- CTRL + X
5) Update server version PZ
This means that the server does not have the latest version of Project Zomboid
Commands
- cd
- cd steamcmd
- ./steamcmd.sh
- force_install_dir /home/pzuser/pzserver/
- login anonymous
- app_update 380870 -beta b41multiplayer validate
- exit (at the end)
6) Hard Reset
Commands
- cd
- cd Zomboid
- cd Saves
- cd Multiplayer
- rm -rf servertest
- cd
- cd Zomboid
- cd db
- rm -rf servertest.db
When you restart the server, it will recreate the original files
Thanks to Dane and Xianah ~ Nana for his great guide, all credit to his effort. you can also read the original guide from Steam Community. enjoy the game.
Related Posts:
- Project Zomboid: How to Transfer Data From a Player-hosted Server to a Dedicated Server
- Project Zomboid: The Bare Essentials to Start
- Project Zomboid: Guide to Maintenance of Weapons