Project Zomboid

Project Zomboid

133 ratings
How to transfer data from a player-hosted server to a dedicated server
By copygirl
Tested for version 41.78.
Have you attempted to move your existing world to a dedicated server, but could not quite figure out how? This guide will show you how to transfer the world files AND fix potential issues with moving character data. It also shows how players can keep their map information (what they've explored and any markers), which is stored on their computer.
10
2
2
15
2
3
   
Award
Favorite
Favorited
Unfavorite
Server: Transferring Config and World Files
This guide assumes that you're both already the owner of a working Project Zomboid dedicated server, and were previously hosting through the in-game "Host" option to your Steam friends. If your friend was hosting the game, you will have to tell them to send you the relevant files.

First of all, locate your Zomboid folder.
  • Windows: C:\Users\<username>\Zomboid\
  • Linux: ~/Zomboid/
Copying / Uploading Files
In the "Server" subfolder, you will find configuration files for each server or hosted game that you've set up. They will be named "<servername>.ini", "<servername>_SandboxVars.lua" and so on. Copy or upload these files into the same location on the server.

Next, in "Saves/Multiplayer/<servername>" you will find all the world save information, which includes items, zombies, players, vehicles etc. Also copy or upload this folder to the server's "Multiplayer" folder.

I do not recommend to change the server name in these files and folders - I have not tested what happens when you do. Certain database files refer to the server name so changing it could have adverse effects. As people in the comments have pointed out, it should be possible to change the server name. Be sure to change every occurrence in the file names accordingly. There's also a case where you need to change the server name in a database file, but I will let you know when that comes up.

Skipping <servername>.db
There is also a "<servername>.db" file in the "db" folder. This file contains login information for Steam accounts (when using the host option in-game) or user / password based accounts when hosting a dedicated server. Due to how Steam accounts are not compatible with user / password accounts, I recommend NOT including this file. More on this in the next section.

Making Mods Work
If you've previously used mods when hosting the game, you will have to tell the server to install the right mods from the workshop, or else you will get error messages regarding missing mods when starting up your dedicated server.

For this, open the "<servername>.ini" file in a text editor. In there you will find the following the following two lines, for example:
Mods=ModManager;modoptions;MoreDescriptionForTraits ... WorkshopItems=
You will need to go to the Workshop to find the workshop ID (10 digit number or so) for each mod ID (such as "ModManager") and place them in the "WorkshopItems" line. For the specified three example mods from above, this would look as such:
WorkshopItems=2694448564;2169435993;2685168362
(Mod Manager: Server might help with managing mods, but I will not get into detail here.)

Starting up the Server
When starting up the server without any special arguments, it uses the server name "servertest" by default, which might not be the same as you've used for your hosted game. To start the server with the correct server name, run it with the argument "-servername <servername>". For example, on Linux, this would look as such:
cd ~/Steam/steamapps/common/Project\ Zomboid\ Dedicated\ Server/ ./start-server.sh -servername "ProjectBunny"
In Windows, you will have to edit the "StartServer64.bat" file and edit the following line as such:
".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=1 -Dzomboid.znetlog=1 -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Xms16g -Xmx16g -Djava.library.path=natives/;natives/win64/;. -cp %PZ_CLASSPATH% zombie.network.GameServer -statistic 0 -servername "ProjectBunny"
For other server setup and configuration tutorials and tips, please see different guides and resources online.
Server: Fix Account Names in players.db
When you move from an in-game hosted server to a dedicated one, the account system the game uses is slightly different. In essence this means that those who've been playing in your world before might not be able to log into the same characters they've played as before, and instead have to create a new character altogether.

Explanation of the Problem
So why am I saying "might"? Actually, when you join a hosted game, the game will create an account for you locked to your Steam ID, and uses your current Steam profile name for the account name. When you log into a dedicated server, you have to specify a name and password yourself.

When you create a character, it will be bound to a specific username. Your Steam profile name on a hosted server or the account name on a dedicated server. When switching to a dedicated server, you have two options:

  • Create accounts with the same account names as your Steam profile names. Due to the character being bound to the same name, everything matches up. This won't work if you had special symbols in your Steam name, which you can't type in-game.

  • Fix up the names the characters are bound to, so the person logging into an account with a certain name will get a certain character assigned. This works even when creating new accounts after renaming the character's username.

If every player from the old hosted server can create accounts with the Steam name they used, you're lucky! You can skip the following step. Otherwise, you'll have to get good and fix the problem. Here's how:

Editing Account Names in "players.db"
If you still have your "<servername>.db" file in the folder "db", I recommend to just rename or move it somewhere else. Doing this will clear out any existing account data, and require you to re-create a new admin account on the next server start.

Next, you will need to edit "Saves/Multiplayer/<servername>/players.db". This file is in a non-text format called SQLite, so you will need a program capable of editing it. Here I'm using DB Browser for SQLite[sqlitebrowser.org] which is available for both Windows and Linux. I recommend making a backup copy of any file you edit just in case you screw something up. Screwing up could mean deleting your, or everyone's game characters for that world.

Open the DB Browser program, click "Open Database", and select your "players.db" file.



Right click the "networkPlayers" table and select "Browse Table".



Here, you will find all the player characters in the world, the username (account name) they're associated with, the name of the character itself, and much more. All you'll want to change is the "username" column for each character (unless it's already correct).

Select the username you want to change, and type in which account name you want it to be bound to. The next person logging in with the same account name will be logged into that character.

If you changed the server name, be sure to edit the "world" column for each character to reflect the new server name.

Finally, click the "Write Changes" button to save your changes to the file. (And upload to your dedicated server if necessary.)
Players: Transfer Map Information
After your server owner has successfully transferred your characters and you can once again log in with your desired account name into the newly set-up dedicated server, you might find one little thing being wrong: Your map data is missing. No explored areas are visible, and all your custom markers are gone.

This is because this information is actually stored on your computer, and not the server. And there's currently no way for the game to realize that, after a server has been moved, the old and new server are actually the same.

To fix this, we need to transfer the map data from the hosted server over to the dedicated server. (Make sure you've logged into the new server at least once.)

First of all, locate your Zomboid folder.
  • Windows: C:\Users\<username>\Zomboid\
  • Linux: ~/Zomboid/
Go to the "Saves" subfolder, then "Multiplayer". In here you'll have one folder for each server you've joined. Hosted games will have the format "<steamid>_<servername>_player". (This uses the Steam ID of the person who hosted the game.) Dedicated servers have the format "<address>_<port>_...".

Once you've found the right folders, delete the files inside the dedicated server folder to which you want to copy the map information. Then copy the files from the hosted game folder into the dedicated server folder.

Now you should have your map information and markers on the new dedicated server!
Have fun! 💚
35 Comments
joshii Jul 30 @ 5:46pm 
Thank you so much.
breganest Apr 22 @ 12:40am 
@copygirl Hey its a great guide and i think i have everything in the right place, but i cant seem to get the mods to download for the dedicated server. I double checked the workshop id and mod names but it keeps failing on the download
Gerel Mar 17 @ 10:56am 
i can't manage to transfer the save itself/character even tho i followed everything
CyborgRider Oct 17, 2024 @ 9:41am 
@supre5 I'm a little late to your problem, but there is a setting in the ini file for acii characters in usernames. If you allow non acii characters, it should allow your friend to join with his special character name. I assume you figured it out a different way already though.
Noro Deity Sep 11, 2024 @ 11:06am 
What hosting service did you use? I'm having issues with bisect and I'm not sure where to go from here
z Jul 3, 2024 @ 10:13am 
THANKS, APPRECIATED IT
Multi Colored Psychopath Jun 28, 2024 @ 8:31pm 
also not getting Server/Saves in dedicated server. this is the guide i followed to set it up https://www.youtube.com/watch?v=FpVsRIz8WGI&ab_channel=YourBoyJake

I'll just make the folders and copy+paste everything in there. I'll come back and update soon
copygirl  [author] Jun 19, 2024 @ 10:25am 
@kikikikoboy Apologies, I don't know what you're asking. After you set up a dedicated server, you should end up with "Server" and "Saves" folders. Perhaps they only show up after starting up the server once?

However, this is not a tutorial on how to set up a dedicated server, nor will I be able to help, since there's many ways that a dedicated server can be set up (different operating systems, through Steam or steamcmd, having it hosted by some company, ...).
kikikikoboy Jun 17, 2024 @ 6:46pm 
@copygirl Same question as DangerDangle's Sep 15 2022 comment,

There's no Server or Saves files in the dedicated server file?
supre5 Jun 8, 2024 @ 9:38am 
@copygirl Thank you, I probably made this mistake in a hurry or for some other reason. This time I made sure not to save the names with line breaks. Since two of my friends were busy today, I tested all the users on my account by changing their Steam IDs to my Steam ID in the players.db file, and everything seemed to work. But just in case, I stored their stuff in case they still need to make new users for some reason.