Skip to content

Commit

Permalink
Add steam username/pass to download previous versions
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsvanloef committed Dec 26, 2024
1 parent ac04cb6 commit 89066b9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ It is highly recommended you set the following environment values before startin
| AUTO_REBOOT_ENABLED | Enables automatic reboots | false | true/false | 0.21.0 |
| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | 0.21.0 |
| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | 0.21.0 |
| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download Depot. | | See [Manifest ID Table](#locking-specific-game-version) | 0.27.0 |
| TARGET_MANIFEST_ID | Locks game version to corespond with Manifest ID from Steam Download, use with STEAM_USERNAME/STEAM_PASSWORD Depot. | | See [Manifest ID Table](#locking-specific-game-version) | 0.27.0 |
| STEAM_USERNAME | Steam username for downloading the server with a TARGET_MANIFEST_ID. | | "string" | 1.2.2 |
| STEAM_PASSWORD | Steam password for downloading the server with a TARGET_MANIFEST_ID. | | "string" | 1.2.2 |
| INSTALL_BETA_INSIDER | Installs the latest Beta version of the Palworld dedicated server | false | true/false | 0.38.0 |
| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server. | | `https://discord.com/api/webhooks/<webhook_id>` | 0.22.0 |
| DISCORD_SUPPRESS_NOTIFICATIONS | Enables/Disables `@silent` messages for the server messages. | false | boolean | 0.34.0 |
Expand Down Expand Up @@ -686,7 +688,8 @@ send discord messages with docker compose:
>[!WARNING]
>Downgrading to a lower game version is possible, but it is unknown what impact it will have on existing saves.
>
>This requires you to set STEAM_USERNAME and STEAM_PASSWORD to a Steam account that owns the game.
>Accounts with Steam Guard enabled are currently not supported.
>**Please do so at your own risk!**
If **TARGET_MANIFEST_ID** environment variable is set, will lock server version to specific manifest.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ It is highly recommended you set the following environment values before startin
| AUTO_REBOOT_WARN_MINUTES | How long to wait to reboot the server, after the player were informed. | 5 | Integer | 0.21.0 |
| AUTO_REBOOT_EVEN_IF_PLAYERS_ONLINE | Restart the Server even if there are players online. | false | true/false | 0.21.0 |
| TARGET_MANIFEST_ID | Locks game version to corespond with Manfiest ID from Steam Download Depot. | | See [Manifest ID Table](https://palworld-server-docker.loef.dev/guides/pinning-game-version#version-to-manifest-id-table) | 0.27.0 |
| STEAM_USERNAME | Steam username for downloading the server files (only needed when using TARGET_MANIFEST_ID). | | "string" | 1.2.2 |
| STEAM_PASSWORD | Steam password for downloading the server files (only needed when using TARGET_MANIFEST_ID). | | "string" | 1.2.2 |
| INSTALL_BETA_INSIDER | Installs the latest Beta version of the Palworld dedicated server | false | true/false | 0.38.0 |
| DISCORD_WEBHOOK_URL | Discord webhook url found after creating a webhook on a discord server | | `https://discord.com/api/webhooks/<webhook_id>` | 0.22.0 |
| DISCORD_SUPPRESS_NOTIFICATIONS | Enables/Disables `@silent` messages for the server messages. | false | boolean | 0.34.0 |
Expand Down
3 changes: 2 additions & 1 deletion docusaurus/docs/guides/pinning-game-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ sidebar_position: 7

:::warning
Downgrading to a lower game version is possible, but it is unknown what impact it will have on existing saves.

This requires you to set STEAM_USERNAME and STEAM_PASSWORD to a Steam account that owns the game.
Accounts with Steam Guard enabled are currently not supported.
**Please do so at your own risk!**
:::

Expand Down
11 changes: 8 additions & 3 deletions scripts/helper_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,18 @@ InstallServer() {
targetManifest="${TARGET_MANIFEST_ID}"

LogWarn "Installing Target Version: $targetManifest"
if [ -z "${STEAM_USERNAME}" ] || [ -z "${STEAM_PASSWORD}" ]; then
LogError "STEAM_USERNAME or STEAM_PASSWORD is not set. Please set these variables to install a specific version."
DiscordMessage "Install" "STEAM_USERNAME or STEAM_PASSWORD is not set. Please set these variables to install a specific version." "failure"
return 2
fi
DiscordMessage "Install" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE}" "in-progress" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_ENABLED}" "${DISCORD_PRE_UPDATE_BOOT_MESSAGE_URL}"
if [ "${USE_DEPOT_DOWNLOADER}" == true ]; then
LogWarn "Downloading server files using DepotDownloader"
DepotDownloader -app 2394010 -depot 2394012 -manifest "$targetManifest" -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -depot 1006 -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -username "${STEAM_USERNAME}" -password "${STEAM_PASSWORD}" -depot 2394012 -manifest "$targetManifest" -osarch 64 -dir /palworld -validate
DepotDownloader -app 2394010 -username "${STEAM_USERNAME}" -password "${STEAM_PASSWORD}" -depot 1006 -osarch 64 -dir /palworld -validate
else
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login anonymous +download_depot 2394010 2394012 "$targetManifest" +quit
/home/steam/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux +@sSteamCmdForcePlatformBitness 64 +force_install_dir "/palworld" +login "${STEAM_USERNAME}" "${STEAM_PASSWORD}" +download_depot 2394010 2394012 "$targetManifest" +quit
cp -vr "/home/steam/steamcmd/linux32/steamapps/content/app_2394010/depot_2394012/." "/palworld/"
fi
CreateACFFile "$targetManifest"
Expand Down

0 comments on commit 89066b9

Please sign in to comment.