Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@
> Use this script at your own risk, I am not responsible for dataloss!
>
> Please make sure you always have a backup!

Check failure on line 9 in migration/README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Blank line inside blockquote

migration/README.md:9 MD028/no-blanks-blockquote Blank line inside blockquote https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md
> [!IMPORTANT]
> If you're migrating a save that was ever played on Windows (including via Steam's
> "host from save data" co-op mode), that save's `WorldOption.sav` takes priority over
> `PalWorldSettings.ini` and will silently prevent your new server's settings —
> including `AdminPassword` — from applying. This causes RCON/REST API authentication
> to fail with "AdminPassword is empty" even when the password is correctly configured
> everywhere else (see #886). `migrate.sh` (below) handles this automatically by moving
> any pre-existing `WorldOption.sav` aside; if you migrate manually, do the same
> yourself (see step 4 in "Manually" below).

1. Find a directory which is named by game server name and contains all saved game data,
usually it will at `~/Steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/`
2. Make sure `migration/migrate.sh`, saved game data directory and mounted volume
Expand Down Expand Up @@ -44,4 +54,9 @@
DedicatedServerName=`2E85FD38BAA792EB1D4C09386F3A3CDA`.
3. Delete the entire new server save at `PalServer\Pal\Saved\SaveGames\0\<your_save_here>`,
and replace it with the folder from the old server.
4. Restart the new server
4. If the copied save folder contains a `WorldOption.sav` file and the save was ever played on
Windows, move (don't delete outright — keep it as a backup) that file out of the way, e.g.
`mv WorldOption.sav WorldOption.sav.bak`. Otherwise it takes priority over
`PalWorldSettings.ini` and silently blocks your new server's settings (including
`AdminPassword`) from applying — see #886.
5. Restart the new server
10 changes: 10 additions & 0 deletions migration/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ docker stop "${CONTAINER_ID}"

cp -r ./"${MIGRATION_SERVER_NAME}" ./palworld/Pal/Saved/SaveGames/0/"${MIGRATION_SERVER_NAME}"/

# A WorldOption.sav carried over from a save that was ever played on Windows takes
# priority over PalWorldSettings.ini and silently blocks the new server's settings
# (including AdminPassword) from applying -- see #886. Move it aside rather than
# deleting it outright, so it's still recoverable if needed.
WORLD_OPTION_SAV="./palworld/Pal/Saved/SaveGames/0/${MIGRATION_SERVER_NAME}/WorldOption.sav"
if [ -f "${WORLD_OPTION_SAV}" ]; then
echo "########## MOVING ASIDE WorldOption.sav (see #886) ##########"
mv "${WORLD_OPTION_SAV}" "${WORLD_OPTION_SAV}.bak"
fi

sed -i "s/DedicatedServerName=.*/DedicatedServerName=${MIGRATION_SERVER_NAME}/" ./palworld/Pal/Saved/Config/LinuxServer/GameUserSettings.ini

echo "########## STARTING CONTAINER ${CONTAINER_NAME} NOW ##########"
Expand Down
Loading