Project Zomboid knowledge hub

How to Set Up a Project Zomboid Dedicated Server: The Complete Guide

Everything you need to run a Project Zomboid server your group can rely on: Build 42 or Build 41, your own PC or a rented server, servertest.ini and the sandbox, Steam Workshop mods, admins and the whitelist, restarts, backups and RAM. Written by the team that hosts them.

Browse by topic

Pick your path

Not sure where to begin? Choose the one that sounds like you.

Beginner

I want my own Project Zomboid server

Host, co-op or dedicated, Build 42 or Build 41, and the first settings to change.

Start with the basics
Intermediate

I have one and want to change it

Sandbox rules, Workshop mods, admins and the whitelist.

Mod and settings guides
Advanced

It lags or my group is growing

Player count, RAM, restarts and backups, and what to check first.

Performance guides

Most read this quarter

Ranked by visits from Google Search, July to October 2026.

  1. Install Steam Workshop mods and mapsMods5 min
  2. Log in as admin or promote players to adminAdmin3 min
  3. Solo versus multiplayer in Project ZomboidPlay5 min
  4. Build 42 Stable: upgrade and migration guideBuilds5 min
  5. Automatic restarts with warning messagesUpkeep2 min
  6. Automate Steam Workshop updatesMods2 min

Setup and connecting

Server details, files, SFTP, logs, FAQ

6 guides

Good to knowCopy the full address from CONNECTION INFO in the panel: every GTX server has its own port, so the game's default 16261 will not reach yours.

Build 42 and Build 41

Stable, legacy41, 42.19, switching

2 guides

Good to knowWorlds do not move between builds: a Build 41 save stays on Build 41, and Build 42 starts with a fresh world.

Mods and Workshop

Workshop installer, branches, updates

2 guides

Good to knowOn Build 42 every mod ID on the Mods= line starts with a backslash; on Build 41 there is none.

Admin and players

setaccesslevel, access levels, co-admins

2 guides

Good to knowUse the username you joined with, in quotes, not your character's name, and be connected when you run setaccesslevel.

Restarts, backups and restores

Scheduled restarts, backups, reinstalls

5 guides

Good to knowThe Restart with Messages task warns players at 10, 5, 2 and 1 minute, saves the world, restarts the server and takes a backup.

Performance and your plan

RAM, slots, CPU, hardware, donations

5 guides

Good to knowThe game defaults to 32 players and warns that more can cause poor map streaming and desync: grow past 32 step by step.

Play guides

Solo or multiplayer

1 guides

Good to knowA singleplayer character cannot be carried into a multiplayer world: everyone starts fresh on a server.

The complete guide

Quick start: your first Project Zomboid server in five steps

  1. Pick the build. Build 42 for a new world, Build 41 only for an old world or an old mod list. Your players must run the same build as the server (Build 42 or Build 41).
  2. Pick where it runs. The Project Zomboid dedicated server is free from The Indie Stone and runs on a PC that stays on or on a rented server in a datacentre (honest comparison).
  3. Name it and lock it. Set the server name, a password and the player limit in the server settings file, servertest.ini (the settings that matter), then the world rules in the sandbox file (sandbox settings).
  4. Add mods, then make yourself admin. Workshop IDs and mod IDs go in the settings file, and one setaccesslevel command makes you admin (mods and admin).
  5. Keep it healthy. Restart on a schedule with a warning to players, keep mods updated and take a backup before every big change (updates, restarts and backups).

Host, co-op or dedicated server: what you are setting up

Project Zomboid gives you two ways to play online with friends. The Host button in the main menu starts a multiplayer server on your own PC while you play, and its Server Memory option sets how much memory that server gets. It is quick for an evening with friends, but the world lives on the host's PC.

A dedicated server is the separate Project Zomboid Dedicated Server program (Steam app 380870) that The Indie Stone publishes for Windows and Linux. It runs the world without a game client, so nobody has to keep Project Zomboid open: the base, the farm and the generator are there whenever anyone in your group logs in. A rented server is that same dedicated server, run for you in a datacentre with a control panel on top.

Build 42 made dedicated servers matter more: The Indie Stone moved the inventory, item transfers, container interactions, loot distribution and all timed actions to the server, so the client only shows the visuals, and added a full anti-cheat suite (Speed, Hit, NoClip, Inventory and more). A strong, always-on server is what keeps that fair and smooth for everyone.

Good to knowProject Zomboid runs on Windows, macOS and Linux on Steam, and all three can play on the same server. Characters stay with their world: a singleplayer character or one from another server cannot be brought onto your server, so everyone starts a new character when they first join.

Build 42 or Build 41: which branch your server runs

Project Zomboid is still in Early Access, and The Indie Stone ships it in builds. Build 42 went to the Stable branch, the default version on Steam, on 29 July 2026 as version 42.20. The latest Stable update when we wrote this was 42.21, released on 28 September 2026. New updates now go to the Unstable branch first, players test them, and then the same release moves to Stable. These are the branches a server owner meets, all from The Indie Stone's announcements on Steam:

Build 42 Stable (default)

The build every new player gets from Steam, with no beta selected. Use it for every new world and for Build 42 mods. It brought the crafting overhaul, animals, basements, darker nights, three new towns (Ekron, Irvington and Brandenburg) and a map surface twice the size.

Build 41 Legacy (legacy41)

The Steam beta branch that keeps Build 41 alive for old worlds and Build 41 mod lists. It still gets fixes: the 41.78.21 Legacy hotfix came out on 26 August 2026. Players choose legacy41 under Properties, Game Versions & Betas in Steam.

Unstable and 42.19

Unstable is the testing branch for the next update. The 42.19 beta branch only exists so old Build 42 Unstable worlds can be finished, because 42.19 Unstable saves are not compatible with Build 42 Stable.

Two rules decide everything else. Players must run the same build as the server, or they cannot join; since 42.21 the game tells a player who tries to connect to a server on a different version. And worlds do not move between builds: The Indie Stone says Build 41 savegames are not compatible with Build 42, so moving to Build 42 means a fresh world.

How a server picks its branch. On your own machine, choose the branch for the Project Zomboid Dedicated Server tool under Game Versions & Betas in Steam, or add it to SteamCMD, for example app_update 380870 -beta legacy41 validate for Build 41. On GTX, Build 42 and Build 41 Legacy are two separate servers at the same price: you choose one when you order, and you move between them with Switch Game Server in the Client Area, which backs up your current server first (how to switch). To finish an old Build 42 Unstable world, MORE › Change Server Version lets you pick Build 42.19 Unstable. Our Build 42 upgrade and migration guide walks through every path.

Heads upMods follow the build too. Build 41 mods do not load on Build 42 unless the author released a Build 42 version, and some mods updated for Build 42 no longer support Build 41. Check every mod's Workshop page before you change build.

Host it yourself or rent a server: an honest comparison

Running your own Project Zomboid dedicated server is free if you have a spare PC, and it is a good way to learn how the server works. The official PZ wiki dedicated server guide covers it in full; in short:

  1. Install Project Zomboid Dedicated Server from the Tools section of your Steam library, or with SteamCMD: login anonymous, then app_update 380870 validate. Do not start the server from Steam itself.
  2. Edit StartServer64.bat (Windows) and set the -Xms and -Xmx memory values. The script asks for 16 GB by default; the wiki says to set the memory you want to use, or the server can fail to start with memory errors.
  3. Run StartServer64.bat, or start-server.sh on Linux under its own user, not root. On the first run the server asks you to set the password of the admin account it creates.
  4. Forward UDP ports 16261 and 16262 on your router and allow them in your firewall. A second server on the same machine needs two more UDP ports.
  5. Edit the settings in servertest.ini in Zomboid/Server and the sandbox file next to it, then join with Join › Favorites › Add, your public IP and port 16261.
  6. Stop the server with the quit command so the world is saved, and update it through Steam after every patch. The developers discourage running it as a Linux systemd service, because a clean save on shutdown is not guaranteed that way.

Your own PC or home server

Online: only while the machine is on.
Setup: Steam or SteamCMD, memory flags, config files, router and firewall.
Mods: IDs typed into the settings file by hand.
Backups and restarts: your own scripts.
Your address: shared with everyone who joins.
Cost: free software, plus power, RAM and your connection.

A rented server

Online: 24/7.
Setup: done when you order; name it and start it in the game panel.
Mods: Steam Workshop installer fills in the IDs.
Backups and restarts: scheduled tasks with player warnings, automatic backups.
Your address: a datacentre address with DDoS protection.
Cost: a monthly fee, no setup fee and no contract.

Our view after hosting game servers since 2008: two or three friends with a spare PC can start at home. Rent one when the world must keep running while the host sleeps, when your group plays at different times, or when you run a modded or public server. Every GTX Project Zomboid server includes up to 10 GB of RAM; see our Project Zomboid server hosting plans for current prices and locations.

Setting up your Project Zomboid server in the GTX game panel

Your server is created automatically when your order goes through. These are the first steps, taken from our support guides:

  1. Order the right build. Choose the Build 42 or the Build 41 Legacy server, your slots and the location closest to your group.
  2. Log in to the game panel. It is at gamepanel.gtxgaming.co.uk, with the login from your welcome email. Server Details shows your passwords, ports and other details in one place.
  3. Name it. Press STOP, open Configuration Files and edit GTXGaming.ini: the server name, the server password, the welcome message and the player limit. Save and press START.
  4. Join it. Copy the address from CONNECTION INFO in Connection & Controls. In Project Zomboid open Join, enter the IP address and port, the username and password you want on this server, and the server password if you set one.
  5. Make yourself admin. While you are connected, type setaccesslevel "USERNAME" "admin" in the Web Console with the username you joined with (admin and access levels).
Project Zomboid server control panel at GTX Gaming with Configuration Files, Steam Workshop, Scheduled Tasks, World Manager, live graphs and web console
The GTX game panel for a 20 slot Build 42 server: Configuration Files, Steam Workshop, Scheduled Tasks, Web Console and the live player, CPU and memory graphs are one click away.

Want a friend to help run it? Create a sub-user for them in the panel, so they get their own login and you never share your password. When the server will not start, Log Viewer and the Web Console show what it is doing.

TipEdit settings with the server stopped, then start it again. Every GTX server has its own port, so the game's default 16261 will not reach yours: always copy the full address from the panel.

servertest.ini (GTXGaming.ini): the settings that matter

A Project Zomboid server reads four files, all named after the server. With the default name they are servertest.ini, servertest_SandboxVars.lua, servertest_spawnpoints.lua and servertest_spawnregions.lua, in Zomboid/Server in the user folder; the world itself is saved in a servertest folder under Zomboid/Saves/Multiplayer. Starting the server with -servername changes which files and which save folder it uses. On a GTX server the name is GTXGaming, so you edit GTXGaming.ini and its matching files in Configuration Files, with the Config Editor or the Text Editor.

The .ini file holds everything that is not world rules. The settings most owners change, with the defaults from the official wiki:

  • PublicName and PublicDescription: the name and description in the server browser.
  • Public (default false): shows the server in the in-game browser. Steam-enabled servers always appear in the Steam server browser.
  • Password: players must know it to join. Leave it empty for an open server.
  • MaxPlayers (default 32): the player limit, not counting admins. See player count before you raise it.
  • Open (default true): set it to false for a whitelist, where only accounts an admin created can join (whitelist).
  • PVP (default true) and SafetySystem: whether players can hurt each other, and whether each player switches PvP on and off for themselves.
  • PauseEmpty (default true): game time stops while nobody is online, so the world does not age while your group is asleep.
  • ServerWelcomeMessage: the first chat message players see after they log in.
  • PlayerSafehouse and Faction: whether players can claim safehouses and create factions.
  • SpawnPoint (default 0,0,0, off): forces every new player to spawn at one set of coordinates.
  • WorkshopItems=, Mods= and Map=: the mod lines (mods).
  • DefaultPort (16261) and UDPPort (16262), plus RCONPort (27015) and RCONPassword: on a GTX server the ports are set for you.

Two IDs deserve a backup of their own: ResetID and ServerPlayerID. They tell the server whether a character belongs to this world. If they change, as on a soft reset, every player has to create a new character, so the wiki strongly advises keeping a copy of both.

TipAn admin can check every current value in game with /showoptions, and change one with /changeoption. Bigger edits are safest in the file, with the server stopped.

Sandbox settings, spawn points and your world

The world rules live in the sandbox file, servertest_SandboxVars.lua (GTXGaming_SandboxVars.lua on GTX): how many zombies there are and how they behave, loot, the length of a day, when the water and power go off, farming, and much more. A few defaults from the official file, to show what you can change:

  • Zombies: population Normal, distribution Urban Focused, respawn None. Build 42 also spreads zombies with a little randomness, and 42.20 raised the limit of the Zombie count before deletion option from 500 to 5,000.
  • Time: one in-game day lasts 1 hour 30 minutes of real time, starting in July (the default start date is 9 July 1993).
  • Utilities: the water shuts off 0 to 30 days in, the power 14 to 30 days in.
  • Loot: each loot category has its own rarity, LootItemRemovalList stops chosen items spawning, and loot respawn (HoursForLootRespawn) is off by default.

The easiest way to build a sandbox is in the game: Host › Manage Settings lets you edit a full set of server settings with menus, and saves the same files you then upload to your server. Spawn points and spawn regions (the towns new players can start in) are in the two other .lua files; map mods add their own spawn regions, and the GTX Workshop installer sets those up where the map supports it.

Build 42 also uses a world seed: it decides where some generated things go, such as basements, how zombies are spread and the wilderness beyond the edge of the map, and you can save and share it to get the same layout in another world.

Heads upSettle the sandbox before your group starts, and take a backup before you change it on a world people are already playing. Some changes only make sense from day one, such as the start date and the utility shut-offs.

Mods: Steam Workshop IDs, Mod IDs and map mods

Project Zomboid mods come from the Steam Workshop, and a server needs three things from each one, all in the .ini file:

  • WorkshopItems=: the Workshop IDs the server downloads, separated by semicolons.
  • Mods=: the mod IDs to load. One Workshop item can hold several mods, and the mod ID is in the mod's info.txt, not in the Workshop link. On Build 42 every mod ID starts with a backslash (Mods=\FirstModID;\SecondModID); on Build 41 there is none.
  • Map=: the folder name of every map mod the server loads.

On a GTX server you do not type any of this. Press STOP, open Steam Workshop in the panel, install the mods and maps you want and press START: the installer adds the Workshop IDs and mod IDs, sets up maps and their spawn regions where the map supports it, and stops duplicates. Where a mod has several branches or variants, the first one loads and the others are listed as a comment above the Mods= line in GTXGaming.ini, ready to switch. Our guide to installing Steam Workshop mods and maps has every step.

Players install nothing: the game downloads the server's Workshop mods when they join, so the first join takes a little longer. When an author updates a mod, players who have the new version cannot join a server still running the old one ("Workshop item version is different"). A restart fixes it, and a scheduled Workshop Update task, for example every 12 hours, stops it happening.

  • Add a few mods at a time and test, so a broken one is easy to find. The Log Viewer usually names the mod that failed.
  • Removing a mod from a running world can delete its items, vehicles or buildings, and removing a map mod can break saves in that area. Take a backup first.
  • Match the build: Build 41 and Build 42 mods are not interchangeable, and many authors publish one version for each.
  • Mod security: the 42.20.4 hotfix removed the loadstring and loadstream Lua methods to fix security holes, and 42.21 switched them back on after The Indie Stone looked into it further. If a mod broke in August 2026, check for an update.

For your own game, Build 42 added an official mod manager, with search, favourites, load order, dependencies, incompatibilities and presets you can share. The Indie Stone has also said that after Build 42 Stable it will release its mapping tools and its animation tool, AnimZed, with an extensive modding guide.

Admin, access levels, the whitelist and RCON

Admin rights in Project Zomboid belong to a player's account on the server, and you hand them out with one command. Join the server first, because the player must be connected, then run it in the server console:

  • On GTX: press Web Console and type setaccesslevel "USERNAME" "admin", without a slash.
  • In game: once you are an admin, type /setaccesslevel "USERNAME" "moderator" in chat, with a slash.
  • On your own server: type it in the server's console window. The admin account created on the first run already has full rights.

Use the username you joined with, in quotes, not your character's name. The level is saved with the account, so it survives restarts. Not everyone needs full control: admin, moderator, overseer, gm and observer give smaller sets of rights, and our admin guide shows how to take rights away again. Older guides mention grantadmin: use setaccesslevel instead.

Commands admins use most, from the official list (type help for every command your server supports):

  • /players, /servermsg "text", /save and /quit (save and shut down).
  • /kickuser "name" -r "reason", /banuser "name" -ip -r "reason", /banid SteamID and their unban versions. The 42.21 update fixed a way to join dedicated servers without Steam authentication, which had stopped SteamID bans working, so keep your server updated.
  • /teleport "name", /additem "name" Base.Axe 1, /addxp and /createhorde for events, with /invisible (zombies ignore you) and /godmod (you cannot be hurt) while you run them.
  • /checkModsNeedUpdate: writes to the log whether a Workshop mod has been updated.

Whitelist. Set Open=false and only accounts an admin creates can join: /adduser "username" "password" adds one and /removeuserfromwhitelist "username" takes it away. DropOffWhiteListAfterDeath removes an account after death, so nobody makes a new character. RCON lets tools send the same commands remotely; on GTX the RCON address is under RCON INFO in Connection & Controls.

Good to knowThe 42.20.3 hotfix lets administrators in when the server is full, so a full server no longer locks you out of your own world.

Updates, restarts and backups

A Project Zomboid world can take months to build, so a good routine matters more than any setting:

  • Updates. Steam Update installs the latest version of your server's build. Update on the day a new version reaches your branch, because players on the new version cannot join a server on the old one. On your own machine, run SteamCMD's app_update 380870 validate again (with -beta legacy41 for Build 41).
  • Mod updates. A Workshop Update scheduled task keeps the server's mods current, for example every 12 hours (automate Workshop updates).
  • Restarts. The Restart with Messages task warns players in game at 10, 5, 2 and 1 minute, saves the world, restarts the server and takes a backup. Once a day is a good start; set Repeat Every to 12 or 6 hours for a busy server (automatic restarts).
  • Backups. Backup.bat runs the server's automatic backups, and the scheduled restart takes one too. Before a big change, such as new mods or a new build, make a manual backup. You can restore any dated backup with Restore Server, or download it to your PC with the Backup Manager; we normally keep backups for up to 6 months.

When files are badly broken, MORE › Reinstall gives a clean install. It deletes every server file, including the world, settings and mods, but keeps your backups, so download a backup first.

TipScheduled tasks run on the machine's clock. If a restart happens at the wrong hour, check Server Details › Machine Local Time and set your panel profile's time zone to match.

Moving an existing world to your server

Already surviving on your own dedicated server or with another host? You do not have to start again:

  1. Back it up. Keep a copy of the world folder (named after the server, under Zomboid/Saves/Multiplayer) and the four settings files from Zomboid/Server, and take a backup of your new server too.
  2. Match the build. A Build 41 save only runs on a Build 41 server, so order the Build 41 Legacy server for an older world.
  3. Upload it. Stop the server and copy the save folder with the File Manager, or over SFTP for a big world. Bring the settings across into GTXGaming.ini and the matching sandbox and spawn files, and keep the mod lines identical.
  4. Check the IDs. If players are asked to make a new character, compare ResetID and ServerPlayerID with the old server's settings.

Moving from another host is free: open a ticket with the old host's SFTP details or a download link to a zipped copy of your save, and our team moves the world and settings for you. Mods usually need installing again on the new server.

Player count, RAM and server performance

Players. MaxPlayers defaults to 32, and the official settings warn that more than 32 players can lead to poor map streaming and desync. The 42.20.3 hotfix improved how servers handle their player limit, with support for up to 254 players, but more players still means more of the map loaded at once. Grow past 32 step by step and watch how the server copes. Choose a slot for every player who will be online at the same time: 10 slots suit a group of friends, 20 a bigger group, 30 to 50 a busy community.

Memory. Project Zomboid's server runs on Java, and the memory it may use is fixed when it starts. On our own 20 slot demo server, a fresh Build 42 world used about 3.8 GB of memory with nobody online, with the CPU near idle. Players, a bigger explored map and Workshop mods all raise that. As a guide:

  • 10 GB, included with every GTX Project Zomboid server: a small to mid-sized group with a light mod list.
  • 12 to 16 GB: heavy modpacks, map mods or 30 or more players.
  • More: big modded communities. GTX servers go up to 64 GB, and you can change RAM, slots, CPU priority or hardware yourself in the Client Area.

The panel's live graphs show players, CPU and memory, so you can see whether memory is the limit before you pay for more. The Indie Stone's 42.20.3 hotfix fixed several causes of a memory leak that slowed servers down over time, and 42.21 tackled zombie duplication in multiplayer, so an up-to-date server and a regular restart are the cheapest performance fixes. The Indie Stone plans a Build 42 Support Update during the rest of 2026 focused on optimisation.

TipIf the map pops in late in front of cars, check your players' ping first: The Indie Stone has been fixing map loading while driving with high ping during Build 42, so host close to your group and keep the server updated. If lag grows over hours, check memory in the graphs and schedule a restart.

Troubleshooting a Project Zomboid server

Most problems come down to the build, a mod or the address. Check these in order:

  • Players cannot join after an update. The game client and the server must run the same build. Check the branch under Game Versions & Betas in Steam: no beta for Build 42, legacy41 for Build 41, 42.19 for an old Unstable world. Then press Steam Update on the server.
  • "Workshop item version is different". A mod was updated after the server started. Restart the server so it downloads the update, and add a Workshop Update task.
  • The server will not start after adding mods. Open the Log Viewer: it usually names the mod. Remove the last mods you added from WorkshopItems=, Mods= and Map=, check no double semicolons are left, and add them back one at a time. Check that each mod supports your build.
  • The server is not in the list. Set Public=true and a PublicName for the in-game browser, and join by IP and port in the meantime. Copy the address from the panel: GTX servers do not use the default port.
  • Everyone has to make a new character. ResetID or ServerPlayerID changed. Put the old values back from a backup of the settings file.
  • A big modded server takes minutes to start. That is normal while it downloads and loads the mods. Watch the Web Console for SERVER STARTED before anyone joins.
  • Self-hosted: "Illegal termination of worker thread". The wiki ties it to Build 41 server files left on a machine that now runs Build 42: check that steam_appid.txt contains only 108600, back up your settings and saves, then let Build 42 recreate the Zomboid folder.

Still stuck? Open a ticket with your server's IP and port and what you changed last. Our 24/7 team can read the logs with you.

Playing on your server: game guides

Once the server is running, the game guides help your group decide how to play it, alone or together. These guides are about the game itself, so check how things behave in game after each update: browse the play guides.

Project Zomboid server FAQ

How do I make a Project Zomboid dedicated server?

Install the Project Zomboid Dedicated Server tool from your Steam library, or with SteamCMD (login anonymous, app_update 380870 validate). Set the memory in StartServer64.bat (the -Xms and -Xmx values), start it, choose the admin password on the first run and open UDP ports 16261 and 16262. Or rent one: on GTX it is set up when you order, and you set the name and password in GTXGaming.ini.

Should my server run Build 42 or Build 41?

Build 42 for a new world: it has been the default Stable build on Steam since 29 July 2026. Run Build 41 only for an existing Build 41 world or a Build 41 mod list; players then pick the legacy41 branch under Properties, Game Versions & Betas in Steam. Server and players must run the same build.

Can I move my Build 41 world to Build 42?

No. The Indie Stone says Build 41 savegames are not compatible with Build 42, and saves from the old 42.19 Unstable build do not load in 42.20 or later either. Keep the old world on its own branch (legacy41 or 42.19) and start Build 42 with a fresh world.

How do I make myself admin on my Project Zomboid server?

Join the server, then type setaccesslevel "USERNAME" "admin" in the server console with the username you joined with. On GTX that is the Web Console in the game panel, without a slash. In game, an admin uses the same command in chat with a slash: /setaccesslevel.

How do I add Steam Workshop mods to my Project Zomboid server?

Each mod needs its Workshop ID on the WorkshopItems= line and its mod ID on the Mods= line of the server settings; map mods also go on the Map= line. On GTX, stop the server, install the mods from the Steam Workshop button and start it: the installer fills in all three lines. Players download the mods automatically when they join.

How many players can a Project Zomboid server have?

You set it with MaxPlayers. The default is 32, and the game warns that more than 32 players can lead to poor map streaming and desync. The Indie Stone's 42.20.3 hotfix improved player limit handling, with support for up to 254 players. GTX Project Zomboid plans run from 10 to 100 slots.

How much RAM does a Project Zomboid server need?

It depends on players, mods and how much of the map has been explored. On our own 20 slot demo server, a fresh Build 42 world used about 3.8 GB with nobody online. Every GTX Project Zomboid server includes up to 10 GB; heavy modpacks or 30 or more players want 12 to 16 GB or more. On your own PC, the official start script reserves 16 GB until you change -Xms and -Xmx.

Why can't my friends join my Project Zomboid server?

Most often the game build: players must run the same build as the server (default branch for Build 42, legacy41 for Build 41). Next, a mod that was updated on the Workshop after the server started ("Workshop item version is different": restart the server), a wrong port (copy the full address from your panel), or a wrong server password.