Sign inSign up

thijsvanloef/palworld-server-docker

By thijsvanloef

•Updated 11 days ago

A Docker Container to easily run a Palworld dedicated server.

Image
72

1M+

thijsvanloef/palworld-server-docker repository overview

⁠Palworld Dedicated Server Docker

Release Docker Pulls Docker Stars Image Size Discord

CodeFactor Release Linting Security

Docker Hub GHCR Artifact Hub

Chat with the community on Discord⁠

[!TIP]

This is a Docker container to help you get started with hosting your own Palworld⁠ dedicated server.

This Docker container has been tested and will work on both Linux (Ubuntu/Debian) and Windows 10.

[!IMPORTANT]

Looking to host a server for Xbox players? Follow this guide here!⁠

⁠Sponsors

CompanyAbout
Indifferent Broccoli

indifferent broccoli (:|)

Thank you to our sponsor indifferent broccoli. If you decide to rent a Palworld server, rather than host yourself, try indifferent broccoli's Palword server hosting⁠ 2-day free trial
⁠Massive shoutout to the following individual sponsors

AshishT112203  stoprx  

⁠Official Documentation

Documentation

⁠Server Requirements

ResourceMinimumRecommended
CPU4 cores4+ cores
RAM16GBRecommend over 32GB for stable operation
Storage4GB12GB

⁠How to use

Keep in mind that you'll need to change the environment variables⁠.

⁠Docker Compose

This repository includes an example docker-compose.yml⁠ file you can use to set up your server.

services:
   palworld:
      image: thijsvanloef/palworld-server-docker:latest
      restart: unless-stopped
      container_name: palworld-server
      stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
      ports:
        - 8211:8211/udp
        - 27015:27015/udp
      environment:
         PUID: 1000
         PGID: 1000
         PORT: 8211 # Optional but recommended
         PLAYERS: 16 # Optional but recommended
         SERVER_PASSWORD: "worldofpals" # Optional but recommended
         MULTITHREADING: true
         RCON_ENABLED: true
         RCON_PORT: 25575
         TZ: "UTC"
         ADMIN_PASSWORD: "adminPasswordHere"
         COMMUNITY: false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
         SERVER_NAME: "palworld-server-docker by Thijs van Loef"
         SERVER_DESCRIPTION: "palworld-server-docker by Thijs van Loef"
      volumes:
         - ./palworld:/palworld/

As an alternative, you can copy the .env.example⁠ file to a new file called .env file. Modify it to your needs, check out the environment variables⁠ section to check the correct values. Modify your docker-compose.yml⁠ to this:

services:
   palworld:
      image: thijsvanloef/palworld-server-docker:latest
      restart: unless-stopped
      container_name: palworld-server
      stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
      ports:
        - 8211:8211/udp
        - 27015:27015/udp
      env_file:
         -  .env
      volumes:
         - ./palworld:/palworld/
⁠Docker Run

Change every <> to your own configuration

docker run -d \
    --name palworld-server \
    -p 8211:8211/udp \
    -p 27015:27015/udp \
    -v ./palworld:/palworld/ \
    -e PUID=1000 \
    -e PGID=1000 \
    -e PORT=8211 \
    -e PLAYERS=16 \
    -e MULTITHREADING=true \
    -e RCON_ENABLED=true \
    -e RCON_PORT=25575 \
    -e TZ=UTC \
    -e ADMIN_PASSWORD="adminPasswordHere" \
    -e SERVER_PASSWORD="worldofpals" \
    -e COMMUNITY=false \
    -e SERVER_NAME="palworld-server-docker by Thijs van Loef" \
    -e SERVER_DESCRIPTION="palworld-server-docker by Thijs van Loef" \
    --restart unless-stopped \
    --stop-timeout 30 \
    thijsvanloef/palworld-server-docker:latest

As an alternative, you can copy the .env.example⁠ file to a new file called .env file. Modify it to your needs, check out the environment variables⁠ section to check the correct values. Change your docker run command to this:

docker run -d \
    --name palworld-server \
    -p 8211:8211/udp \
    -p 27015:27015/udp \
    -v ./palworld:/palworld/ \
    --env-file .env \
    --restart unless-stopped \
    --stop-timeout 30 \
    thijsvanloef/palworld-server-docker:latest
⁠Kubernetes

All files you will need to deploy this container to kubernetes are located in the k8s folder⁠.

Follow the steps in the README.md here⁠ to deploy it.

⁠Running without root

This is only for advanced users

It is possible to run this container and override the default user⁠ which is root in this image.

Because you are specifiying the user and group PUID and PGID are ignored.

If you want to find your UID: id -u If you want to find your GID: id -g

You must set user to NUMBERICAL_UID:NUMBERICAL_GID

Below we assume your UID is 1000 and your GID is 1001

  • In docker run add --user 1000:1001 \ above the last line.
  • In docker compose add user: 1000:1001 above ports.

If you wish to run it with a different UID/GID than your own you will need to change the ownership of the directory that is being bind: chown UID:GID palworld/ or by changing the permissions for all other: chmod o=rwx palworld/

⁠Using helm chart

The official helm chart can be found in a seperate repository, palworld-server-chart⁠

⁠Environment variables

You can use the following values to change the settings of the server on boot. It is highly recommended you set the following environment values before starting the server:

  • PLAYERS
  • PORT
  • PUID
  • PGID
VariableInfoDefault ValuesAllowed Values
TZTimezone used for time stamping backup serverUTCSee TZ Identifiers⁠
PLAYERS*Max amount of players that are able to join the server161-32
PORT*UDP port that the server will expose82111024-65535
PUID*The uid of the user the server should run as1000!0
PGID*The gid of the group the server should run as1000!0
MULTITHREADING**Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense.falsetrue/false
COMMUNITYWhether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD)falsetrue/false
PUBLIC_IPYou can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration.x.x.x.x
PUBLIC_PORTYou can manually specify the port number of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration.1024-65535
SERVER_NAMEA name for your server"string"
SERVER_PASSWORDSecure your community server with a password"string"
ADMIN_PASSWORDSecure administration access in the server with a password"string"
UPDATE_ON_BOOT**Update/Install the server when the docker container starts (THIS HAS TO BE ENABLED THE FIRST TIME YOU RUN THE CONTAINER)truetrue/false
RCON_ENABLED***Enable RCON for the Palworld servertruetrue/false
RCON_PORTRCON port to connect to255751024-65535
QUERY_PORTQuery port used to communicate with Steam servers270151024-65535

*highly recommended to set

** Make sure you know what you are doing when running this option enabled

*** Required for docker stop to save and gracefully close the server

Important

Boolean values used in environment variables are case sensitive because they are used in the shell script.

They must be set using exactly true or false for the option to take effect.

⁠Game Ports
PortInfo
8211Game Port (UDP)
27015Query Port (UDP)
25575RCON Port (TCP)

⁠Using RCON

RCON is enabled by default for the palworld-server-docker image. Opening the RCON CLI is quite easy:

docker exec -it palworld-server rcon-cli

This will open a CLI that uses RCON to write commands to the Palworld Server.

⁠List of server commands
CommandInfo
Shutdown {Seconds} {MessageText}The server is shut down after the number of Seconds
DoExitForce stop the server.
BroadcastSend message to all player in the server
KickPlayer {SteamID}Kick player from the server..
BanPlayer {SteamID}BAN player from the server.
TeleportToPlayer {SteamID}Teleport to current location of target player.
TeleportToMe {SteamID}Target player teleport to your current location
ShowPlayersShow information on all connected players.
InfoShow server information.
SaveSave the world data.

For a full list of commands go to: https://tech.palworldgame.com/server-commands⁠

⁠Creating a backup

To create a backup of the game's save at the current point in time, use the command:

docker exec palworld-server backup

This will create a backup at /palworld/backups/

The server will run a save before the backup if rcon is enabled.

⁠Restore from a backup

To restore from a backup, use the command:

docker exec -it palworld-server restore

The RCON_ENABLED environment variable must be set to true to use this command.

Important

If docker restart is not set to policy `always` or `unless-stopped` then the server will shutdown and will need to be manually restarted.

The example docker run command and docker compose file in How to Use⁠ already uses the needed policy

⁠Manually restore from a backup

Locate the backup you want to restore in /palworld/backups/ and decompress it. Need to stop the server before task.

docker compose down

Delete the old saved data folder located at palworld/Pal/Saved/SaveGames/0/<old_hash_value>.

Copy the contents of the newly decompressed saved data folder Saved/SaveGames/0/<new_hash_value> to palworld/Pal/Saved/SaveGames/0/<new_hash_value>.

Replace the DedicatedServerName inside palworld/Pal/Saved/Config/LinuxServer/GameUserSettings.ini with the new folder name.

DedicatedServerName=<new_hash_value>  # Replace it with your folder name.

Restart the game. (If you are using Docker Compose)

docker compose up -d

⁠Configuring Automatic Backups with Cron

The server is automatically backed up everynight at midnight according to the timezone set with TZ

Set BACKUP_ENABLED enable or disable automatic backups (Default is enabled)

BACKUP_CRON_EXPRESSION is a cron expression, in a Cron-Expression you define an interval for when to run jobs.

Tip

This image uses Supercronic for crons see [supercronic](https://github.com/aptible/supercronic#crontab-format) or [Crontab Generator](https://crontab-generator.org).

Set BACKUP_CRON_EXPRESSION to change the default schedule. Example Usage: If BACKUP_CRON_EXPRESSION to 0 2 * * *, the backup script will run every day at 2:00 AM.

⁠Configuring Automatic Updates with Cron

To be able to use automatic Updates with this Server the following environment variables have to be set to true:

  • RCON_ENABLED
  • UPDATE_ON_BOOT

Important

If docker restart is not set to policy always or unless-stopped then the server will shutdown and will need to be manually restarted.

The example docker run command and docker compose file in How to Use⁠ already use the needed policy

Set AUTO_UPDATE_ENABLED enable or disable automatic updates (Default is disabled)

AUTO_UPDATE_CRON_EXPRESSION is a cron expression, in a Cron-Expression you define an interval for when to run jobs.

Tip

This image uses Supercronic for crons see [supercronic](https://github.com/aptible/supercronic#crontab-format) or [Crontab Generator](https://crontab-generator.org).

Set AUTO_UPDATE_CRON_EXPRESSION to change the default schedule.

⁠Configuring Automatic Reboots with Cron

To be able to use automatic reboots with this server RCON_ENABLED enabled.

Important

If docker restart is not set to policy always or unless-stopped then the server will shutdown and will need to be manually restarted.

The example docker run command and docker compose file in How to Use⁠ already use the needed policy

Set AUTO_REBOOT_ENABLED enable or disable automatic reboots (Default is disabled)

AUTO_REBOOT_CRON_EXPRESSION is a cron expression, in a Cron-Expression you define an interval for when to run jobs.

Tip

This image uses Supercronic for crons see [supercronic](https://github.com/aptible/supercronic#crontab-format) or [Crontab Generator](https://crontab-generator.org).

Set AUTO_REBOOT_CRON_EXPRESSION to change the set the schedule, default is everynight at midnight according to the timezone set with TZ

⁠Editing Server Settings

⁠With Environment Variables

Important

These Environment Variables/Settings are subject to change since the game is still in beta. Check out the official webpage for the supported parameters.⁠

Converting server settings to environment variables follow the same principles (with some exceptions):

  • all capital letters
  • split words by inserting an underscore
  • remove the single letter if the setting starts with one (like 'b')

For example:

  • Difficulty -> DIFFICULTY
  • PalSpawnNumRate -> PAL_SPAWN_NUM_RATE
  • bIsPvP -> IS_PVP

All variables: https://palworld-server-docker.loef.dev/getting-started/configuration/game-settings⁠

⁠Manually

When the server starts, a PalWorldSettings.ini file will be created in the following location: <mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini

Please keep in mind that the ENV variables will always overwrite the changes made to PalWorldSettings.ini.

Important

Changes can only be made to `PalWorldSettings.ini` while the server is off.

Any changes made while the server is live will be overwritten when the server stops.

For a more detailed list of server settings go to: Palworld Wiki⁠

For more detailed server settings explanations go to: shockbyte⁠

⁠Using discord webhooks

  1. Generate a webhook url for your discord server in your discord's server settings.

  2. Set the environment variable with the unique token at the end of the discord webhook url example: https://discord.com/api/webhooks/1234567890/abcde

send discord messages with docker run:

-e DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/1234567890/abcde" \
-e DISCORD_PRE_UPDATE_BOOT_MESSAGE="Server is updating..." \

send discord messages with docker compose:

- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/1234567890/abcde
- DISCORD_PRE_UPDATE_BOOT_MESSAGE=Server is updating...

⁠Locking Specific Game Version

[!WARNING] Downgrading to a lower game version is possible, but it is unknown what impact it will have on existing saves.

Please do so at your own risk!

If TARGET_MANIFEST_ID environment variable is set, will lock server version to specific manifest. The manifest corresponds to the release date/update versions. Manifests can be found using SteamCMD or websites like SteamDB⁠.

⁠Version To Manifest ID Table
VersionManifest ID
1.3.01354752814336157338
1.4.04190579964382773830
1.4.16370735655629434989

⁠Reporting Issues/Feature Requests

Issues/Feature requests can be submitted by using this link⁠.

⁠Known Issues

Known issues are listed in the documentation⁠

Tag summary

Content type

Image

Digest

sha256:be3ad49e3…

Size

364.5 MB

Last updated

about 1 month ago

docker pull thijsvanloef/palworld-server-docker