Project Zomboid Multiplayer “Code 5”: Find the Real Error
Checked for Project Zomboid Build 42.19 multiplayer troubleshooting.
Do not delete erosion.ini, a character folder, or a multiplayer save as a generic fix. Those steps can wipe world or player data without fixing the real failure. First stop the game or server cleanly, copy the entire Project Zomboid user-data folder, and then open the log.
1. Back up before troubleshooting
Zomboid user-data folder while the game and server are closed. This keeps saves, player databases, server settings, logs, configuration, mod lists, and local mods stored there. Steam Workshop downloads usually live in the Steam library—record Workshop IDs and downloaded versions, or back up that content separately when you need an exact mod build.
Windows
- User data:
%UserProfile%\Zomboid\ - Server settings:
%UserProfile%\Zomboid\Server\<server>.ini - Client log:
%UserProfile%\Zomboid\console.txt - Host Game log:
%UserProfile%\Zomboid\coop-console.txt - Dedicated-server log:
%UserProfile%\Zomboid\server-console.txt - Log history:
%UserProfile%\Zomboid\Logs\ - Support archive, when present:
%UserProfile%\Zomboid\logs.zip
macOS and Linux
- User data:
~/Zomboid/ - Server settings:
~/Zomboid/Server/<server>.ini - Client log:
~/Zomboid/console.txt - Host Game log:
~/Zomboid/coop-console.txt - Dedicated-server log:
~/Zomboid/server-console.txt - Log history:
~/Zomboid/Logs/ - Support archive, when present:
~/Zomboid/logs.zip
A Windows dedicated-server install may ship launch scripts that the macOS client package does not include. The launcher name alone does not tell you what failed—use its console output and the generated logs.
2. Match the log message to the correct fix
| Log text to look for | What it usually indicates | Safe next step |
|---|---|---|
NullPointerException, Exception, or Caused by |
A Java exception or another execution failure. A NullPointerException is one exception type, not a universal numeric Code 5. | Keep the complete stack trace. Start with the first relevant file, class, Lua path, or mod ID named after Caused by. Test changes only on the backed-up copy. |
BindException, Address already in use, or bind failed |
Another process or server instance already owns a required port. | Read DefaultPort, UDPPort, and, if enabled, RCONPort from the server’s INI file. Stop the stale process or assign an unused port, then restart one server instance. |
timeout, connection failed, server is not responding, or repeated disconnects |
The client did not finish connecting. The server may still be starting, offline, blocked, or using a different address, port, or game branch. | Confirm the server reaches its ready state, then verify the address, configured port, firewall/NAT rules, Steam branch, and client/server build. |
checksum, workshop, mod, or version mismatch |
The client and server do not share the same game or mod content. | Compare the branch, Workshop IDs, mod IDs, load order, and downloaded versions. Restart after downloads finish; do not erase player data. |
| A save, database, or configuration file is named immediately before the failure | That specific file may be unreadable or incompatible—but only if the log names it first. | With a full backup available, move or rename only the named file so you can restore it. Never delete the whole save or character directory as the first test. |
3. Search the current log
- Joining another server: start with the affected client’s
console.txt. - Using Host Game: inspect
coop-console.txtfor the hosted server andconsole.txtfor that player’s client-side connection. - Running a dedicated server: inspect
server-console.txt, then compare it with the affected client’sconsole.txt.
On Windows PowerShell, search all current console logs that exist with:
Get-ChildItem "$env:USERPROFILE\Zomboid\*console.txt" -File -ErrorAction SilentlyContinue |
Select-String -Pattern "exception|error|caused by|bind|address already in use|timeout|checksum|workshop|version mismatch"
On macOS or Linux, use:
grep -niE "exception|error|caused by|bind|address already in use|timeout|checksum|workshop|version mismatch" ~/Zomboid/*console.txt 2>/dev/null
Do not stop at the last generic failure line. Scroll up to the first exception or error in the same startup attempt, then keep the full stack trace and the lines just above it.
4. Check a port only when the log reports a bind error
Server settings use DefaultPort for player data and also expose UDPPort and RCONPort. The join screen defaults to port 16261, but your server INI is the source of truth if you changed it.
Windows PowerShell example:
$port = 16261
Get-NetUDPEndpoint -LocalPort $port -ErrorAction SilentlyContinue
macOS or Linux example:
lsof -nP -iUDP:16261
Replace 16261 with the port named in your server configuration or error message. If a process is listed, identify it before stopping anything. Restarting the computer may clear a stale process, but it does not fix duplicate server configs or a port that stays in use.
5. Use a controlled retest
- Close the client and stop every server instance.
- Back up the complete
Zomboiduser-data folder. - Preserve the relevant
console.txt,coop-console.txt, orserver-console.txt, the matching files inLogs, andlogs.zip. - Apply one fix that matches the exact log signature.
- Start the server and wait for a clear ready or failure message before connecting.
- Compare the new log with the old one. If the error changes, fix the new message instead of repeating the previous step.
What to include when asking for help
- The exact Project Zomboid build and Steam branch used by both client and server.
- The complete first stack trace or bind/connection message, not only “Code 5.”
- Whether this is Host Game, a dedicated server, or a rented server.
- The operating system and server startup method.
- The enabled Workshop IDs and mod IDs, plus whether the problem also occurs without mods on a separate test server.
logs.zipafter removing usernames, IP addresses, passwords, tokens, or other private data you do not want to share publicly.
Related guides: find the mod causing an error, back up Project Zomboid data, and server settings before changing ports or save files.