mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-06 04:32:43 +00:00
Merge branch 'main' into Server-Description
This commit is contained in:
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1,3 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: thijsvanloef
|
||||
ko_fi: thijsvanloef
|
||||
|
||||
27
README.md
27
README.md
@@ -4,9 +4,12 @@
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
[View on Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
|
||||
[Chat with the community on Discord](https://discord.gg/UxBxStPAAE)
|
||||
|
||||
> [!TIP]
|
||||
> Unsure how to get started? Check out the [this guide I wrote!](https://tice.tips/containerization/palworld-server-docker/)
|
||||
|
||||
@@ -26,7 +29,7 @@ This Docker container has been tested and will work on both Linux (Ubuntu/Debian
|
||||
|----------|---------|------------------------------------------|
|
||||
| CPU | 4 cores | 4+ cores |
|
||||
| RAM | 16GB | Recommend over 32GB for stable operation |
|
||||
| Storage | 4GB | 10GB |
|
||||
| Storage | 4GB | 12GB |
|
||||
|
||||
## How to use
|
||||
|
||||
@@ -34,7 +37,7 @@ Keep in mind that you'll need to change the [environment variables](#environment
|
||||
|
||||
### Docker Compose
|
||||
|
||||
This repository includes an example [docker-compose.yml](example/docker-compose.yml) file you can use to setup your server.
|
||||
This repository includes an example [docker-compose.yml](/docker-compose.yml) file you can use to setup your server.
|
||||
|
||||
```yml
|
||||
services:
|
||||
@@ -57,8 +60,7 @@ services:
|
||||
- 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!
|
||||
# Enable the environment variables below if you have COMMUNITY=true
|
||||
# - SERVER_NAME="World of Pals"
|
||||
- SERVER_NAME="World of Pals"
|
||||
volumes:
|
||||
- ./palworld:/palworld/
|
||||
```
|
||||
@@ -84,6 +86,7 @@ docker run -d \
|
||||
-e ADMIN_PASSWORD="adminPasswordHere" \
|
||||
-e SERVER_PASSWORD="worldofpals" \
|
||||
-e COMMUNITY=false \
|
||||
-e SERVER_NAME="World of Pals" \
|
||||
--restart unless-stopped \
|
||||
thijsvanloef/palworld-server-docker:latest
|
||||
|
||||
@@ -112,16 +115,15 @@ It is highly recommended you set the following environment values before startin
|
||||
| Variable | Info | Default Values | Allowed Values |
|
||||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|------------------------------------------------------------------------------------------------------------|
|
||||
| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) |
|
||||
| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-31 |
|
||||
| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 |
|
||||
| PORT* | UDP port that the server will expose | 8211 | 1024-65535 |
|
||||
| PUID* | The uid of the user the server should run as | 1000 | !0 |
|
||||
| PGID* | The gid of the group the server should run as | 1000 | !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. | false | true/false |
|
||||
| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false |
|
||||
| PUBLIC_IP | You 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_PORT | You 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_NAME | A name for your community server | | "string" |
|
||||
| SERVER_DESCRIPTION | A description for your server | | "string" |
|
||||
| PUBLIC_IP | You 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_PORT | You 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_NAME | A name for your server | | "string" |
|
||||
| SERVER_PASSWORD | Secure your community server with a password | | "string" |
|
||||
| ADMIN_PASSWORD | Secure 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) | true | true/false |
|
||||
@@ -135,6 +137,11 @@ It is highly recommended you set the following environment values before startin
|
||||
|
||||
*** 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
|
||||
|
||||
| Port | Info |
|
||||
@@ -181,6 +188,8 @@ 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.
|
||||
|
||||
## Editing Server Settings
|
||||
|
||||
When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`
|
||||
|
||||
@@ -24,7 +24,7 @@ server:
|
||||
# -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs.
|
||||
preventDelete: false
|
||||
# -- The size of the pvc storage.
|
||||
size: 10Gi
|
||||
size: 12Gi
|
||||
# -- The storage class name.
|
||||
storageClassName: ""
|
||||
# -- (dict) Define the parameters for the server image container
|
||||
@@ -133,5 +133,3 @@ server:
|
||||
password: ""
|
||||
# -- (string) If not provided, a random server name will be generated with the "palworld_" prefix.
|
||||
server_name: ""
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
container_name: palworld-server
|
||||
ports:
|
||||
- 8211:8211/udp
|
||||
- 27015:27015/udp
|
||||
- 27015:27015/udp # Required if you want your server to show up in the community servers tab
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
@@ -18,8 +18,7 @@ services:
|
||||
- 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!
|
||||
# Enable the environment variables below if you have COMMUNITY=true
|
||||
# - SERVER_NAME="World of Pals"
|
||||
- SERVER_DESCRIPTION="Hello World"
|
||||
- SERVER_NAME="World of Pals"
|
||||
- SERVER_DESCRIPTION=""
|
||||
volumes:
|
||||
- ./palworld:/palworld/
|
||||
|
||||
@@ -7,13 +7,15 @@ data:
|
||||
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
|
||||
COMMUNITY: "false" # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
|
||||
# Enable the environment variables below if you have COMMUNITY=true
|
||||
# SERVER_PASSWORD: "yourServerPassword"
|
||||
SERVER_NAME: "Server_Name" # Note, it seems spaces are not supported, so use underlines.
|
||||
SERVER_NAME: "World of Pals"
|
||||
SERVER_DESCRIPTION: ""
|
||||
---
|
||||
apiVersion: v1
|
||||
|
||||
@@ -9,4 +9,4 @@ spec:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storage: 12Gi
|
||||
|
||||
47
migration/README.md
Normal file
47
migration/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Migrate From Existing Server
|
||||
|
||||
## Using the script
|
||||
|
||||
> [!WARNING]
|
||||
> Use this script at your own risk, I am not responsible for dataloss!
|
||||
>
|
||||
> Please make sure you always have a backup!
|
||||
|
||||
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
|
||||
(e.g. `palworld/`) are in the same directory. Like this:
|
||||
|
||||
```shell
|
||||
ubuntu@VM-4-5-ubuntu:~/test-pal-migrate$ ll
|
||||
total 24
|
||||
drwxrwxr-x 4 ubuntu ubuntu 4096 Jan 26 03:31 ./
|
||||
drwxr-x--- 12 ubuntu ubuntu 4096 Jan 26 03:31 ../
|
||||
drwxr-xr-x 2 ubuntu ubuntu 4096 Jan 26 03:30 74406BE1D7B54114AA5984CCF1236865/
|
||||
-rw-r--r-- 1 ubuntu ubuntu 840 Jan 25 05:51 docker-compose.yml
|
||||
-rw-rw-r-- 1 ubuntu ubuntu 848 Jan 26 03:31 migrate.sh
|
||||
drwxrwxr-x 7 ubuntu ubuntu 4096 Jan 26 03:31 palworld/
|
||||
```
|
||||
|
||||
3. Run `migrate.sh` like this
|
||||
|
||||
```shell
|
||||
./migrate.sh {CONTAINER_NAME} {SERVER_NAME}
|
||||
```
|
||||
|
||||
For example,
|
||||
|
||||
```shell
|
||||
./migrate.sh test-pal-migrate 74406BE1D7B54114AA5984CCF1236865
|
||||
```
|
||||
|
||||
## Manually
|
||||
|
||||
1. Copy the save from your old dedicated server to your new dedicated server.
|
||||
2. In the `PalServer\Pal\Saved\Config\LinuxServer\GameUserSettings.ini` file of the **new** server,
|
||||
change the `DedicatedServerName` to match your save's folder name. For example,
|
||||
if your save's folder name is `2E85FD38BAA792EB1D4C09386F3A3CDA`, the DedicatedServerName changes to
|
||||
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
|
||||
29
migration/migrate.sh
Normal file
29
migration/migrate.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CONTAINER_NAME=$1
|
||||
MIGRATION_SERVER_NAME=$2
|
||||
|
||||
if [ ! -d ./"${MIGRATION_SERVER_NAME}" ]; then
|
||||
echo "can not find ${MIGRATION_SERVER_NAME} dir at current dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d ./palworld ]; then
|
||||
echo "can not find palworld dir at current dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTAINER_ID=$(docker ps --filter name="${CONTAINER_NAME}" --format '{{.ID}}')
|
||||
|
||||
echo "########## STOPPING CONTAINER ${CONTAINER_NAME} NOW ##########"
|
||||
docker stop "${CONTAINER_ID}"
|
||||
|
||||
cp -r ./"${MIGRATION_SERVER_NAME}" ./palworld/Pal/Saved/SaveGames/0/"${MIGRATION_SERVER_NAME}"/
|
||||
|
||||
sed -i "s/DedicatedServerName=.*/DedicatedServerName=${MIGRATION_SERVER_NAME}/" ./palworld/Pal/Saved/Config/LinuxServer/GameUserSettings.ini
|
||||
|
||||
echo "########## STARTING CONTAINER ${CONTAINER_NAME} NOW ##########"
|
||||
docker start "${CONTAINER_ID}"
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${RCON_ENABLED}" = true ]; then
|
||||
rcon-cli save
|
||||
fi
|
||||
|
||||
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz"
|
||||
cd /palworld/Pal/ || exit
|
||||
|
||||
Reference in New Issue
Block a user