AI prompts
base on Docker container to easily provision and manage Palworld Dedicated Server # Docker - Palworld Dedicated Server
[![Build-Status master](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-prod.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-prod.yml)
[![Build-Status develop](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-develop.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push-develop.yml)
![Docker Pulls](https://img.shields.io/docker/pulls/jammsen/palworld-dedicated-server)
![Docker Stars](https://img.shields.io/docker/stars/jammsen/palworld-dedicated-server)
![Image Size](https://img.shields.io/docker/image-size/jammsen/palworld-dedicated-server/latest)
[![Discord](https://img.shields.io/discord/532141442731212810?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2F7tacb9Q6tj)](https://discord.gg/7tacb9Q6tj)
> [!TIP]
> Do you want to chat with the community?
>
> **[Join us on Discord](https://discord.gg/7tacb9Q6tj)**
This Docker image includes a Palworld Dedicated Server based on Linux and Docker.
___
## Table of Contents
- [Docker - Palworld Dedicated Server](#docker---palworld-dedicated-server)
- [Table of Contents](#table-of-contents)
- [How to ask for support for this Docker image](#how-to-ask-for-support-for-this-docker-image)
- [Requirements](#requirements)
- [Minimum system requirements](#minimum-system-requirements)
- [Changelog](#changelog)
- [Credits / Shoutout / Contributions](#credits--shoutout--contributions)
- [Getting started](#getting-started)
- [Environment variables](#environment-variables)
- [Docker-Compose examples](#docker-compose-examples)
- [Gameserver with RCON-CLI-Tool](#gameserver-with-rcon-cli-tool)
- [Run RCON commands](#run-rcon-commands)
- [Backup Manager](#backup-manager)
- [Webhook integration](#webhook-integration)
- [Supported events](#supported-events)
- [Deploy with Helm](#deploy-with-helm)
- [FAQ](#faq)
- [Does this image support Xbox Dedicated Servers?](#does-this-image-support-xbox-dedicated-servers)
- [How can I use the interactive console in Portainer with this image?](#how-can-i-use-the-interactive-console-in-portainer-with-this-image)
- [How can I look into the config of my Palworld container?](#how-can-i-look-into-the-config-of-my-palworld-container)
- [I'm seeing S\_API errors in my logs when I start the container?](#im-seeing-s_api-errors-in-my-logs-when-i-start-the-container)
- [I'm using Apple silicon type of hardware, can I run this?](#im-using-apple-silicon-type-of-hardware-can-i-run-this)
- [I changed the `BaseCampWorkerMaxNum` setting, why didn't this update the server?](#i-changed-the-basecampworkermaxnum-setting-why-didnt-this-update-the-server)
- [Planned features in the future](#planned-features-in-the-future)
- [Software used](#software-used)
## How to ask for support for this Docker image
If you need support for this Docker image:
- Feel free to create a new issue.
- You can reference other issues if you're experiencing a similar problem via #issue-number.
- Follow the instructions and answer the questions of people who are willing to help you.
- Once your issue is resolved, please close it and please consider giving this repo and the [Docker-Hub repository](https://hub.docker.com/repository/docker/jammsen/palworld-dedicated-server) a star.
- Please note that any issue that has been inactive for a week will be closed due to inactivity.
Please avoid:
- Reusing or necroing issues. This can lead to spam and may harass participants who didn't agree to be part of your new problem.
- If this happens, we reserve the right to lock the issue or delete the comments, you have been warned!
## Requirements
To run this Docker image, you need a basic understanding of Docker, Docker-Compose, Linux, and Networking (Port-Forwarding/NAT).
## Minimum system 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 | 30GB+ |
## Changelog
You can find the [changelog here](CHANGELOG.md)
## Credits / Shoutout / Contributions
This 2 persons helped a lot along to way and made me and this project better! So if you do not like my version of the Docker image or looking for other features, feel free to check out the following 2 images:
- [@thejcpalma](https://github.com/thejcpalma) - [https://github.com/thejcpalma/palworld-dedicated-server-docker](https://github.com/thejcpalma/palworld-dedicated-server-docker) - [https://hub.docker.com/r/thejcpalma/palworld-dedicated-server](https://hub.docker.com/r/thejcpalma/palworld-dedicated-server) - ❤️🫡
- [@thijsvanloef](https://github.com/thijsvanloef) - [https://github.com/thijsvanloef/palworld-server-docker](https://github.com/thijsvanloef/palworld-server-docker) - [https://hub.docker.com/r/thijsvanloef/palworld-server-docker](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) - ❤️🫡
## Getting started
1. Create a `game` sub-directory on your Docker-Node in your game-server-directory
- (Examples: `/srv/palworld`, `/opt/palworld` or `/home/username/palworld`)
- This directory will be used to store the game server files, including configs and savegames
- In older versions we asked you to setup permissions via CHMOD or CHOWN, this should not be needed anymore!
2. Set up Port-Forwarding or NAT for the ports in the Docker-Compose file
3. Pull the latest version of the image with `docker pull jammsen/palworld-dedicated-server:latest`
4. Download the [docker-compose.yml](docker-compose.yml) and [default.env](default.env)
5. Set up the `docker-compose.yml` and `default.env` to your liking
- Make sure you setup PUID and PGID according to the user you want to use
- **PUID and PGID 0 will error out, thats on purpose!**
- if you use Docker as root, then you can just use 1000 inside the container
- Refer to the [Environment-Variables](#environment-variables) section for more information
6. Start the container via `docker-compose up -d && docker-compose logs -f`
- Watch the log, if no errors occur you can close the logs with ctrl+c
7. Now have fun and happy gaming! 🎮😉
## Environment variables
See [this file](/docs/ENV_VARS.md) for the documentation
## Docker-Compose examples
### Gameserver with RCON-CLI-Tool
See [example docker-compose.yml](docker-compose.yml).
## Run RCON commands
> [!NOTE]
> Please research the RCON-Commands on the official source: https://tech.palworldgame.com/settings-and-operation/commands
You can use `docker exec palworld-dedicated-server rconcli <command>` right on your terminal/shell.
```shell
$ docker exec palworld-dedicated-server rconcli showplayers
name,playeruid,steamid
$ docker exec palworld-dedicated-server rconcli info
Welcome to Pal Server[v0.1.4.1] jammsen-docker-generated-20384
$ docker exec palworld-dedicated-server rconcli save
Complete Save
```
## Backup Manager
> [!WARNING]
> If RCON is disabled, the backup manager won't do saves via RCON before creating a backup and will report warnings.
> 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.
> [!WARNING]
> Please use in the following part always the `-user steam` option or your files will written as root
Usage: `docker exec -user steam 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 numbers | Lists all backups.<br>If `<number_to_list>` is specified, only the most<br>recent `<number_to_list>` backups are listed. |
| clean | `<number_to_keep>` | Optional | `BACKUP_RETENTION_AMOUNT_TO_KEEP` | Positive numbers | Cleans up backups.<br>If `<number_to_list>` is specified, cleans and keeps<br>the most recent`<number_to_keep>` backups.<br>If not, default to `BACKUP_RETENTION_AMOUNT_TO_KEEP` var |
Examples:
```shell
$ docker exec -user steam palworld-dedicated-server backup
> Backup 'saved-20240203_032855.tar.gz' created successfully.
```
```shell
$ docker exec -user steam 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
```
```shell
$ docker exec -user steam palworld-dedicated-server backup_clean 3
> 1 backup(s) cleaned, keeping 2 backups(s).
```
```shell
$ docker exec -user steam palworld-dedicated-server backup_list
> Listing 1 out of backup 2 file(s).
2024-02-03 03:30:00 | saved-20240203_033000.tar.gz
```
## Webhook integration
To enable webhook integrations, you need to set the following environment variables in the `default.env`:
```shell
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](/docs/ENV_VARS.md#webhook-settings).
### Supported events
- Server starting
- This even is not server started. Just add like 5 seconds on top and the server is online
- Server stopped
- Server updating
- Server updating and validating
## Deploy with Helm
A Helm chart to deploy this container can be found at [palworld-helm](https://github.com/caleb-devops/palworld-helm).
## FAQ
### Does this image support Xbox Dedicated Servers?
> Yes just change the value from `ALLOW_CONNECT_PLATFORM` from Steam to Xbox. See here for more documentation: https://tech.palworldgame.com/getting-started/for-xbox-dedicated-server
### 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.
## Planned features in the future
- Feel free to suggest something. Under `Issues` there is a Feature Request issue-type.
## Software used
- CM2Network SteamCMD - Debian-based (Officially recommended by Valve - https://developer.valvesoftware.com/wiki/SteamCMD#Docker)
- Supercronic - https://github.com/aptible/supercronic
- rcon-cli - https://github.com/gorcon/rcon-cli
- Palworld Dedicated Server (APP-ID: 2394010 - https://steamdb.info/app/2394010/config/)
", Assign "at most 3 tags" to the expected json: {"id":"7140","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"