Skip to content

thejcpalma/palworld-dedicated-server-docker

Repository files navigation

Palworld Dedicated Server on Docker

Release Development Docker Pulls Docker Stars Image Size Static Badge Discord

Docker Hub ghrc

Tip

Do you want to chat with the community? 🧑‍💻

Join us on Discord 🚀

This Docker image includes your own Palworld Dedicated Server.

The container as been tested and will work on the following OS:

  • Linux (Ubuntu/Debian, Arch and Fedora)
  • Windows 10,11

Important

At the moment, Xbox GamePass/Xbox Console players will not be able to join a dedicated server.

They will need to join players using the invite code and are limited to sessions of 4 players max.


Table of Contents

What You Need to Get Started

To use this Docker image, you need:

Don't worry if you're not familiar with these concepts. The links provided will guide you through the installation and setup process. If you're still having trouble, feel free to ask for help in Discord 😉

Server requirements

Resource 1-8 players 8-12+ players
CPU 4 CPU-Cores @ High GHz 6-8 CPU Cores @ High GHz
RAM 8GB RAM Base + 2GB per player 12GB RAM Base + 2GB per player
Storage 30GB (SSD) 30GB+ (SSD)

Always follow the official Palworld Dedicated Server Requirements for the most accurate information.

Need Support? Here's How!

Using this Docker image and have something to share? Here's how:

Community Guidelines:

  • Avoid reviving old issues or off-topic comments.
  • Issues inactive for a week will be closed, but feel free to open a new one.

Enjoying the project? Give this repo and the Docker-Hub repository a star ⭐!

💫 Thanks for being part of our journey! 🚀

Let's Get Started!

  1. Make a new folder named game in your game-server-directory (For example: /srv/palworld, /home/user/palworld).
    • This is where the game server files, like configs and savegames, will be stored.
    • If you use the default docker-compose.yml file, it will create a folder named palworld in the same directory as the docker-compose.yml file.
  2. Set up Port-Forwarding or NAT for the ports mentioned in the Docker-Compose file.
    • The default port for the game is 8211 and for RCON is 25575.
  3. Get the latest version of the image by typing docker pull thejcpalma/palworld-dedicated-server:latest in your terminal.
  4. Download/Copy the docker-compose.yml and default.env files.
  5. Adjust the docker-compose.yml and default.env files as you like.
    • Check out the Environment-Variables section for more details.
    • If you want auto-update and auto-restart features, but not exposing RCON port, just delete the port on the docker-compose.yml file.
  6. Start the container by typing docker-compose up -d && docker-compose logs -f in your terminal.
    • Keep an eye on the log. If you don't see any errors, you can close the logs with ctrl+c.
  7. That's it! Now you can enjoy your game! 🎮😉

Tip

For an in-depth guide, check out our detailed installation guide.

Environment variables

Check out the ENV_VARS.md file for a detailed list of environment variables. This file contains a list of all the environment variables that can be used to customize your Palworld Dedicated Server.

Docker-Compose

Download/Copy the docker-compose.yml and default.env files.

Special Features

Warning

This features require RCON to be enabled

Check out the ENV_VARS.md for a detailed list of the variables regarding these features.

[Auto] Restart and [Auto] Update

You can use the [auto] restart and [auto] update feature by setting the AUTO_RESTART_ENABLED and AUTO_RESTART_ENABLED environment variables to true.

These features will also need these settings to be set on the docker-compose.yml file:

  • stop_grace_period to be around 30 seconds or more (depends on your server's performance) to allow the server to save and shut down gracefully.
  • restart_policy to be unless-stopped to allow the server to restart after we stop the server inside the container.

Important

Manually restarting or updating the server won't show on the docker logs.

Will use default warn time if not specified (restart - AUTO_RESTART_WARN_MINUTES; update - AUTO_UPDATE_WARN_MINUTES)

You can also manually restart or update the server.

Usage: docker exec palworld-dedicated-server restart [warn_time] or docker exec palworld-dedicated-server update [warn_time]

docker exec palworld-dedicated-server restart 1
>> players online: 0
> No players are online. Restarting the server now...
> RCON: Broadcasted: Server-is-restarting-now!
> RCON: Broadcasted: 00:06:15-Saving-in-5-seconds
> RCON: Broadcasted: Saving-world...
> RCON: Complete Save
> RCON: Broadcasted: Saving-done
> RCON: Broadcasted: Creating-backup
> RCON: Broadcasted: Backup-done
>>> Backup 'saved-20240213_000615.tar.gz' created successfully.
> RCON: Broadcasted: Server-is-shutting-down-now!
> RCON: The server will shut down in 1 seconds. Please prepare to exit the game.
docker exec palworld-dedicated-server update   
> The server is up-to-date!

Restart and update features will always perform a backup before shutting down the server.

Player Monitoring

You can enable player monitoring by setting the PLAYER_MONITORING_ENABLED environment variable to true.

This feature will also need the PLAYER_MONITORING_INTERVAL environment variable to be set to the desired interval in seconds.

Events monitored:

  • Player joined
  • Player left

Player events are logged in the container logs and sent to the webhook if enabled.

Logging format is > Player [joined/left]: PLAYER_NAME | UID: PLAYER_UID | Steam ID: PLAYER_STEAM_UID.

If PLAYER_STEAM_UID is invalid (when players have spacial characters in their name, receiving 16 digits instead of 17 on the RCON ShowPlayers command), it will be logged but it will be missing the last digit. When this happens, the server will give a warning message in the logs and list all possible steam profiles associated with the player that joined/left. It does this by testing all 10 combos of the last digit from 0 to 9 (e.g. "PLAYER_STEAM_UID" + "3").

Log example:

> Player joined: PLAYER_NAME | UID: PLAYER_UID | Steam ID: XXXXXXXXXXXXXXXX
>> Invalid Steam ID - Should have 17 digits but has 16 digits!
>> Possible Steam IDs:
> Profile name is: profile1 | Profile link: https://steamcommunity.com/profiles/XXXXXXXXXXXXXXXX1
> Profile name is: ___Profile2___ | Profile link: https://steamcommunity.com/profiles/XXXXXXXXXXXXXXXX3
> Profile name is: pROFILe_$%4 | Profile link: https://steamcommunity.com/profiles/XXXXXXXXXXXXXXXX7

Note

You can use PLAYER_NAME, PLAYER_UID and PLAYER_STEAM_UID in the webhook messages. When Steam ID is invalid, the webhook message will always contain the possible Steam profiles associated with the player and change PLAYER_STEAM_UID to ###INVALID_STEAM_UID###. See more info about this integration here.

Backup Manager

Warning

If RCON is disabled, the backup manager won't do saves via RCON before creating a backup. This means that the backup will be created from the last auto-save of the server. This can lead to data-loss and/or savegame corruption.

Recommendation: Please make sure that RCON is enabled before using the backup manager.

Usage: docker exec palworld-dedicated-server backup [command] [arguments]

Command Argument Required/Optional Default Value Values Description
create N/A N/A N/A N/A Creates a backup.
list <number_to_list> Optional N/A Positive integer Lists all backups.
If <number_to_list> is specified, only the most
recent <number_to_list> backups are listed.
clean <number_to_keep> Optional BACKUP_AUTO_CLEAN_AMOUNT_TO_KEEP Positive integer Cleans up backups.
If <number_to_keep> is specified, cleans and keeps
the most recent<number_to_keep> backups.
If not, default to BACKUP_AUTO_CLEAN_AMOUNT_TO_KEEP var

Examples:

$ docker exec palworld-dedicated-server backup
> Backup 'saved-20240203_032855.tar.gz' created successfully.
$ docker exec palworld-dedicated-server backup list
> Listing 2 backup file(s)!
2024-02-03 03:28:55 | saved-20240203_032855.tar.gz
2024-02-03 03:28:00 | saved-20240203_032800.tar.gz
$ docker exec palworld-dedicated-server backup_clean 3
> 1 backup(s) cleaned, keeping 2 backups(s).
$ docker exec palworld-dedicated-server backup_list   
> Listing 1 out of backup 2 file(s).
2024-02-03 03:30:00 | saved-20240203_033000.tar.gz

Run RCON commands

Note

Please research the RCON commands on the official source: https://tech.palworldgame.com/settings-and-operation/commands

Usage: docker exec palworld-dedicated-server rconcli [command] Examples:

$ docker exec palworld-dedicated-server rconcli ShowPlayers
> RCON: name,playeruid,steamid
thejcpalma,1234,5789

Discord Webhook integration

To enable Discord webhook integrations, you need to set the following environment variables in the default.env:

WEBHOOK_ENABLED=true
WEBHOOK_URL="https://your.webhook.url"

After enabling the server should send messages in a Discord-Compatible way to your webhook url.

You can find more details about these variables here.

Supported events

  • Server starting
  • Server stopped
  • Server restart
  • Server fresh install
  • Server updating
  • Server updating and validating
  • Player joined
  • Player left

FAQ

How can I use the interactive console in Portainer with this image?

You can run this `docker exec -ti palworld-dedicated-server bash' or you could navigate to the "Stacks" tab in Portainer, select your stack, and click on the container name. Then click on the "Exec console" button.

How can I look into the config of my Palworld container?

You can run this docker exec -ti palworld-dedicated-server cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini and it will show you the config inside the container.

I'm seeing S_API errors in my logs when I start the container?

Errors like [S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded. are safe to ignore.

I'm using Apple silicon type of hardware, can I run this?

You can try to insert in your docker-compose file this parameter platform: linux/amd64 at the palworld service. This isn't a special fix for Apple silicon, but to run on other than x86 hosts. The support for arm exists only by enforcing x86 emulation, if that isn't to host already. Rosetta is doing the translation/emulation.

I changed the BaseCampWorkerMaxNum setting, why didn't this update the server?

This is a confirmed bug. Changing BaseCampWorkerMaxNum in the PalWorldSettings.ini has no effect on the server. There are tools out there to help with this, like this one: https://github.com/legoduded/palworld-worldoptions

Warning

Adding WorldOption.sav will break PalWorldSetting.ini. So any new changes to the settings (either on the file or via ENV VARS), you will have to create a new WorldOption.sav and update it every time for those changes to have an effect.

Software used

Major Shoutout

This project was inspired by the following repositories:

  1. Docker - Palworld Dedicated Server by @jammsen ❤️
  2. Palworld Dedicated Server Docker by @thijsvanloef

A big thank you to the authors for their contributions to the open source community!

A much bigger thank you to @jammsen for being an amazing, experienced person and for all the knowledge shared. Your contributions and guidance have been invaluable to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.