From 74f167978b572a29541ab767ec7f2f5418e32909 Mon Sep 17 00:00:00 2001 From: Syasusu Date: Thu, 25 Jan 2024 20:38:13 +0100 Subject: [PATCH 01/33] add migrate.sh to support migrate from an existing server --- README.md | 23 +++++++++++++++++++++++ migration/migrate.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 migration/migrate.sh diff --git a/README.md b/README.md index b23efda..982d7ab 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,29 @@ For a more detailed list of explanations of server settings go to: [shockbyte](h > If the `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` is empty, > delete the file and restart the server, a new file with content will be created. +## Migrate From Existing Server + +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 + ``` + ## Reporting Issues/Feature Requests Issues/Feature requests can be submitted by using [this link](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose). diff --git a/migration/migrate.sh b/migration/migrate.sh new file mode 100644 index 0000000..599e4af --- /dev/null +++ b/migration/migrate.sh @@ -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}" + + From 36e2feb34041a53df0996ef48657dd633a7f6d42 Mon Sep 17 00:00:00 2001 From: Syasusu Date: Thu, 25 Jan 2024 21:20:17 +0100 Subject: [PATCH 02/33] fix markdown lint check failed --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 982d7ab..91d2454 100644 --- a/README.md +++ b/README.md @@ -191,10 +191,13 @@ For a more detailed list of explanations of server settings go to: [shockbyte](h 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 ``` From 4b4165c0a2e740c11fc31932a149ef5e6faa5899 Mon Sep 17 00:00:00 2001 From: Syasusu Date: Thu, 25 Jan 2024 21:38:09 +0100 Subject: [PATCH 03/33] separate migration readme --- README.md | 26 -------------------------- migration/README.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 migration/README.md diff --git a/README.md b/README.md index 91d2454..b23efda 100644 --- a/README.md +++ b/README.md @@ -176,32 +176,6 @@ For a more detailed list of explanations of server settings go to: [shockbyte](h > If the `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` is empty, > delete the file and restart the server, a new file with content will be created. -## Migrate From Existing Server - -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 - ``` - ## Reporting Issues/Feature Requests Issues/Feature requests can be submitted by using [this link](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose). diff --git a/migration/README.md b/migration/README.md new file mode 100644 index 0000000..7567fc3 --- /dev/null +++ b/migration/README.md @@ -0,0 +1,25 @@ +# Migrate From Existing Server + +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 + ``` \ No newline at end of file From 214bb0b4043a607696fa7e528c1c7080946a9153 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 19:50:14 -0500 Subject: [PATCH 04/33] Added save before backup --- scripts/backup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/backup.sh b/scripts/backup.sh index 9cca792..82e75eb 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -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 From 59e62c558e63d0f5cd680551b59ad23e1c9ea5fb Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 19:54:07 -0500 Subject: [PATCH 05/33] Updated documentation --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2af76b1..93213f6 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,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: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` From ae70ba742e1f961b1f7163ac23aad5514e8e8b30 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 20:19:51 -0500 Subject: [PATCH 06/33] Fixed max player number, changed readme, added comment. --- README.md | 8 ++++---- docker-compose.yml | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2af76b1..a7abb6a 100644 --- a/README.md +++ b/README.md @@ -112,15 +112,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" | +| 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 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 | diff --git a/docker-compose.yml b/docker-compose.yml index 21aff67..a3b8e2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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,7 +18,6 @@ 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/ From 073932c0189d5a8ad99eca5261b74a089ed69253 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 20:22:42 -0500 Subject: [PATCH 07/33] Removed repeating word of server --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7abb6a..a41e2e8 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ It is highly recommended you set the following environment values before startin | 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 server server | | "string" | +| 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 | From e9e6c29b894a416e10b7b7de5651f995bfe2146e Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 20:27:05 -0500 Subject: [PATCH 08/33] Added quotes in docker compose for timezone --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a3b8e2d..03fc8d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 - - TZ=UTC + - 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="World of Pals" From 60071d8d7214dcb6f2eaf5c2eca2ba867b7c7d2d Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 20:27:19 -0500 Subject: [PATCH 09/33] Updated k8s --- k8s/configmap.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 266b340..4394167 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -7,13 +7,13 @@ 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" --- apiVersion: v1 kind: ConfigMap From a64b771ad8647a48daf689c9a5f38c79d79efec5 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 20:30:59 -0500 Subject: [PATCH 10/33] Updated docker compose and docker run in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a41e2e8..ded0307 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,10 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 - - TZ=UTC + - 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/ ``` @@ -80,10 +79,11 @@ docker run -d \ -e MULTITHREADING=true \ -e RCON_ENABLED=true \ -e RCON_PORT=25575 \ - -e TZ=UTC \ + -e TZ="UTC" \ -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 From 7a0d65804eb8a49aeab4dc63cdc4000b6f646cf9 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 00:21:09 -0500 Subject: [PATCH 11/33] Removed quote around TZ as it broke the timezone --- docker-compose.yml | 2 +- k8s/configmap.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 03fc8d9..a3b8e2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 - - TZ="UTC" + - 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="World of Pals" diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 4394167..be8d7aa 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -11,7 +11,7 @@ data: MULTITHREADING: "true" RCON_ENABLED: "true" RCON_PORT: "25575" - TZ: "UTC" + TZ: UTC COMMUNITY: "false" # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD! SERVER_NAME: "World of Pals" --- From 7a062e4c0694728dceb767dde992de1cd716a7b0 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 00:21:35 -0500 Subject: [PATCH 12/33] Removed quote on TZ in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ded0307..ff78db3 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ services: - MULTITHREADING=true - RCON_ENABLED=true - RCON_PORT=25575 - - TZ="UTC" + - 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="World of Pals" @@ -79,7 +79,7 @@ docker run -d \ -e MULTITHREADING=true \ -e RCON_ENABLED=true \ -e RCON_PORT=25575 \ - -e TZ="UTC" \ + -e TZ=UTC \ -e ADMIN_PASSWORD="adminPasswordHere" \ -e SERVER_PASSWORD="worldofpals" \ -e COMMUNITY=false \ From 052a20f17b2115c59290ac28e44556e0e330f7bb Mon Sep 17 00:00:00 2001 From: William Li Date: Thu, 25 Jan 2024 18:54:34 -0800 Subject: [PATCH 13/33] Increase recommended disk size to 12GB. The steamcmd update requires an extra 2GB of free disk space. The container seems to be using around 8.7GB, which results in a steam update failure of `Error! App '2394010' state is 0x226 after update job.` since there isn't enough space to grab the new version in a 10GB disk. Bumping this to 12GB should result in ~3.4GB of free space, so there is a small buffer for future update size increases. --- README.md | 2 +- chart/values.yaml | 4 +--- k8s/pvc.yaml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2af76b1..9c2ea26 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,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 diff --git a/chart/values.yaml b/chart/values.yaml index 5d78652..3c53bf2 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -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: "" - - diff --git a/k8s/pvc.yaml b/k8s/pvc.yaml index db0ce45..28e7d75 100644 --- a/k8s/pvc.yaml +++ b/k8s/pvc.yaml @@ -9,4 +9,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 10Gi \ No newline at end of file + storage: 12Gi From fcc2bbf99cf5c1dfc1b35ee3e332aa2a807d595e Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:44:13 +0100 Subject: [PATCH 14/33] Update README.md --- migration/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/migration/README.md b/migration/README.md index 7567fc3..07d87dd 100644 --- a/migration/README.md +++ b/migration/README.md @@ -1,7 +1,9 @@ # Migrate From Existing Server -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: +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/` +3. 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 @@ -12,7 +14,8 @@ -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 + +5. Run `migrate.sh` like this ```shell ./migrate.sh {CONTAINER_NAME} {SERVER_NAME} @@ -22,4 +25,4 @@ ```shell ./migrate.sh test-pal-migrate 74406BE1D7B54114AA5984CCF1236865 - ``` \ No newline at end of file + ``` From a31927b501f7e86134e84d11ac86368c2542ea83 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 09:55:37 +0100 Subject: [PATCH 15/33] update readme and add disclaimer --- migration/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/migration/README.md b/migration/README.md index 07d87dd..cf73b07 100644 --- a/migration/README.md +++ b/migration/README.md @@ -1,9 +1,15 @@ # Migrate From Existing Server +> [!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/` -3. Make sure `migration/migrate.sh`, saved game data directory and mounted volume (e.g. `palworld/`) are in the same directory. Like this: - +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 @@ -15,7 +21,7 @@ drwxrwxr-x 7 ubuntu ubuntu 4096 Jan 26 03:31 palworld/ ``` -5. Run `migrate.sh` like this +3. Run `migrate.sh` like this ```shell ./migrate.sh {CONTAINER_NAME} {SERVER_NAME} From 20380ad668258b846a2c6056b514ff4302c9dad4 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 09:57:47 +0100 Subject: [PATCH 16/33] update funding page --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 3c96e73..4de9833 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # These are supported funding model platforms +github: thijsvanloef ko_fi: thijsvanloef From 7f8968d18fcaaa4d47b56280c01fe663fe43564a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=A0=EA=B8=88=ED=95=84?= Date: Fri, 26 Jan 2024 18:51:59 +0900 Subject: [PATCH 17/33] Update README.md Changing the docker-compose.yml redirect link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2af76b1..c001920 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,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: From 6f5a467c7d510dc976fba0b3a4525a8a5f65a051 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 11:07:43 +0100 Subject: [PATCH 18/33] add manual steps --- migration/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/migration/README.md b/migration/README.md index cf73b07..9d97d33 100644 --- a/migration/README.md +++ b/migration/README.md @@ -1,5 +1,7 @@ # Migrate From Existing Server +## Using the script + > [!WARNING] > Use this script at your own risk, I am not responsible for dataloss! > @@ -32,3 +34,14 @@ ```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\`, + and replace it with the folder from the old server. +4. Restart the new server From fa191b39628b085ab569057a7d3e4c7ed8cd6986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=A0=EA=B8=88=ED=95=84?= Date: Fri, 26 Jan 2024 19:13:40 +0900 Subject: [PATCH 19/33] Update README.md Added caveats for Boolean type environment variable options. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 3cde21b..a55f5fa 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,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 | From 359af3cdee4d79ae3747a6de197d6b0a16427d4f Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:47:38 +0100 Subject: [PATCH 20/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a55f5fa..5628baa 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ It is highly recommended you set the following environment values before startin > [!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. +> They must be set using exactly `true` or `false` for the option to take effect. ### Game Ports From 84ce28850509328cef3075bb1c90179b8cd3b3d4 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 13:00:14 +0100 Subject: [PATCH 21/33] Add Discord server --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5628baa..8103b01 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,12 @@ ![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker) ![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker) ![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest) +![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE) [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/) From 0a635d5ed2b9fc30ceb2d4ec6da599e06900c0fb Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 00:52:18 +0900 Subject: [PATCH 22/33] Add a Korean-translated README.md --- README.md | 2 + docs/ko/README.md | 214 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 docs/ko/README.md diff --git a/README.md b/README.md index 8103b01..645e968 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ [Chat with the community on Discord](https://discord.gg/UxBxStPAAE) +[English](/README.md) | [한국어](/docs/ko/README.md) + > [!TIP] > Unsure how to get started? Check out the [this guide I wrote!](https://tice.tips/containerization/palworld-server-docker/) diff --git a/docs/ko/README.md b/docs/ko/README.md new file mode 100644 index 0000000..d53c66b --- /dev/null +++ b/docs/ko/README.md @@ -0,0 +1,214 @@ +# Palworld 전용 서버 도커 + +![Release](https://img.shields.io/github/v/release/thijsvanloef/palworld-server-docker) +![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker) +![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker) +![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest) +![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE) + +[Docker Hub에서 보기](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) + +[Discord에서 커뮤니티와 채팅하세요](https://discord.gg/UxBxStPAAE) + +[English](/README.md) | [한국어](/docs/ko/README.md) + +> [!팁] +> 어떻게 시작해야 할지 모르시나요? [제가 작성한 이 가이드](https://tice.tips/containerization/palworld-server-docker/)를 확인해 보세요 + +[Palworld](https://store.steampowered.com/app/1623730/Palworld/) 전용 서버 호스팅을 시작하는 데 도움이 되는 Docker 컨테이너입니다. + +이 도커 컨테이너는 테스트되었으며 Linux(Ubuntu/Debian) 및 Windows 10 모두에서 작동합니다. + +> [!중요] +> 현재 Xbox Gamepass/Xbox 콘솔 플레이어는 전용 서버에 참여할 수 없습니다. +> +> 초대 코드를 통해 다른 플레이어들과 함께 게임을 즐길 수 있으며, 게임은 최대 4명의 플레이어로 제한됩니다. + +## 서버 요구 사양 + +| 리소스 | 최소 | 추천 | +| ------ | ------- | ----------------------------------- | +| CPU | 4 cores | 4+ cores | +| RAM | 16GB | 안정적인 운영을 위해 32GB 이상 권장 | +| 저장소 | 4GB | 12GB | + +## 사용하기 + +서버를 가동하기 위해서는 반드시 [환경 변수](#환경-변수)를 수정해야 합니다. 잊지 마세요! + +### Docker Compose + +이 저장소에는 서버를 설정하는 데 사용할 수 있는 [docker-compose.yml](/docker-compose.yml)예제 파일이 포함되어 있습니다. + +```yml +services: + palworld: + image: thijsvanloef/palworld-server-docker:latest + restart: unless-stopped + container_name: palworld-server + 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="World of Pals" + volumes: + - ./palworld:/palworld/ +``` + +### Docker Run + +모든 <>를 자신만의 구성으로 변경하세요. + +```bash +docker run -d \ + --name palworld-server \ + -p 8211:8211/udp \ + -p 27015:27015/udp \ + -v ./:/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="World of Pals" \ + --restart unless-stopped \ + thijsvanloef/palworld-server-docker:latest + +``` + +### Kubernetes + +쿠버네티스에 이 컨테이너를 배포하는 데 필요한 모든 파일은 [k8s 폴더](k8s/)에 있습니다. + +[README.md](k8s/readme.md) 에 있는 지침을 따라 배포를 진행해주세요. + +#### Using helm chart + +[README.md](./chart/README.md) 에 있는 지침을 따라 배포를 진행해주세요. + +### 환경변수 + +다음 값을 사용하여 부팅 시 서버의 설정을 변경할 수 있습니다. +서버를 시작하기 전에 다음 환경변수를 설정하는 것이 좋습니다 + +- PLAYERS +- PORT +- PUID +- PGID + +| 변수명 | 정보 | 기본값 | 허용되는 값 | +| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------ | +| TZ | 서버 백업에 사용되는 타임스템프 시간대 | UTC | [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) | +| PLAYERS\* | 서버에 참여할 수 있는 최대 플레이어 수 | 16 | 1-32 | +| PORT\* | 서버에 사용되는 포트(UDP) | 8211 | 1024-65535 | +| PUID\* | 서버를 실행할 사용자의 아이디입니다. | 1000 | !0 | +| PGID\* | 서버가 실행해야 하는 그룹의 GID입니다. | 1000 | !0 | +| MULTITHREADING\*\* | 멀티 스레드 CPU 환경에서 성능을 향상시킵니다. 최대 약 4개의 스레드까지만 효과가 있으며, 이 이상의 스레드를 할당하는 것은 큰 의미가 없습니다. | false | true/false | +| COMMUNITY | 커뮤니티 서버 탐색기에 서버가 표시되는지 여부(USE WITH SERVER_PASSWORD 와 함께 사용) | false | true/false | +| PUBLIC_IP | 서버가 실행 중인 네트워크의 PUBLIC IP를 수동으로 지정할 수 있습니다. 지정하지 않으면 자동으로 감지됩니다. 제대로 작동하지 않으면 수동 구성을 시도하세요. | | x.x.x.x | +| PUBLIC_PORT | 서버가 실행 중인 네트워크의 포트 번호를 수동으로 지정할 수 있습니다. 지정하지 않으면 자동으로 감지됩니다. 제대로 작동하지 않으면 수동 구성을 시도하세요. | | 1024-65535 | +| SERVER_NAME | 서버 이름 | | "string" | +| SERVER_PASSWORD | 서버 접속을 위한 비밀번호 | | "string" | +| ADMIN_PASSWORD | 관리자 비밀번호 | | "string" | +| UPDATE_ON_BOOT\*\* | 도커 컨테이너가 시작될 때 서버 업데이트/설치(컨테이너를 처음 실행할 때 이 기능을 활성화해야 합니다). | true | true/false | +| RCON_ENABLED\*\*\* | Palworld RCON 활성화 | true | true/false | +| RCON_PORT | RCON접속 포트 | 25575 | 1024-65535 | +| QUERY_PORT | Steam 서버와 통신하는 데 사용되는 쿼리 포트 | 27015 | 1024-65535 | + +\* 설정하는 것을 적극 권장합니다. + +\*\* 이 옵션을 활성화하여 실행할 때 주의해야 할 사항을 확인하세요. + +\*\*\* docker stop이 서버를 저장하고 정상적으로 종료하는 데 필요합니다. + +> [!IMPORTANT] +> 환경 변수에 사용되는 부울(true/false) 값은 shell 스크립트에서 사용되므로 대소문자를 구분합니다. +> +> 옵션이 적용되려면 정확히 `true` 또는 `false`를 사용하여 설정해야 합니다. + +### 사용되는 포트 + +| Port | Info | +| ----- | ---------------- | +| 8211 | Game Port (UDP) | +| 27015 | Query Port (UDP) | +| 25575 | RCON Port (TCP) | + +## RCON 사용 + +RCON은 palworld-server-docker 이미지에 기본적으로 활성화되어 있습니다. RCON CLI는 아주 쉽게 열 수 있습니다: + +```bash +docker exec -it palworld-server rcon-cli +``` + +위 명령어를 사용 하면 RCON을 사용하여 Palworld 서버 명령어를 작성할 수 있는 CLI가 열립니다. + +### 서버 명령어 리스트 + +| 명령어 | 정보 | +| -------------------------------- | -------------------------------------------------- | +| Shutdown {Seconds} {MessageText} | {Seconds}가 지나면 서버가 종료됩니다. | +| DoExit | 서버를 강제 종료합니다. | +| Broadcast | 서버에 있는 모든 플레이어에게 메시지를 전송합니다. | +| KickPlayer {SteamID} | 서버에서 플레이어를 추방합니다. | +| BanPlayer {SteamID} | 서버에서 사용자를 차단합니다. | +| TeleportToPlayer {SteamID} | 대상 플레이어의 위치로 순간이동합니다. | +| TeleportToMe {SteamID} | 대상 플레이어가 현재 위치로 순간이동합니다. | +| ShowPlayers | 서버에 있는 모든 플레이어의 정보를 표시합니다. | +| Info | 서버 정보를 표시합니다. | +| Save | 월드 정보를 저장합니다. | + +For a full list of commands go to: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) + +## 백업 만들기 + +현재 시점의 게임 세이브 백업을 생성하려면 다음 명령을 사용합니다. + +```bash +docker exec palworld-server backup +``` + +다음 위치에 백업이 생성됩니다. `/palworld/backups/` + +rcon이 활성화된 경우 서버는 백업 전에 저장을 실행합니다. + +## 서버 설정 편집 + +서버가 시작되면 `PalWorldSettings.ini` 파일은 다음 위치에 생성됩니다. +`/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` + +여기서 변경한 사항은 다음 부팅 시 서버에 적용됩니다. + +환경 변수는 항상 `PalWorldSettings.ini`의 변경 사항을 덮어쓴다는 점에 유의하세요. + +서버 설정에 대한 자세한 설명 목록을 보려면 다음을 참조하세요.: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) + +> [!팁] +> 만약 `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` 파일 내부가 비어 있으면, +> 파일을 삭제하고 서버를 다시 시작하면 콘텐츠가 포함된 새 파일이 생성됩니다. + +## 이슈/기능 요청 + +문제/기능 요청은 다음 [링크](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose)에서 제출할 수 있습니다. + +### 알려진 이슈 + +알려진 이슈는 [Wiki](https://github.com/thijsvanloef/palworld-server-docker/wiki/Known-Issues)에 나열되어 있습니다. From 891d11d0ca9e49a7ced155fa5a372166117581a9 Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 00:58:05 +0900 Subject: [PATCH 23/33] fix: korean README.md link --- docs/ko/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ko/README.md b/docs/ko/README.md index d53c66b..9ea95f9 100644 --- a/docs/ko/README.md +++ b/docs/ko/README.md @@ -34,7 +34,7 @@ ## 사용하기 -서버를 가동하기 위해서는 반드시 [환경 변수](#환경-변수)를 수정해야 합니다. 잊지 마세요! +서버를 가동하기 위해서는 반드시 [환경변수](#환경변수)를 수정해야 합니다. 잊지 마세요! ### Docker Compose From 10788629c24e0e72856f27efec4af60042474b8a Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 02:22:25 +0900 Subject: [PATCH 24/33] Change ./docs/en -> ./docs/kr to reflect the Korean TLD. --- docs/{ko => kr}/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{ko => kr}/README.md (100%) diff --git a/docs/ko/README.md b/docs/kr/README.md similarity index 100% rename from docs/ko/README.md rename to docs/kr/README.md From f286c5f48ad1ecd6c5c6806c211f761c5458f842 Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 02:29:23 +0900 Subject: [PATCH 25/33] Fix invalid README.md translation breadcrumbs. --- README.md | 2 +- docs/kr/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 645e968..0ea32b6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [Chat with the community on Discord](https://discord.gg/UxBxStPAAE) -[English](/README.md) | [한국어](/docs/ko/README.md) +[English](/README.md) | [한국어](/docs/kr/README.md) > [!TIP] > Unsure how to get started? Check out the [this guide I wrote!](https://tice.tips/containerization/palworld-server-docker/) diff --git a/docs/kr/README.md b/docs/kr/README.md index 9ea95f9..1b7fd7b 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -10,7 +10,7 @@ [Discord에서 커뮤니티와 채팅하세요](https://discord.gg/UxBxStPAAE) -[English](/README.md) | [한국어](/docs/ko/README.md) +[English](/README.md) | [한국어](/docs/kr/README.md) > [!팁] > 어떻게 시작해야 할지 모르시나요? [제가 작성한 이 가이드](https://tice.tips/containerization/palworld-server-docker/)를 확인해 보세요 From 70b4496efe1fa56484760e16927665cab44a6e14 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:57:49 +0100 Subject: [PATCH 26/33] =?UTF-8?q?Revert=20"updating=20STARTCOMMAND=20to=20?= =?UTF-8?q?array=20with=20+=3D=20syntax=20and=20allowing=20spaces=20in=20?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/start.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 0efb9c2..9159076 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,45 +1,45 @@ #!/bin/bash -STARTCOMMAND=("./PalServer.sh") +STARTCOMMAND="./PalServer.sh" if [ -n "${PORT}" ]; then - STARTCOMMAND+=("-port=${PORT}") + STARTCOMMAND="${STARTCOMMAND} -port=${PORT}" fi if [ -n "${PLAYERS}" ]; then - STARTCOMMAND+=("-players=${PLAYERS}") + STARTCOMMAND="${STARTCOMMAND} -players=${PLAYERS}" fi if [ "${COMMUNITY}" = true ]; then - STARTCOMMAND+=("EpicApp=PalServer") + STARTCOMMAND="${STARTCOMMAND} EpicApp=PalServer" fi if [ -n "${PUBLIC_IP}" ]; then - STARTCOMMAND+=("-publicip=${PUBLIC_IP}") + STARTCOMMAND="${STARTCOMMAND} -publicip=${PUBLIC_IP}" fi if [ -n "${PUBLIC_PORT}" ]; then - STARTCOMMAND+=("-publicport=${PUBLIC_PORT}") + STARTCOMMAND="${STARTCOMMAND} -publicport=${PUBLIC_PORT}" fi if [ -n "${SERVER_NAME}" ]; then - STARTCOMMAND+=("-servername=${SERVER_NAME}") + STARTCOMMAND="${STARTCOMMAND} -servername=${SERVER_NAME}" fi if [ -n "${SERVER_PASSWORD}" ]; then - STARTCOMMAND+=("-serverpassword=${SERVER_PASSWORD}") + STARTCOMMAND="${STARTCOMMAND} -serverpassword=${SERVER_PASSWORD}" fi if [ -n "${ADMIN_PASSWORD}" ]; then - STARTCOMMAND+=("-adminpassword=${ADMIN_PASSWORD}") + STARTCOMMAND="${STARTCOMMAND} -adminpassword=${ADMIN_PASSWORD}" fi if [ -n "${QUERY_PORT}" ]; then - STARTCOMMAND+=("-queryport=${QUERY_PORT}") + STARTCOMMAND="${STARTCOMMAND} -queryport=${QUERY_PORT}" fi if [ "${MULTITHREADING}" = true ]; then - STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS") + STARTCOMMAND="${STARTCOMMAND} -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS" fi cd /palworld || exit @@ -75,5 +75,5 @@ password: ${ADMIN_PASSWORD} EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "${STARTCOMMAND[@]}" -su steam -c "${STARTCOMMAND[@]}" +echo "${STARTCOMMAND}" +su steam -c "${STARTCOMMAND}" From 5dcdd9bf45e4d1b9cdacf58f25ec30bd1741898b Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:43:02 +0100 Subject: [PATCH 27/33] replace shellcheck --- .github/workflows/linting.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 5efe8f3..c4ece88 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,10 +7,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Run Shellcheck - uses: azohra/shell-linter@latest + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master with: - severity: "error" + severity: warning dockerlint: runs-on: ubuntu-latest steps: From 1418634236cf9da4cf1e797d504d00e0d0c32e89 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:46:19 +0100 Subject: [PATCH 28/33] trigger warning --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 9159076..ee68f6d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -76,4 +76,4 @@ EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" echo "${STARTCOMMAND}" -su steam -c "${STARTCOMMAND}" +su steam -c ${STARTCOMMAND} From 44d0fc9d1f4d8495be913d8c21ab73f8327a8b8c Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:46:58 +0100 Subject: [PATCH 29/33] remove severity --- .github/workflows/linting.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index c4ece88..47e77a8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -9,8 +9,6 @@ jobs: uses: actions/checkout@v2 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master - with: - severity: warning dockerlint: runs-on: ubuntu-latest steps: From 9c674e539ff6044286fd119be17b2ba53f291119 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:50:46 +0100 Subject: [PATCH 30/33] fix "error" --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index ee68f6d..9159076 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -76,4 +76,4 @@ EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" echo "${STARTCOMMAND}" -su steam -c ${STARTCOMMAND} +su steam -c "${STARTCOMMAND}" From 5b3860ecb10f57ba30fdd758d326f8e9137bca25 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:52:36 +0100 Subject: [PATCH 31/33] increase severity --- .github/workflows/linting.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 47e77a8..0972a7c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -18,7 +18,6 @@ jobs: with: dockerfile: Dockerfile lint: 'hadolint' - failure-threshold: error markdownlint: runs-on: ubuntu-latest steps: From 0e8cbd1a15d8b77ef2b8986f039ef5710889bd3c Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:57:35 +0100 Subject: [PATCH 32/33] decrease layer count --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 69b72e6..7840a88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN wget -q https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_amd64.tar.gz -O - | tar -xz -RUN mv rcon-cli /usr/bin/rcon-cli +RUN wget -q https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_amd64.tar.gz -O - | tar -xz && \ + mv rcon-cli /usr/bin/rcon-cli ENV PORT= \ PUID=1000 \ @@ -29,9 +29,8 @@ ENV PORT= \ TZ=UTC COPY ./scripts/* /home/steam/server/ -RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh - -RUN mv /home/steam/server/backup.sh /usr/local/bin/backup +RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ + mv /home/steam/server/backup.sh /usr/local/bin/backup WORKDIR /home/steam/server From 48cba490725c250b38c17cdbacc9093b8d1e9f4e Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:58:30 +0100 Subject: [PATCH 33/33] set pipefail --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7840a88..e3ac9a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_amd64.tar.gz -O - | tar -xz && \ mv rcon-cli /usr/bin/rcon-cli