How do I set up a Project Zomboid dedicated server?
When your Project Zomboid server starts for the first time it creates a server configuration file at .cache/Server/YourServerName.ini, where YourServerName is whatever you named your server - not a fixed filename. Stop the server before editing this file, as changes made while it is running will be overwritten on shutdown.
Key settings in that .ini file: MaxPlayers (player cap), PVP (true/false), Public (whether it appears in the server browser), PublicName (server browser display name), PublicDescription, Password (blank for no password), SpawnRegion (starting town), and Mods / WorkshopItems (for mod lists).
Set your admin password on the Startup page (the Admin Password field, masked by default - click the eye icon to reveal it) rather than editing AdminPassword= in that .ini file directly: the server discards a manually-edited line on every restart, so the change won't stick. To give your own account admin rights, use the Console page - not in-game chat, and without a leading slash: adduser YourUsername first, then setaccesslevel YourUsername admin. Names are case sensitive, and if you try setaccesslevel before adduser the server replies "use /adduser first" - ignore the slash in that message, the console still will not accept one. Our full Project Zomboid admin guide covers this in more detail if you get stuck.
To add Steam Workshop mods, find the mod Workshop ID from the URL of its Steam Workshop page. Add the ID to WorkshopItems (semicolon-separated) and the mod ID to Mods in your server's .ini file. The mod ID is different from the Workshop ID; it is listed on the mod's Workshop page under its description. Restart the server after editing. Mods are downloaded and loaded on startup.
Sandbox settings (loot abundance, zombie count, XP multipliers, day length) are in a separate file, .cache/Server/YourServerName_SandboxVars.lua - same naming pattern, after your server's own name. The easiest way to configure these is to host a local single-player game with your desired settings, find the generated SandboxVars.lua in your local Zomboid save, and upload it to replace the server's version.
Want to try this on a real server?
Everything described here is available on the trial too, on the same hardware and the same panel as the paid plans. Try it free for 24-hour, no credit card required.
Didn't fix it? Ask in Discord.
Ask in our Discord - we help with hosting questions whether or not you host with us.