From 6b42438b4295d1c9d560cf758a7aa91b9e835c9f Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Wed, 24 Jan 2024 15:57:53 -0300 Subject: [PATCH 001/119] - Added a helm chart with some basic doc; --- .gitignore | 5 +- chart/Chart.yaml | 20 +++++ chart/README.md | 32 ++++++++ chart/VALUES_SUMMARY.md | 63 ++++++++++++++++ chart/templates/configmaps.yaml | 36 +++++++++ chart/templates/deployments.yaml | 58 ++++++++++++++ chart/templates/pvcs.yaml | 29 +++++++ chart/templates/secrets.yaml | 25 +++++++ chart/templates/services.yaml | 28 +++++++ chart/values.yaml | 125 +++++++++++++++++++++++++++++++ 10 files changed, 420 insertions(+), 1 deletion(-) create mode 100644 chart/Chart.yaml create mode 100644 chart/README.md create mode 100644 chart/VALUES_SUMMARY.md create mode 100644 chart/templates/configmaps.yaml create mode 100644 chart/templates/deployments.yaml create mode 100644 chart/templates/pvcs.yaml create mode 100644 chart/templates/secrets.yaml create mode 100644 chart/templates/services.yaml create mode 100644 chart/values.yaml diff --git a/.gitignore b/.gitignore index d1a7b7f..5cddfe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -palworld \ No newline at end of file +palworld +.idea +values*.yaml +!chart/values.yaml \ No newline at end of file diff --git a/chart/Chart.yaml b/chart/Chart.yaml new file mode 100644 index 0000000..1f65797 --- /dev/null +++ b/chart/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +name: palworld +version: 0.0.0 +description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. +type: application +keywords: + - palworld + - server + - kubernetes + - helm +home: https://github.com/thijsvanloef/palworld-server-docker +sources: + - https://github.com/thijsvanloef/palworld-server-docker +maintainers: + - name: Filipe Souza + email: filipe.souza@mestre8d.com + url: https://github.com/Filipe-Souza +icon: https://cdn.akamai.steamstatic.com/steam/apps/1623730/header.jpg +appVersion: "latest" +deprecated: false \ No newline at end of file diff --git a/chart/README.md b/chart/README.md new file mode 100644 index 0000000..5cb389c --- /dev/null +++ b/chart/README.md @@ -0,0 +1,32 @@ +# Palworld Helm Chart + +Allows you to deploy the usage of [Palworld Server docker](https://github.com/Filipe-Souza/palworld-server-docker) as a helm chart and with helm deployments. + +This is an advanced method of installation and can be quite difficult to non-technical trying to set it up. + +## Dependencies + +You will need the [Helm client](https://helm.sh/docs/intro/install/) and a Kubernetes cluster. + +## Install the chart + +There is no helm package available yet, so you need to clone this repo and setup it manually, or with some GitOps tool like ArgoCD/FluxCD. + +After cloning the repository, you can create a new file, e.g.: values.override.yaml to store your custom values. + +After copying, modify your values.override.yaml as needed. You can look up the [values summary](VALUES_SUMMARY.md) to see the parameter documentation. + +After that, you can apply the chart: + +```bash +helm install --create-namespace --namespace palworld palworld chart/ --values values.override.yaml +``` + +You can remove all the resources created (except the PVC) with the following command: + +```bash +helm uninstall -n palworld palworld +``` + + + diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md new file mode 100644 index 0000000..f76fb43 --- /dev/null +++ b/chart/VALUES_SUMMARY.md @@ -0,0 +1,63 @@ +# palworld + +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) + +This chart can provide an rAthena emulator installation on a Kubernetes cluster. + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Filipe Souza | | | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| namespace | string | `"palworld"` | Namespace where the resources will be created | +| server | dict | | The server configuration | +| server.annotations | object | `{}` | Additional annotations to the resources | +| server.config | dict | | Change the game server configuration. If you change those, make sure to change the service.ports and server.ports accordingly. Those are directly connected with the container image, providing multiple environment variables to the scripts. | +| server.config.annotations | object | `{}` | Additional annotations to the resources | +| server.config.community.enable | bool | `true` | Enables/disables the visibility of this server on Steam community servers list. | +| server.config.community.password | string | `""` | If not provided, a random password will be generated and stored on the secret. | +| server.config.labels | object | `{}` | Additional labels to the resources | +| server.config.max_players | int | `16` | The max number of players supported. | +| server.config.multithreading | bool | `true` | Enables the multithreading, allowing the usage of up to 4 cores (needs citation) | +| server.config.query_port | string | `27015` | The query port of the game. | +| server.config.rcon | dict | | Remote connection configuration. Allows the remote connection and management for the server. Those are directly connected with the container image, providing multiple environment variables to the scripts. | +| server.config.rcon.enable | bool | `true` | Enables/disables the rcon port. | +| server.config.rcon.password | string | `""` | If not provided, a random password will be generated and stored on the secret. | +| server.config.rcon.port | string | `25575` | The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. | +| server.image | dict | | Define the parameters for the server image container | +| server.image.imagePullPolicy | string | `"IfNotPresent"` | Define the pull policy for the server image. | +| server.image.name | string | `"thijsvanloef/palworld-server-docker"` | Name of the image, without the tag. | +| server.image.tag | string | `"latest"` | The tag of the image. | +| server.labels | object | `{}` | Additional labels to the resources | +| server.ports | dict | | Change the ports to be mapped to the pod. If you change those, make sure to change the service.ports and server.config accordingly. | +| server.ports[0] | dict | `{"containerPort":8211,"name":"game","protocol":"UDP"}` | The "game" port definition. If you change this, make sure to change the service.ports.game and server.config accordingly. | +| server.ports[1] | dict | `{"containerPort":27015,"name":"query","protocol":"UDP"}` | The "query" port definition . If you change this, make sure to change the service.ports.query_port and server.config accordingly. | +| server.ports[2] | dict | `{"containerPort":25575,"name":"rcon","protocol":"UDP"}` | The "rcon" port definition . If you change this, make sure to change the service.ports.rcon and server.config accordingly. | +| server.service | dict | | Change the service configuration. If you change those, make sure to change the server.config and server.ports accordingly. | +| server.service.annotations | object | `{}` | Additional annotations to the resources | +| server.service.enabled | bool | `true` | Enables the creation of the service component. | +| server.service.labels | object | `{}` | Additional labels to the resources | +| server.service.ports | dict | | Change the ports to be mapped to the service. If you change those, make sure to change the server.config and server.ports accordingly. | +| server.service.ports[0] | dict | `{"name":"game","port":8211,"protocol":"UDP","targetPort":8211}` | The "game" port definition. If you change this, make sure to change the server.ports.game and server.config.port accordingly. | +| server.service.ports[1] | dict | `{"name":"query","port":27015,"protocol":"UDP","targetPort":27015}` | The "query" port definition . If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. | +| server.service.ports[2] | dict | `{"name":"rcon","port":25575,"protocol":"UDP","targetPort":25575}` | The "rcon" port definition . If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. | +| server.service.ports[3] | dict | `{"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" port definition . Used only to create a health check for load balancers on cloud services. | +| server.service.type | string | `"LoadBalancer"` | The type of service to be created. | +| server.storage | dict | `{"preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume | +| server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. | +| server.storage.size | string | `"10Gi"` | The size of the pvc storage. | +| server.storage.storageClassName | string | `""` | The storage class name. | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/chart/templates/configmaps.yaml b/chart/templates/configmaps.yaml new file mode 100644 index 0000000..3ae6bbf --- /dev/null +++ b/chart/templates/configmaps.yaml @@ -0,0 +1,36 @@ +{{- $cPwd := randAlphaNum 12 | nospace -}} +{{- $sName := randAlphaNum 6 | nospace -}} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-env-config" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-config" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-config" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +data: + PUID: "{{ .Values.server.config.puid }}" + PGID: "{{ .Values.server.config.pgid }}" + PORT: "{{ .Values.server.config.port }}" + PLAYERS: "{{ .Values.server.config.max_players }}" + MULTITHREADING: "{{ .Values.server.config.multithreading }}" + {{ if .Values.server.config.rcon.enable }} + RCON_ENABLED: "true" + RCON_PORT: "{{ .Values.server.config.rcon.port }}" + {{ end }} + {{ if .Values.server.config.community.enable }} + COMMUNITY: "true" + SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }} + {{ end }} + SERVER_NAME: {{- if .Values.server.config.server_name }} "{{ .Values.server.config.server_name }}" {{ else }} {{ printf "%s_%s" "palworld" $sName }} {{ end }} \ No newline at end of file diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml new file mode 100644 index 0000000..823261b --- /dev/null +++ b/chart/templates/deployments.yaml @@ -0,0 +1,58 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-server" +spec: + selector: + matchLabels: + app.kubernetes.io/component: "{{ .Release.Name }}-server" + template: + metadata: + annotations: + {{- with .Values.server.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-server" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-server" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + spec: + containers: + - name: healthz + image: "chussenot/tiny-server:latest" + imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} + ports: + - name: healthz + containerPort: 80 + protocol: TCP + - name: server + image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" + imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} + ports: + {{- with .Values.server.ports }} + {{- toYaml . | nindent 12 }} + {{- end }} + env: + - name: ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Release.Name }}-rcon-password" + key: "rconPassword" + envFrom: + - configMapRef: + name: "{{ .Release.Name }}-env-config" + volumeMounts: + - mountPath: /palworld + name: datadir + volumes: + - name: datadir + persistentVolumeClaim: + claimName: "{{ .Release.Name }}-datadir-pvc" diff --git a/chart/templates/pvcs.yaml b/chart/templates/pvcs.yaml new file mode 100644 index 0000000..b4d9a5f --- /dev/null +++ b/chart/templates/pvcs.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-datadir-pvc" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-datadir-pvc" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-datadir-pvc" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- if .Values.server.storage.preventDelete }} + helm.sh/resource-policy: keep + {{ end }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.server.storage.size }} + storageClassName: {{ .Values.server.storage.storageClassName }} \ No newline at end of file diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml new file mode 100644 index 0000000..f1a3d85 --- /dev/null +++ b/chart/templates/secrets.yaml @@ -0,0 +1,25 @@ +{{- define "server.rcon.password" -}} +{{- randAlphaNum 24 | nospace -}} +{{- end -}} +apiVersion: v1 +kind: Secret +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-rcon-password" + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-rcon-password" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-rcon-password" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.config.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +type: Opaque +stringData: + rconPassword: {{- if .Values.server.config.rcon.password }} "{{ .Values.server.config.rcon.password }}" {{ else }} "{{ include "server.rcon.password" .}}" {{ end }} \ No newline at end of file diff --git a/chart/templates/services.yaml b/chart/templates/services.yaml new file mode 100644 index 0000000..a7ff4e2 --- /dev/null +++ b/chart/templates/services.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: v1 +kind: Service +metadata: + namespace: {{ .Values.namespace }} + name: "{{ .Release.Name }}-svc" + labels: + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + app.kubernetes.io/name: "{{ .Release.Name }}-svc" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "{{ .Release.Name }}-svc" + app.kubernetes.io/version: {{ .Chart.AppVersion }} + {{- with .Values.server.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- with .Values.server.config.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + app.kubernetes.io/component: "{{ .Release.Name }}-server" + ports: + {{- with .Values.server.service.ports }} + {{- toYaml . | nindent 4 }} + {{- end }} + type: {{ .Values.server.service.type }} \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml new file mode 100644 index 0000000..3172d7a --- /dev/null +++ b/chart/values.yaml @@ -0,0 +1,125 @@ +# -- Namespace where the resources will be created +namespace: palworld +# -- (dict) The server configuration +# @notationType -- bigValue +server: + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + # -- (dict) Define some parameters for the storage volume + storage: + # -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs. + preventDelete: false + # -- The size of the pvc storage. + size: 10Gi + # -- The storage class name. + storageClassName: "" + # -- (dict) Define the parameters for the server image container + # @notationType -- bigValue + image: + # -- Name of the image, without the tag. + name: thijsvanloef/palworld-server-docker + # -- The tag of the image. + tag: latest + # -- Define the pull policy for the server image. + imagePullPolicy: IfNotPresent + + # -- (dict) Change the ports to be mapped to the pod. + # If you change those, make sure to change the service.ports and server.config accordingly. + # @notationType -- bigValue + ports: + # -- (dict) The "game" port definition. + # If you change this, make sure to change the service.ports.game and server.config accordingly. + - name: game + containerPort: 8211 + protocol: UDP + # -- (dict) The "query" port definition . + # If you change this, make sure to change the service.ports.query_port and server.config accordingly. + - name: query + containerPort: 27015 + protocol: UDP + # -- (dict) The "rcon" port definition . + # If you change this, make sure to change the service.ports.rcon and server.config accordingly. + - name: rcon + containerPort: 25575 + protocol: UDP + + # -- (dict) Change the service configuration. + # If you change those, make sure to change the server.config and server.ports accordingly. + # @notationType -- bigValue + service: + # -- (bool) Enables the creation of the service component. + enabled: true + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + # -- (string) The type of service to be created. + type: LoadBalancer + # -- (dict) Change the ports to be mapped to the service. + # If you change those, make sure to change the server.config and server.ports accordingly. + # @notationType -- bigValue + ports: + # -- (dict) The "game" port definition. + # If you change this, make sure to change the server.ports.game and server.config.port accordingly. + - name: game + port: 8211 + protocol: UDP + targetPort: 8211 + # -- (dict) The "query" port definition . + # If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. + - name: query + port: 27015 + protocol: UDP + targetPort: 27015 + # -- (dict) The "rcon" port definition . + # If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. + - name: rcon + port: 25575 + protocol: UDP + targetPort: 25575 + # -- (dict) The "healthz" port definition . + # Used only to create a health check for load balancers on cloud services. + - name: healthz + port: 80 + protocol: TCP + targetPort: 80 + # -- (dict) Change the game server configuration. + # If you change those, make sure to change the service.ports and server.ports accordingly. + # Those are directly connected with the container image, providing multiple environment variables to the scripts. + # @notationType -- bigValue + config: + # -- Additional annotations to the resources + annotations: { } + # -- Additional labels to the resources + labels: { } + puid: 1000 + pgid: 1000 + port: 8211 + # -- (string) The query port of the game. + query_port: 27015 + # -- The max number of players supported. + max_players: 16 + # -- (bool) Enables the multithreading, allowing the usage of up to 4 cores (needs citation) + multithreading: true + # -- (dict) Remote connection configuration. + # Allows the remote connection and management for the server. + # Those are directly connected with the container image, providing multiple environment variables to the scripts. + # @notationType -- bigValue + rcon: + # -- (bool) Enables/disables the rcon port. + enable: true + # -- (string) The port for rcon. If you change this, make sure to change the service.ports and server.ports accordingly. + port: 25575 + # -- (string) If not provided, a random password will be generated and stored on the secret. + password: "" + community: + # -- (bool) Enables/disables the visibility of this server on Steam community servers list. + enable: true + # -- (string) If not provided, a random password will be generated and stored on the secret. + password: "" + # -- (string) If not provided, a random server name will be generated with the "palworld_" prefix. + server_name: "" + + From 2fdb55f4dd12d22f4f45830c61a9fa1065f30f97 Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Wed, 24 Jan 2024 17:56:54 -0300 Subject: [PATCH 002/119] - Updated the main readme; --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 612f6a4..157f1ce 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ All files you will need to deploy this container to kubernetes are located in th Follow the steps in the [README.md here](k8s/readme.md) to deploy it. +#### Using helm chart + +Follow up the docs on the [README.md for the helm chart](./chart/README.md) to deploy. + ### Environment variables You can use the following values to change the settings of the server on boot. From 7e5b1a656a03a6dea7737bdb27ffcfaab1522839 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 18:25:12 -0500 Subject: [PATCH 003/119] Added graceful shutdown using rcon --- scripts/init.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index f1b5bf2..6174c44 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -17,4 +17,20 @@ if [ "${UPDATE_ON_BOOT}" = true ]; then su steam -c '/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit' fi -./start.sh +term_handler() { + rcon-cli shutdown 1 + while true + do + rcon-cli info + if [ $? -ne 0 ]; then + break + fi + sleep 1 + done +} + +trap 'term_handler' SIGTERM + +./start.sh & +killpid="$!" +wait $killpid From 38f42551c8bba6a7533e4519564aa60a9675e1f5 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 18:44:15 -0500 Subject: [PATCH 004/119] Added shutdown without rcon --- scripts/init.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 6174c44..bb34a4f 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -18,15 +18,20 @@ if [ "${UPDATE_ON_BOOT}" = true ]; then fi term_handler() { - rcon-cli shutdown 1 - while true - do - rcon-cli info - if [ $? -ne 0 ]; then - break - fi - sleep 1 - done + if [ ${RCON_ENABLED} = true ]; then + rcon-cli shutdown 1 + while true + do + rcon-cli info + if [ $? -ne 0 ]; then + break + fi + sleep 1 + done + else # Not graceful + kill -SIGTERM $(pidof PalServer-Linux-Test) + tail --pid=$(pidof PalServer-Linux-Test) -f 2>/dev/null + fi } trap 'term_handler' SIGTERM From 945977237b7858e01652e109dc5f9bfb331e1e63 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 19:00:25 -0500 Subject: [PATCH 005/119] Fixed saving issue. --- scripts/init.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index bb34a4f..1975028 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -19,19 +19,12 @@ fi term_handler() { if [ ${RCON_ENABLED} = true ]; then + rcon-cli save rcon-cli shutdown 1 - while true - do - rcon-cli info - if [ $? -ne 0 ]; then - break - fi - sleep 1 - done else # Not graceful - kill -SIGTERM $(pidof PalServer-Linux-Test) - tail --pid=$(pidof PalServer-Linux-Test) -f 2>/dev/null + kill -SIGTERM $killpid fi + tail --pid=$killpid -f 2>/dev/null } trap 'term_handler' SIGTERM From a7e4a58f8a20563c0344cf5c9af221dc59c38a45 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 19:08:04 -0500 Subject: [PATCH 006/119] Updated kill for no rcon --- scripts/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 1975028..6f70094 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -21,8 +21,8 @@ term_handler() { if [ ${RCON_ENABLED} = true ]; then rcon-cli save rcon-cli shutdown 1 - else # Not graceful - kill -SIGTERM $killpid + else # Does not save + kill -SIGTERM $(pidof PalServer-Linux-Test) fi tail --pid=$killpid -f 2>/dev/null } From 4d9a78494249756df65036e01f166497d7c11bd5 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Wed, 24 Jan 2024 19:11:56 -0500 Subject: [PATCH 007/119] Updated documentation --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b23efda..5215e95 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ It is highly recommended you set the following environment values before startin | 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 | -| RCON_ENABLED | Enable RCON for the Palworld server | true | true/false | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | | RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | | QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | @@ -116,6 +116,8 @@ It is highly recommended you set the following environment values before startin ** Make sure you know what you are doing when running this option enabled +*** Required for docker stop to save and gracefully close the server + ### Game Ports | Port | Info | From 3f00d4ad0d3e3f23fa2c81879630253a551aede3 Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Thu, 25 Jan 2024 00:43:55 -0300 Subject: [PATCH 008/119] - Now supports a external PVC to be attached to the container; - Added parameters to include a external PVC; --- chart/VALUES_SUMMARY.md | 4 +++- chart/templates/deployments.yaml | 4 ++++ chart/templates/pvcs.yaml | 4 +++- chart/values.yaml | 4 ++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index f76fb43..ef8ad5b 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -54,7 +54,9 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster. | server.service.ports[2] | dict | `{"name":"rcon","port":25575,"protocol":"UDP","targetPort":25575}` | The "rcon" port definition . If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. | | server.service.ports[3] | dict | `{"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" port definition . Used only to create a health check for load balancers on cloud services. | | server.service.type | string | `"LoadBalancer"` | The type of service to be created. | -| server.storage | dict | `{"preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume | +| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume | +| server.storage.external | bool | `false` | Define if it will use an existing PVC containing the installation data. | +| server.storage.externalName | bool | `""` | The external PVC name to use. | | server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. | | server.storage.size | string | `"10Gi"` | The size of the pvc storage. | | server.storage.storageClassName | string | `""` | The storage class name. | diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 823261b..105909b 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -55,4 +55,8 @@ spec: volumes: - name: datadir persistentVolumeClaim: + {{- if not .Values.server.storage.external }} claimName: "{{ .Release.Name }}-datadir-pvc" + {{ else }} + claimName: "{{ .Values.server.storage.externalName }}" + {{ end }} diff --git a/chart/templates/pvcs.yaml b/chart/templates/pvcs.yaml index b4d9a5f..c16e754 100644 --- a/chart/templates/pvcs.yaml +++ b/chart/templates/pvcs.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.server.storage.external }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -26,4 +27,5 @@ spec: resources: requests: storage: {{ .Values.server.storage.size }} - storageClassName: {{ .Values.server.storage.storageClassName }} \ No newline at end of file + storageClassName: {{ .Values.server.storage.storageClassName }} +{{ end }} \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index 3172d7a..e72af11 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,6 +9,10 @@ server: labels: { } # -- (dict) Define some parameters for the storage volume storage: + # -- (bool) Define if it will use an existing PVC containing the installation data. + external: false + # -- (bool) The external PVC name to use. + externalName: "" # -- Keeps helm from deleting the PVC. By default, helm does not delete pvcs. preventDelete: false # -- The size of the pvc storage. From a8e466d9dd5d17841a6e0cc80235b129bbeac8f1 Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Thu, 25 Jan 2024 01:30:21 -0300 Subject: [PATCH 009/119] - Added limits for the server container spec; --- chart/VALUES_SUMMARY.md | 1 + chart/templates/deployments.yaml | 4 ++++ chart/values.yaml | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index ef8ad5b..7304d20 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -44,6 +44,7 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster. | server.ports[0] | dict | `{"containerPort":8211,"name":"game","protocol":"UDP"}` | The "game" port definition. If you change this, make sure to change the service.ports.game and server.config accordingly. | | server.ports[1] | dict | `{"containerPort":27015,"name":"query","protocol":"UDP"}` | The "query" port definition . If you change this, make sure to change the service.ports.query_port and server.config accordingly. | | server.ports[2] | dict | `{"containerPort":25575,"name":"rcon","protocol":"UDP"}` | The "rcon" port definition . If you change this, make sure to change the service.ports.rcon and server.config accordingly. | +| server.resources | dict | `{"limits":{"cpu":4,"memory":"12Gi"},"requests":{"cpu":4,"memory":"8Gi"}}` | Resources limits for the container. | | server.service | dict | | Change the service configuration. If you change those, make sure to change the server.config and server.ports accordingly. | | server.service.annotations | object | `{}` | Additional annotations to the resources | | server.service.enabled | bool | `true` | Enables the creation of the service component. | diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 105909b..73e9789 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -36,6 +36,10 @@ spec: - name: server image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} + resources: + {{- with .Values.server.resources }} + {{- toYaml . | nindent 12 }} + {{- end }} ports: {{- with .Values.server.ports }} {{- toYaml . | nindent 12 }} diff --git a/chart/values.yaml b/chart/values.yaml index e72af11..5d78652 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -7,6 +7,14 @@ server: annotations: { } # -- Additional labels to the resources labels: { } + # -- (dict) Resources limits for the container. + resources: + limits: + cpu: 4 + memory: "12Gi" + requests: + cpu: 4 + memory: "8Gi" # -- (dict) Define some parameters for the storage volume storage: # -- (bool) Define if it will use an existing PVC containing the installation data. From c0e5b9fa66f6382d38084365ced867d65f4a0f00 Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Thu, 25 Jan 2024 01:51:27 -0300 Subject: [PATCH 010/119] - Added func to replace any non alphanumeric chars to underscore into server name; --- chart/templates/configmaps.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chart/templates/configmaps.yaml b/chart/templates/configmaps.yaml index 3ae6bbf..4dea3bf 100644 --- a/chart/templates/configmaps.yaml +++ b/chart/templates/configmaps.yaml @@ -1,5 +1,5 @@ {{- $cPwd := randAlphaNum 12 | nospace -}} -{{- $sName := randAlphaNum 6 | nospace -}} +{{- $sName := "" -}} apiVersion: v1 kind: ConfigMap metadata: @@ -33,4 +33,8 @@ data: COMMUNITY: "true" SERVER_PASSWORD: {{- if .Values.server.config.community.password }} "{{ .Values.server.config.community.password }}" {{ else }} {{ $cPwd }} {{ end }} {{ end }} - SERVER_NAME: {{- if .Values.server.config.server_name }} "{{ .Values.server.config.server_name }}" {{ else }} {{ printf "%s_%s" "palworld" $sName }} {{ end }} \ No newline at end of file + {{ if .Values.server.config.server_name }} + SERVER_NAME: {{ regexReplaceAll "\\W+" .Values.server.config.server_name "_" }} + {{ else }} + SERVER_NAME: {{ printf "%s_%s" "palworld" (randAlphaNum 6 | nospace) }} + {{ end }} \ No newline at end of file From c8ad151018a2ed2b80470437eca6df9e068d94c8 Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Thu, 25 Jan 2024 09:14:58 -0300 Subject: [PATCH 011/119] - Updated README to lint spec; --- chart/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/chart/README.md b/chart/README.md index 5cb389c..1b3a6b4 100644 --- a/chart/README.md +++ b/chart/README.md @@ -1,6 +1,7 @@ # Palworld Helm Chart -Allows you to deploy the usage of [Palworld Server docker](https://github.com/Filipe-Souza/palworld-server-docker) as a helm chart and with helm deployments. +Allows you to deploy the usage of [Palworld Server docker](https://github.com/Filipe-Souza/palworld-server-docker) as +a helm chart and with helm deployments. This is an advanced method of installation and can be quite difficult to non-technical trying to set it up. @@ -10,11 +11,13 @@ You will need the [Helm client](https://helm.sh/docs/intro/install/) and a Kuber ## Install the chart -There is no helm package available yet, so you need to clone this repo and setup it manually, or with some GitOps tool like ArgoCD/FluxCD. +There is no helm package available yet, so you need to clone this repo and setup it manually, or with some GitOps tool +like ArgoCD/FluxCD. After cloning the repository, you can create a new file, e.g.: values.override.yaml to store your custom values. -After copying, modify your values.override.yaml as needed. You can look up the [values summary](VALUES_SUMMARY.md) to see the parameter documentation. +After copying, modify your values.override.yaml as needed. You can look up the [values summary](VALUES_SUMMARY.md) to see the +parameter documentation. After that, you can apply the chart: From 52c2a295029b75789215b2acfe659c614173dd0b Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:38:51 +0100 Subject: [PATCH 012/119] Update README.md --- chart/README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/chart/README.md b/chart/README.md index 1b3a6b4..81d7b7f 100644 --- a/chart/README.md +++ b/chart/README.md @@ -1,6 +1,6 @@ # Palworld Helm Chart -Allows you to deploy the usage of [Palworld Server docker](https://github.com/Filipe-Souza/palworld-server-docker) as +Allows you to deploy the usage of [Palworld Server docker](https://github.com/Filipe-Souza/palworld-server-docker) as a helm chart and with helm deployments. This is an advanced method of installation and can be quite difficult to non-technical trying to set it up. @@ -11,13 +11,13 @@ You will need the [Helm client](https://helm.sh/docs/intro/install/) and a Kuber ## Install the chart -There is no helm package available yet, so you need to clone this repo and setup it manually, or with some GitOps tool +There is no helm package available yet, so you need to clone this repo and setup it manually, or with some GitOps tool like ArgoCD/FluxCD. After cloning the repository, you can create a new file, e.g.: values.override.yaml to store your custom values. -After copying, modify your values.override.yaml as needed. You can look up the [values summary](VALUES_SUMMARY.md) to see the -parameter documentation. +After copying, modify your values.override.yaml as needed. You can look up the +[values summary](VALUES_SUMMARY.md) to see the parameter documentation. After that, you can apply the chart: @@ -30,6 +30,3 @@ You can remove all the resources created (except the PVC) with the following com ```bash helm uninstall -n palworld palworld ``` - - - From c167f0cbb572fe86b6bde7da5469f418f4ff2af7 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:40:02 +0100 Subject: [PATCH 013/119] Update VALUES_SUMMARY.md --- chart/VALUES_SUMMARY.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index 7304d20..12928ab 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,6 +1,8 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) This chart can provide an rAthena emulator installation on a Kubernetes cluster. From 19680165d03b1f143fa789b13978bd308254c4a3 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:40:49 +0100 Subject: [PATCH 014/119] Update VALUES_SUMMARY.md --- chart/VALUES_SUMMARY.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index 12928ab..d95dab2 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,8 +1,8 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) -![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) This chart can provide an rAthena emulator installation on a Kubernetes cluster. From 81a2e907b63e5b0d8a285966120fab134bba58b2 Mon Sep 17 00:00:00 2001 From: emmanuel <154705254+codesmith-emmy@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:59:11 +0100 Subject: [PATCH 015/119] Fix: Typo in documentation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fdcc4bf..d527f93 100644 --- a/README.md +++ b/README.md @@ -134,13 +134,13 @@ It is highly recommended you set the following environment values before startin ## Using RCON RCON is enabled by default for the palworld-server-docker image. -Opening the RCON cli is quite easy: +Opening the RCON CLI is quite easy: ```bash docker exec -it palworld-server rcon-cli ``` -This will open a CLI that use can use to write commands to the Palworld Server. +This will open a CLI that uses RCON to write commands to the Palworld Server. ### List of server commands @@ -161,7 +161,7 @@ For a full list of commands go to: [https://tech.palworldgame.com/server-command ## Creating a backup -To create a backup of the game's save at the current point in time, use the command. +To create a backup of the game's save at the current point in time, use the command: ```bash docker exec palworld-server backup From 9d03e933e0466e07be62257ce7e47b10c62f8299 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Thu, 25 Jan 2024 18:23:14 +0100 Subject: [PATCH 016/119] add quotes to prevent word splitting --- scripts/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 6f70094..23028be 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -18,11 +18,11 @@ if [ "${UPDATE_ON_BOOT}" = true ]; then fi term_handler() { - if [ ${RCON_ENABLED} = true ]; then + if [ "${RCON_ENABLED}" = true ]; then rcon-cli save rcon-cli shutdown 1 else # Does not save - kill -SIGTERM $(pidof PalServer-Linux-Test) + kill -SIGTERM "$(pidof PalServer-Linux-Test)" fi tail --pid=$killpid -f 2>/dev/null } From fbbe8355be57480a4ba026eda5990673e0780678 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Thu, 25 Jan 2024 19:05:15 +0100 Subject: [PATCH 017/119] Recommend Server Password since you can now use direct join with a password --- README.md | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fdcc4bf..3e9f06d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ services: - 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 @@ -49,7 +50,6 @@ services: - 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_PASSWORD="worldofpals" # - SERVER_NAME="World of Pals" volumes: - ./palworld:/palworld/ @@ -74,6 +74,7 @@ docker run -d \ -e RCON_PORT=25575 \ -e TZ=UTC \ -e ADMIN_PASSWORD="adminPasswordHere" \ + -e SERVER_PASSWORD="worldofpals" \ -e COMMUNITY=false \ --restart unless-stopped \ thijsvanloef/palworld-server-docker:latest diff --git a/docker-compose.yml b/docker-compose.yml index 2800f57..21aff67 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - 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 @@ -18,7 +19,6 @@ services: - 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_PASSWORD="worldofpals" # - SERVER_NAME="World of Pals" volumes: - ./palworld:/palworld/ From 9518170152528f7ec617a91a52bd8b91d93ef610 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Thu, 25 Jan 2024 19:11:49 +0100 Subject: [PATCH 018/119] add server system requirements --- README.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e5ea4c0..2af76b1 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,14 @@ This Docker container has been tested and will work on both Linux (Ubuntu/Debian > > They will need to join players using the invite code and are limited to sessions of 4 players max. +## Server Requirements + +| Resource | Minimum | Recommended | +|----------|---------|------------------------------------------| +| CPU | 4 cores | 4+ cores | +| RAM | 16GB | Recommend over 32GB for stable operation | +| Storage | 4GB | 10GB | + ## How to use Keep in mind that you'll need to change the [environment variables](#environment-variables). @@ -101,24 +109,24 @@ It is highly recommended you set the following environment values before startin * PUID * PGID -| 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 | -| 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_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 | -| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | -| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | -| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | +| 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 | +| 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_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 | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | +| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | +| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | *highly recommended to set From 74f167978b572a29541ab767ec7f2f5418e32909 Mon Sep 17 00:00:00 2001 From: Syasusu Date: Thu, 25 Jan 2024 20:38:13 +0100 Subject: [PATCH 019/119] 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 020/119] 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 021/119] 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 022/119] 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 023/119] 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 024/119] 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 025/119] 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 026/119] 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 027/119] 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 028/119] 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 a3c1dd006919ddb5c7bf4b18518b8ed87ffae59d Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 21:45:05 -0500 Subject: [PATCH 029/119] Added description for server --- Dockerfile | 3 ++- README.md | 1 + docker-compose.yml | 1 + k8s/configmap.yaml | 1 + scripts/start.sh | 4 ++++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 69b72e6..e210f6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,8 @@ ENV PORT= \ RCON_ENABLED=true \ RCON_PORT=25575 \ QUERY_PORT=27015 \ - TZ=UTC + TZ=UTC \ + SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh diff --git a/README.md b/README.md index 2af76b1..6fc39ff 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ It is highly recommended you set the following environment values before startin | 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" | 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..fd6c0d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,5 +20,6 @@ services: - 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" volumes: - ./palworld:/palworld/ diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 266b340..dd34b8c 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -14,6 +14,7 @@ data: # 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_DESCRIPTION: "" --- apiVersion: v1 kind: ConfigMap diff --git a/scripts/start.sh b/scripts/start.sh index 9159076..01abae6 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -26,6 +26,10 @@ if [ -n "${SERVER_NAME}" ]; then STARTCOMMAND="${STARTCOMMAND} -servername=${SERVER_NAME}" fi +if [ -n "${SERVER_DESCRIPTION}" ]; then + STARTCOMMAND="${STARTCOMMAND} -serverdescription=${SERVER_DESCRIPTION}" +fi + if [ -n "${SERVER_PASSWORD}" ]; then STARTCOMMAND="${STARTCOMMAND} -serverpassword=${SERVER_PASSWORD}" fi From b58dee572c23b39d7f5632c4860d48013605ae35 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 21:52:22 -0500 Subject: [PATCH 030/119] Added ending pipe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fc39ff..752f263 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ It is highly recommended you set the following environment values before startin | 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" +| SERVER_DESCRIPTION | A description 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 d5f497e7aa35de31ff20142701d48e0713d29900 Mon Sep 17 00:00:00 2001 From: Joey Ross Date: Thu, 25 Jan 2024 22:49:29 -0600 Subject: [PATCH 031/119] updating STARTCOMMAND to array with += syntax and allowing spaces in server name and passwords --- scripts/start.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 9159076..206ec09 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="${STARTCOMMAND} -port=${PORT}" + STARTCOMMAND+=("-port=${PORT}") fi if [ -n "${PLAYERS}" ]; then - STARTCOMMAND="${STARTCOMMAND} -players=${PLAYERS}" + STARTCOMMAND+=("-players=${PLAYERS}") fi if [ "${COMMUNITY}" = true ]; then - STARTCOMMAND="${STARTCOMMAND} EpicApp=PalServer" + STARTCOMMAND+=("EpicApp=PalServer") fi if [ -n "${PUBLIC_IP}" ]; then - STARTCOMMAND="${STARTCOMMAND} -publicip=${PUBLIC_IP}" + STARTCOMMAND+=("-publicip=${PUBLIC_IP}") fi if [ -n "${PUBLIC_PORT}" ]; then - STARTCOMMAND="${STARTCOMMAND} -publicport=${PUBLIC_PORT}" + STARTCOMMAND+=("-publicport=${PUBLIC_PORT}") fi if [ -n "${SERVER_NAME}" ]; then - STARTCOMMAND="${STARTCOMMAND} -servername=${SERVER_NAME}" + STARTCOMMAND+=("-servername=${SERVER_NAME}") fi if [ -n "${SERVER_PASSWORD}" ]; then - STARTCOMMAND="${STARTCOMMAND} -serverpassword=${SERVER_PASSWORD}" + STARTCOMMAND+=("-serverpassword=${SERVER_PASSWORD}") fi if [ -n "${ADMIN_PASSWORD}" ]; then - STARTCOMMAND="${STARTCOMMAND} -adminpassword=${ADMIN_PASSWORD}" + STARTCOMMAND+=("-adminpassword=${ADMIN_PASSWORD}") fi if [ -n "${QUERY_PORT}" ]; then - STARTCOMMAND="${STARTCOMMAND} -queryport=${QUERY_PORT}" + STARTCOMMAND+=("-queryport=${QUERY_PORT}") fi if [ "${MULTITHREADING}" = true ]; then - STARTCOMMAND="${STARTCOMMAND} -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS" + STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS") fi cd /palworld || exit From 7a0d65804eb8a49aeab4dc63cdc4000b6f646cf9 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 00:21:09 -0500 Subject: [PATCH 032/119] 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 033/119] 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 034/119] 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 035/119] 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 036/119] 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 037/119] 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 038/119] 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 039/119] 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 040/119] 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 041/119] 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 042/119] 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 5d028c8746752381bbe639ccc28060b72b7de328 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:31:57 -0500 Subject: [PATCH 043/119] Fixed changed from merge --- README.md | 2 +- k8s/configmap.yaml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3dd9b7a..2b66ee0 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,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 | | "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 | diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 8b0b6d2..13eb262 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -13,8 +13,6 @@ data: 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: "World of Pals" SERVER_DESCRIPTION: "" --- From c04114371c74bcb7d7b37b0d4671fc42457a6b75 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:33:19 -0500 Subject: [PATCH 044/119] Reverted to old spacing for server name description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b66ee0..a03ff57 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,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 | | "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 08ec26b3f2f1bc05e47588e9615070d093168a75 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:36:09 -0500 Subject: [PATCH 045/119] Changed spacing to match current version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a03ff57..8103b01 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,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 | | "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 0a635d5ed2b9fc30ceb2d4ec6da599e06900c0fb Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 00:52:18 +0900 Subject: [PATCH 046/119] 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 047/119] 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 b08323e0e951d0081c16078a761fb5192b5e0696 Mon Sep 17 00:00:00 2001 From: Joey Ross Date: Fri, 26 Jan 2024 10:43:11 -0600 Subject: [PATCH 048/119] expanding array correctly --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 206ec09..daadc1c 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 a010a9b4910b6d1d17c5697d9a605e87d77115fd Mon Sep 17 00:00:00 2001 From: Joey Ross Date: Fri, 26 Jan 2024 11:06:47 -0600 Subject: [PATCH 049/119] adding expansion to echo as well --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index daadc1c..0efb9c2 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -75,5 +75,5 @@ password: ${ADMIN_PASSWORD} EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "${STARTCOMMAND}" +echo "${STARTCOMMAND[@]}" su steam -c "${STARTCOMMAND[@]}" From 10788629c24e0e72856f27efec4af60042474b8a Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 02:22:25 +0900 Subject: [PATCH 050/119] 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 3eef1253579e09175e8304f1d1e3e31250627292 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 12:26:11 -0500 Subject: [PATCH 051/119] Updated to array style command --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 5cd149e..c9cb3da 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -27,7 +27,7 @@ if [ -n "${SERVER_NAME}" ]; then fi if [ -n "${SERVER_DESCRIPTION}" ]; then - STARTCOMMAND="${STARTCOMMAND} -serverdescription=${SERVER_DESCRIPTION}" + STARTCOMMAND+=("-serverdescription=${SERVER_DESCRIPTION}") fi if [ -n "${SERVER_PASSWORD}" ]; then From f286c5f48ad1ecd6c5c6806c211f761c5458f842 Mon Sep 17 00:00:00 2001 From: koguempil Date: Sat, 27 Jan 2024 02:29:23 +0900 Subject: [PATCH 052/119] 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 053/119] =?UTF-8?q?Revert=20"updating=20STARTCOMMAND=20to?= =?UTF-8?q?=20array=20with=20+=3D=20syntax=20and=20allowing=20spaces=20in?= =?UTF-8?q?=20=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 5428c326f348d96b65e272c619855be1ef69d8cd Mon Sep 17 00:00:00 2001 From: michaelell Date: Fri, 26 Jan 2024 13:02:36 -0500 Subject: [PATCH 054/119] modify deployment and chart for opionated deployment --- chart/templates/deployments.yaml | 2 ++ chart/values.yaml | 2 ++ k8s/deployment.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 73e9789..5c55893 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -9,6 +9,8 @@ spec: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" template: + strategy: + type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }} diff --git a/chart/values.yaml b/chart/values.yaml index 3c53bf2..4fa0f67 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -56,6 +56,8 @@ server: - name: rcon containerPort: 25575 protocol: UDP + # -- (string) Change the deployment strategy + strategy: Recreate # -- (dict) Change the service configuration. # If you change those, make sure to change the server.config and server.ports accordingly. diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index cfca36c..9d56e3a 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -6,6 +6,8 @@ metadata: name: palworld-server spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: palworld-server From 5dcdd9bf45e4d1b9cdacf58f25ec30bd1741898b Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Fri, 26 Jan 2024 19:43:02 +0100 Subject: [PATCH 055/119] 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 056/119] 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 057/119] 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 058/119] 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 059/119] 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 060/119] 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 061/119] 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 From 5c74ac289b53158416b466562d3e746cdefa4c4b Mon Sep 17 00:00:00 2001 From: Kyle Hemsley <9289079+hemsleyk@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:12:37 -0500 Subject: [PATCH 062/119] Update deployment.yaml --- k8s/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index cfca36c..2bdf8b7 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -37,8 +37,8 @@ spec: volumeMounts: - mountPath: /palworld name: datadir - - name: palworld-settings - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini + name: palworld-settings subPath: PalWorldSettings.ini volumes: - name: datadir @@ -46,4 +46,4 @@ spec: claimName: palworld-server-datadir - name: palworld-settings configMap: - name: palworld-settings \ No newline at end of file + name: palworld-settings From 537812c2b39243c289d6e721fcc6347cc77cc9d5 Mon Sep 17 00:00:00 2001 From: Kyle Hemsley <9289079+hemsleyk@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:13:18 -0500 Subject: [PATCH 063/119] Implement tickrate in configmap --- k8s/configmap.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index be8d7aa..f82b899 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -21,6 +21,9 @@ metadata: name: palworld-settings data: PalWorldSettings.ini: >- + [/Script/OnlineSubsystemUtils.IpNetDriver] + NetServerMaxTickRate=60 + [/Script/Pal.PalGameWorldSettings] OptionSettings=( @@ -86,4 +89,4 @@ data: Region="", bUseAuth=True, BanListURL="https://api.palworldgame.com/api/banlist.txt" - ) \ No newline at end of file + ) From 0edb73fce62a1f962af7446df1c66531dfcdbeb8 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 14:29:48 -0500 Subject: [PATCH 064/119] Added fix for blank PalWorld Settings file --- README.md | 3 --- scripts/start.sh | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ea32b6..dc157c8 100644 --- a/README.md +++ b/README.md @@ -202,9 +202,6 @@ Please keep in mind that the ENV variables will always overwrite the changes mad For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) -> [!TIP] -> 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. ## Reporting Issues/Feature Requests diff --git a/scripts/start.sh b/scripts/start.sh index 9159076..278590f 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,7 +46,7 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -if [ ! -f /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini ]; then +if [ ! -f /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini ] || [ -z $(grep '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini) ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From 1a21132721ea4fe1ed5f39ba5911335b6ccb03f7 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 14:40:47 -0500 Subject: [PATCH 065/119] Removed extra blank line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index dc157c8..a94f093 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,6 @@ Please keep in mind that the ENV variables will always overwrite the changes mad For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) - ## Reporting Issues/Feature Requests Issues/Feature requests can be submitted by using [this link](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose). From f17ec1c56445ede2e74c9a26297068500ead2df0 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 14:47:20 -0500 Subject: [PATCH 066/119] Changed so grep sees if file exists --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 278590f..4cfafb6 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,7 +46,7 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -if [ ! -f /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini ] || [ -z $(grep '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini) ]; then +if [ $(grep -qs '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini) ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From efbeefecb35893aa6273f73e3454c1944da6e46d Mon Sep 17 00:00:00 2001 From: Joey Ross Date: Fri, 26 Jan 2024 13:49:38 -0600 Subject: [PATCH 067/119] fixing startcmd command --- scripts/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 0efb9c2..1226469 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -75,5 +75,5 @@ password: ${ADMIN_PASSWORD} EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "${STARTCOMMAND[@]}" -su steam -c "${STARTCOMMAND[@]}" +echo "bash -c '${STARTCOMMAND[@]}'" +su steam -c "bash -c '${STARTCOMMAND[@]}'" From 4bf5070486db7b8aac05a11b74559a9193076b6d Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:45:10 -0800 Subject: [PATCH 068/119] Replace rcon client. Replace [itzg/rcon-cli](https://github.com/itzg/rcon-cli) with [gorcon/rcon-cli](https://github.com/gorcon/rcon-cli). --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3ac9a5..3d884fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && 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 +RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ + mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli ENV PORT= \ PUID=1000 \ From d4ed4b70a3424a892da8bfe78e5b8a9c4c262668 Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:50:31 -0800 Subject: [PATCH 069/119] Add quotes around `shutdown 1` `gorcon/rcon-cli` treats space separated arguments as separate commands. Adding quotes around `rcon-cli "shutdown 1"`, forces rcon-cli to treat it as a single command. --- scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.sh b/scripts/init.sh index 23028be..bbf91a4 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -20,7 +20,7 @@ fi term_handler() { if [ "${RCON_ENABLED}" = true ]; then rcon-cli save - rcon-cli shutdown 1 + rcon-cli "shutdown 1" else # Does not save kill -SIGTERM "$(pidof PalServer-Linux-Test)" fi From abc23dd5c5ba9adc0aaaab73157d67f9145dad10 Mon Sep 17 00:00:00 2001 From: Odaka Ui <31593320+odakaui@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:53:35 -0800 Subject: [PATCH 070/119] Update rcon.yaml location. rcon-cli requires rcon.yaml to be in the current working directory. --- scripts/start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 9159076..164b95d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -68,10 +68,10 @@ if [ -n "${RCON_PORT}" ]; then fi # Configure RCON settings -cat >~/.rcon-cli.yaml </home/steam/server/rcon.yaml < Date: Fri, 26 Jan 2024 15:38:41 -0500 Subject: [PATCH 071/119] Added quotes --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 4cfafb6..1c24880 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,7 +46,7 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -if [ $(grep -qs '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini) ]; then +if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini)" ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From 2276c40afac74d7e4038580162cfffe6ad61c188 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 15:43:13 -0500 Subject: [PATCH 072/119] Seeing if spellcheck is happy (Always overwrite) --- scripts/start.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 1c24880..feb9bc4 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,7 +46,8 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini)" ]; then +# This will always overwrite +if [ ! "$(grep -sq '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini)" ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From e310a0c638f18756b770f3006dc066610a79dd35 Mon Sep 17 00:00:00 2001 From: Joey Ross Date: Fri, 26 Jan 2024 14:44:53 -0600 Subject: [PATCH 073/119] [*] vs [@] does appear to be teh correct syntax, let's see if the linter likes it --- scripts/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 76aeaa4..6b096f7 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -75,5 +75,6 @@ password: ${ADMIN_PASSWORD} EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[@]}" -su steam -c "bash -c '${STARTCOMMAND[@]}'" +echo "bash -c '${STARTCOMMAND[*]}'" +su steam -c "bash -c '${STARTCOMMAND[*]}'" + From a6f9a70fdec18ab46dbb778bd8311e8ed7364770 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 15:45:37 -0500 Subject: [PATCH 074/119] Moved grep outside if condition --- scripts/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index feb9bc4..c703326 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,8 +46,9 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -# This will always overwrite -if [ ! "$(grep -sq '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini)" ]; then +# Check if PalWorldSettings.ini exists and it not blank +grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +if [ ! $? ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From 3ff8d1a6f7f39bc65d575993a1f8a6a35492ceb4 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 15:51:56 -0500 Subject: [PATCH 075/119] Added spellcheck exception --- scripts/start.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index c703326..7bea41d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -46,9 +46,8 @@ cd /palworld || exit printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n" -# Check if PalWorldSettings.ini exists and it not blank -grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini -if [ ! $? ]; then +# shellcheck disable=SC2143 +if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini)" ]; then printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" From c397e10fd7d3abc65514a9da6864aa66e69f458e Mon Sep 17 00:00:00 2001 From: Twinki Date: Fri, 26 Jan 2024 21:18:58 -0500 Subject: [PATCH 076/119] Add hyperlinks to readme shields # Motivations I really like shields.io, but clicking them shouldn't lead you to the shield, it should lead you to the relvenant information # Modifications - Add relevant hyperlinks to readme shields --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0ea32b6..b106d15 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Palworld Dedicated Server Docker -![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) +[![Release](https://img.shields.io/github/v/release/thijsvanloef/palworld-server-docker)](https://github.com/thijsvanloef/palworld-server-docker/releases) +[![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker)](https://hub.docker.com/repository/docker/thijsvanloef/palworld-server-docker) +[![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/repository/docker/thijsvanloef/palworld-server-docker) +[![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) +[![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) [View on Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) From 18e558fb00f3405abc238dbc242588e778866c59 Mon Sep 17 00:00:00 2001 From: Mercwri Date: Fri, 26 Jan 2024 22:18:42 -0500 Subject: [PATCH 077/119] fix strategy placement in chart --- chart/templates/deployments.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 5c55893..ade424a 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -8,9 +8,9 @@ spec: selector: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" + strategy: + type: "{{ .Values.server.strategy }}" template: - strategy: - type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }} From 8b34e13e8a4045066cc337374e9f63d9e801de31 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 21:45:05 -0500 Subject: [PATCH 078/119] Added description for server --- Dockerfile | 3 ++- README.md | 7 ++++--- docker-compose.yml | 2 ++ k8s/configmap.yaml | 1 + scripts/start.sh | 4 ++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3ac9a5..467d3db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,8 @@ ENV PORT= \ RCON_ENABLED=true \ RCON_PORT=25575 \ QUERY_PORT=27015 \ - TZ=UTC + TZ=UTC \ + SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ RUN chmod +x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ diff --git a/README.md b/README.md index 0ea32b6..41b9d7d 100644 --- a/README.md +++ b/README.md @@ -123,9 +123,10 @@ It is highly recommended you set the following environment values before startin | 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 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 community server | | "string" | +| SERVER_DESCRIPTION | A description 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 | diff --git a/docker-compose.yml b/docker-compose.yml index a3b8e2d..92c1f19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ 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="" volumes: - ./palworld:/palworld/ diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index be8d7aa..13eb262 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -14,6 +14,7 @@ data: 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" + SERVER_DESCRIPTION: "" --- apiVersion: v1 kind: ConfigMap diff --git a/scripts/start.sh b/scripts/start.sh index 6b096f7..fe21462 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -26,6 +26,10 @@ if [ -n "${SERVER_NAME}" ]; then STARTCOMMAND+=("-servername=${SERVER_NAME}") fi +if [ -n "${SERVER_DESCRIPTION}" ]; then + STARTCOMMAND="${STARTCOMMAND} -serverdescription=${SERVER_DESCRIPTION}" +fi + if [ -n "${SERVER_PASSWORD}" ]; then STARTCOMMAND+=("-serverpassword=${SERVER_PASSWORD}") fi From 013bb36802d02baf35338a3a2d595f6d40bfdeb6 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Thu, 25 Jan 2024 21:52:22 -0500 Subject: [PATCH 079/119] Added ending pipe --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41b9d7d..7e52da9 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ It is highly recommended you set the following environment values before startin | 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" +| SERVER_DESCRIPTION | A description 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 b0e2917206bdcaa45e84808944f824f738ac65ae Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:31:57 -0500 Subject: [PATCH 080/119] Fixed changed from merge --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7e52da9..0ffacec 100644 --- a/README.md +++ b/README.md @@ -123,10 +123,9 @@ It is highly recommended you set the following environment values before startin | 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 | From be0bdad55b7fb9b0b55a8ced27ac5b8d9cc5f3fd Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:33:19 -0500 Subject: [PATCH 081/119] Reverted to old spacing for server name description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ffacec..b10740e 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,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 | | "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 24ccf396ff22ae021b668e6ef09798070eda9f9a Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 08:36:09 -0500 Subject: [PATCH 082/119] Changed spacing to match current version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b10740e..0ea32b6 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,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 | | "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 e6c11cd3b643906de8163f2b7a05142431bab8db Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Fri, 26 Jan 2024 12:26:11 -0500 Subject: [PATCH 083/119] Updated to array style command --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index fe21462..4eac8f5 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -27,7 +27,7 @@ if [ -n "${SERVER_NAME}" ]; then fi if [ -n "${SERVER_DESCRIPTION}" ]; then - STARTCOMMAND="${STARTCOMMAND} -serverdescription=${SERVER_DESCRIPTION}" + STARTCOMMAND+=("-serverdescription=${SERVER_DESCRIPTION}") fi if [ -n "${SERVER_PASSWORD}" ]; then From 89eac14ae2d76c3c106a5ac95926aef9f0718534 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 04:50:11 -0500 Subject: [PATCH 084/119] Removed added comment --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 92c1f19..592f520 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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_DESCRIPTION="" volumes: From 201bdf0e8fc003a9f7055f932cc56b42726697bf Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 05:04:23 -0500 Subject: [PATCH 085/119] Updated links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a68c09..88239a9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Palworld Dedicated Server Docker [![Release](https://img.shields.io/github/v/release/thijsvanloef/palworld-server-docker)](https://github.com/thijsvanloef/palworld-server-docker/releases) -[![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker)](https://hub.docker.com/repository/docker/thijsvanloef/palworld-server-docker) -[![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/repository/docker/thijsvanloef/palworld-server-docker) +[![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) [![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) [![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) From b6afc2b917044689208f39625c662d4308c5c093 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 11:19:21 +0100 Subject: [PATCH 086/119] include readme versions --- README.md | 1 + docs/kr/README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 88239a9..05d52ce 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) [![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) [![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) +![Static Badge](https://img.shields.io/badge/README-0.16.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md) [View on Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) diff --git a/docs/kr/README.md b/docs/kr/README.md index 1b7fd7b..541188f 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -5,6 +5,7 @@ ![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) +![Static Badge](https://img.shields.io/badge/README-0.15.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md) [Docker Hub에서 보기](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) From 408be18139357eae5366ace31cda41cdcec0ebd3 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 11:23:14 +0100 Subject: [PATCH 087/119] add links to shield --- README.md | 2 +- docs/kr/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05d52ce..0a978fa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) [![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) [![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) -![Static Badge](https://img.shields.io/badge/README-0.16.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md) +[![Static Badge](https://img.shields.io/badge/README-0.16.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md)](https://github.com/thijsvanloef/palworld-server-docker?tab=readme-ov-file#palworld-dedicated-server-docker) [View on Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) diff --git a/docs/kr/README.md b/docs/kr/README.md index 541188f..9d0e942 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -5,7 +5,7 @@ ![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) -![Static Badge](https://img.shields.io/badge/README-0.15.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md) +[![Static Badge](https://img.shields.io/badge/README-0.15.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md)](https://github.com/thijsvanloef/palworld-server-docker/blob/main/docs/kr/README.md) [Docker Hub에서 보기](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) From 8ac3ba44845212ad7002d248b8673d31e1ac81c8 Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 19:38:44 +0800 Subject: [PATCH 088/119] docs: Add Simplified Chinese translation of README.md --- README.md | 2 +- docs/zh-CN/README.md | 213 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 docs/zh-CN/README.md diff --git a/README.md b/README.md index 0a978fa..983e33d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [Chat with the community on Discord](https://discord.gg/UxBxStPAAE) -[English](/README.md) | [한국어](/docs/kr/README.md) +[English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/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/zh-CN/README.md b/docs/zh-CN/README.md new file mode 100644 index 0000000..b050a02 --- /dev/null +++ b/docs/zh-CN/README.md @@ -0,0 +1,213 @@ +# Palworld Dedicated Server Docker + +[![Release](https://img.shields.io/github/v/release/thijsvanloef/palworld-server-docker)](https://github.com/thijsvanloef/palworld-server-docker/releases) +[![Docker Pulls](https://img.shields.io/docker/pulls/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![Docker Stars](https://img.shields.io/docker/stars/thijsvanloef/palworld-server-docker)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) +[![Image Size](https://img.shields.io/docker/image-size/thijsvanloef/palworld-server-docker/latest)](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags) +[![Discord](https://img.shields.io/discord/1200397673329594459?logo=discord&label=Discord&link=https%3A%2F%2Fdiscord.gg%2FUxBxStPAAE)](https://discord.com/invite/UxBxStPAAE) +[![Static Badge](https://img.shields.io/badge/README-0.16.0-blue?link=https%3A%2F%2Fgithub.com%2Fthijsvanloef%2Fpalworld-server-docker%2Fblob%2Fmain%2FREADME.md)](https://github.com/thijsvanloef/palworld-server-docker?tab=readme-ov-file#palworld-dedicated-server-docker) + +在 [Docker Hub](https://hub.docker.com/r/thijsvanloef/palworld-server-docker) 查看 + +加入我们的 [Discord](https://discord.gg/UxBxStPAAE) + +[English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/README.md) + +> [!提示] +> 不知道从何开始? [看看这里吧!](https://tice.tips/containerization/palworld-server-docker/) + +这是一个 [Docker](https://docs.docker.com/engine/install/) 容器,可帮助您创建自己的 +[幻兽帕鲁](https://store.steampowered.com/app/1623730/Palworld/) 服务器 + +此容器经测试可正常在 (Ubuntu/Debian) 和 Windows 10 上运行 + +> [!注意] +> 目前, Xbox Game Pass/Xbox 主机玩家无法加入服务器 +> +> 他们只能通过邀请码加入,并且最多允许4人游玩 + +## 服务器配置需求 + +| 资源 | 最小 | 推荐 | +|----------|---------|------------------------------------------| +| CPU | 4 核 | 4+ 核以上 | +| 内存 | 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 # 可选但推荐 + - PLAYERS=16 # 可选但推荐 + - SERVER_PASSWORD="worldofpals" # 可选但推荐 + - MULTITHREADING=true + - RCON_ENABLED=true + - RCON_PORT=25575 + - TZ=Asia/Shanghai + - ADMIN_PASSWORD="adminPasswordHere" + - COMMUNITY=false # 如果您希望服务器显示在社区服务器页中,请启用此选项(注意配置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=Asia/Shanghai \ + -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 + +将此容器部署到 Kubernetes 的所有文件都位于[此文件夹中](k8s/). + +请按照 [此处](k8s/readme.md) 进行部署 + +#### 使用 helm 部署 + +请按照 [此处](./chart/README.md) 进行部署 + +### 环境变量 + +您可以使用以下值来修改服务器设置 +强烈建议您在启动服务器之前设置以下变量: + + +* PLAYERS +* PORT +* PUID +* PGID + +| 变量 | 信息 | 默认值 | 允许值 | +|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|------------------------------------------------------------------------------------------------------------| +| TZ | 备份服务器时所使用的时间戳 | UTC | 参见 [时区列表](https://zh.wikipedia.org/wiki/%E6%97%B6%E5%8C%BA%E5%88%97%E8%A1%A8) | +| PLAYERS* | 可同加入服务器的最大玩家数 | 16 | 1-32 | +| PORT* | 服务器将开放的 UDP 端口 | 8211 | 1024-65535 | +| PUID* | 服务器运行时的用户的 UID | 1000 | !0 | +| PGID* | 服务器运行时的组的 GID | 1000 | !0 | +| MULTITHREADING** | 提高多线程 CPU 环境下的性能。它最多对 4 个线程有效,分配超过这个数量的线程没有太大意义 | false | true/false | +| COMMUNITY | 服务器是否显示在社区服务器页中(建议设置SERVER_PASSWORD) | false | true/false | +| PUBLIC_IP | 您可以手动指定服务器 IP 地址。若未指定,将自动检测 | | x.x.x.x | +| PUBLIC_PORT | 您可以手动指定服务器端口。若未指定,将自动检测 | | 1024-65535 | +| SERVER_NAME | 服务器名称 | | "string" | +| SERVER_PASSWORD | 为服务器设置密码 | | "string" | +| ADMIN_PASSWORD | 为服务器设置管理员密码 | | "string" | +| UPDATE_ON_BOOT** | 在启动 Docker 容器时更新/安装服务器(需要在第一次运行时启用) | true | true/false | +| RCON_ENABLED*** | 为服务器启用 RCON | true | true/false | +| RCON_PORT | RCON 连接端口 | 25575 | 1024-65535 | +| QUERY_PORT | 用于与 Steam 服务器通信的查询端口 | 27015 | 1024-65535 | + +*强烈建议设置 + +** 启用该选项时,请确保您知道自己在做什么 + +*** 是使用docker命令保存并关闭服务器的必要条件 + +> [!重要] +> 环境变量中使用的布尔值区分大小写,因为它们是在 shell 脚本中使用的 +> +> 必须准确使用 `true` 或 `false` 设置它们,选项才能生效 + +### Game Ports + +| 端口 | 信息 | +|-------|------------------| +| 8211 | 游戏端口 (UDP) | +| 27015 | 查询端口 (UDP) | +| 25575 | RCON 端口 (TCP) | + +## 使用 RCON + +RCON 已在此项目中默认开启 +使用 RCON CLI 非常简单: + +```bash +docker exec -it palworld-server rcon-cli +``` + +这将打开一个 CLI,使用 RCON 使用服务器命令 + +### 命令列表 + +| 命令 | 信息 | +|----------------------------------|-----------------------------------------------------| +| Shutdown {秒} {信息} | 服务器将在{秒}后关闭 | +| DoExit | 强制关闭服务器 | +| Broadcast | 向服务器中所有玩家发送消息 | +| KickPlayer {SteamID} | 从服务器中踢出玩家 | +| BanPlayer {SteamID} | 从服务器中封禁玩家 | +| TeleportToPlayer {SteamID} | 传送到目标玩家 | +| TeleportToMe {SteamID} | 将目标玩家传送到身边 | +| ShowPlayers | 显示所有已连接玩家信息 | +| Info | 显示服务器信息 | +| Save | 保存游戏 | + +请查看 [官方文档](https://tech.palworldgame.com/server-commands) 以获取所有命令 + +## 创建备份 + +To create a backup of the game's save at the current point in time, use the command: + +```bash +docker exec palworld-server backup +``` + +执行后将在 `/palworld/backups/` 文件夹中生成备份 + +若启用了 RCON,服务器将在备份前进行保存 + +## 修改服务器设置 + +服务器启动时, `PalWorldSettings.ini` 文件将在 `/Pal/Saved/Config/LinuxServer` 文件夹中生成 + +所有更改将在服务器下次启动时生效 + +请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 + +有关服务器设置的更详细解释列表,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 + +## 报告问题/功能请求 + +可通过 [此链接](https://github.com/thijsvanloef/palworld-server-docker/issues/new/choose) 报告问题/功能请求 + +### 已知问题 + +已知问题已在 [Wiki](https://github.com/thijsvanloef/palworld-server-docker/wiki/Known-Issues) 中列出 From be4d7f052135b02e1e4e8ab5a1ca88f89c4bf266 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 13:07:35 +0100 Subject: [PATCH 089/119] fix linting errors --- docs/zh-CN/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index b050a02..eaf6cf3 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -110,7 +110,6 @@ docker run -d \ 您可以使用以下值来修改服务器设置 强烈建议您在启动服务器之前设置以下变量: - * PLAYERS * PORT * PUID @@ -202,7 +201,8 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -有关服务器设置的更详细解释列表,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 +有关服务器设置的更详细解释列表,请在 +[shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From eba551f0fc59af500f4979e7c07d2fb946d99d1e Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 20:18:41 +0800 Subject: [PATCH 090/119] docs: small translation fix --- docs/zh-CN/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index eaf6cf3..b086d3f 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -13,7 +13,7 @@ [English](/README.md) | [한국어](/docs/kr/README.md) | [简体中文](/docs/zh-CN/README.md) -> [!提示] +> [!TIP] > 不知道从何开始? [看看这里吧!](https://tice.tips/containerization/palworld-server-docker/) 这是一个 [Docker](https://docs.docker.com/engine/install/) 容器,可帮助您创建自己的 @@ -21,7 +21,7 @@ 此容器经测试可正常在 (Ubuntu/Debian) 和 Windows 10 上运行 -> [!注意] +> [!IMPORTANT] > 目前, Xbox Game Pass/Xbox 主机玩家无法加入服务器 > > 他们只能通过邀请码加入,并且最多允许4人游玩 @@ -140,7 +140,7 @@ docker run -d \ *** 是使用docker命令保存并关闭服务器的必要条件 -> [!重要] +> [!IMPORTANT] > 环境变量中使用的布尔值区分大小写,因为它们是在 shell 脚本中使用的 > > 必须准确使用 `true` 或 `false` 设置它们,选项才能生效 @@ -201,7 +201,7 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -有关服务器设置的更详细解释列表,请在 +服务器配置文件参数相关说明,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From 6223b4456ae38b1712e8a91a132394524fcbb5f2 Mon Sep 17 00:00:00 2001 From: JohnsonRan Date: Sat, 27 Jan 2024 20:28:44 +0800 Subject: [PATCH 091/119] fix linting errors --- docs/zh-CN/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index b086d3f..814dd2e 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -201,7 +201,7 @@ docker exec palworld-server backup 请注意,环境变量将始终覆盖对 `PalWorldSettings.ini` 所做的更改 -服务器配置文件参数相关说明,请在 +服务器配置文件参数相关说明,请在 [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) 中查看 ## 报告问题/功能请求 From efe31679e08774a3ec941189a54c132cb71506ea Mon Sep 17 00:00:00 2001 From: Filipe Souza Date: Sat, 27 Jan 2024 13:18:25 -0300 Subject: [PATCH 092/119] - Modified the chart, now the healthz container/service port is optional; --- chart/Chart.yaml | 2 +- chart/VALUES_SUMMARY.md | 10 ++++------ chart/templates/deployments.yaml | 2 ++ chart/templates/services.yaml | 6 ++++++ chart/values.yaml | 14 ++++++++------ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 1f65797..da1408a 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: palworld -version: 0.0.0 +version: 0.0.1 description: This chart can provide an rAthena emulator installation on a Kubernetes cluster. type: application keywords: diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index d95dab2..e2b7aef 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,8 +1,6 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) -![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) This chart can provide an rAthena emulator installation on a Kubernetes cluster. @@ -50,18 +48,18 @@ This chart can provide an rAthena emulator installation on a Kubernetes cluster. | server.service | dict | | Change the service configuration. If you change those, make sure to change the server.config and server.ports accordingly. | | server.service.annotations | object | `{}` | Additional annotations to the resources | | server.service.enabled | bool | `true` | Enables the creation of the service component. | +| server.service.healthz | dict | `{"enabled":false,"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" definition . Use if you need to create a TCP health check for load balancers on cloud services. | | server.service.labels | object | `{}` | Additional labels to the resources | | server.service.ports | dict | | Change the ports to be mapped to the service. If you change those, make sure to change the server.config and server.ports accordingly. | | server.service.ports[0] | dict | `{"name":"game","port":8211,"protocol":"UDP","targetPort":8211}` | The "game" port definition. If you change this, make sure to change the server.ports.game and server.config.port accordingly. | | server.service.ports[1] | dict | `{"name":"query","port":27015,"protocol":"UDP","targetPort":27015}` | The "query" port definition . If you change this, make sure to change the server.ports.query and server.config.query_port accordingly. | | server.service.ports[2] | dict | `{"name":"rcon","port":25575,"protocol":"UDP","targetPort":25575}` | The "rcon" port definition . If you change this, make sure to change the server.ports.rcon and server.config.rcon.port accordingly. | -| server.service.ports[3] | dict | `{"name":"healthz","port":80,"protocol":"TCP","targetPort":80}` | The "healthz" port definition . Used only to create a health check for load balancers on cloud services. | | server.service.type | string | `"LoadBalancer"` | The type of service to be created. | -| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"10Gi","storageClassName":""}` | Define some parameters for the storage volume | +| server.storage | dict | `{"external":false,"externalName":"","preventDelete":false,"size":"12Gi","storageClassName":""}` | Define some parameters for the storage volume | | server.storage.external | bool | `false` | Define if it will use an existing PVC containing the installation data. | | server.storage.externalName | bool | `""` | The external PVC name to use. | | server.storage.preventDelete | bool | `false` | Keeps helm from deleting the PVC. By default, helm does not delete pvcs. | -| server.storage.size | string | `"10Gi"` | The size of the pvc storage. | +| server.storage.size | string | `"12Gi"` | The size of the pvc storage. | | server.storage.storageClassName | string | `""` | The storage class name. | ---------------------------------------------- diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 73e9789..d322296 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -26,6 +26,7 @@ spec: {{- end }} spec: containers: + {{ if .Values.server.service.healthz.enabled }} - name: healthz image: "chussenot/tiny-server:latest" imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} @@ -33,6 +34,7 @@ spec: - name: healthz containerPort: 80 protocol: TCP + {{ end }} - name: server image: "{{ .Values.server.image.name }}:{{ .Values.server.image.tag }}" imagePullPolicy: {{ .Values.server.image.imagePullPolicy }} diff --git a/chart/templates/services.yaml b/chart/templates/services.yaml index a7ff4e2..2aa7fba 100644 --- a/chart/templates/services.yaml +++ b/chart/templates/services.yaml @@ -22,6 +22,12 @@ spec: selector: app.kubernetes.io/component: "{{ .Release.Name }}-server" ports: + {{ if .Values.server.service.healthz.enabled }} + - name: {{ .Values.server.service.healthz.name }} + port: {{ .Values.server.service.healthz.port }} + protocol: {{ .Values.server.service.healthz.protocol }} + targetPort: {{ .Values.server.service.healthz.targetPort }} + {{ end }} {{- with .Values.server.service.ports }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 3c53bf2..1950c97 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -69,6 +69,14 @@ server: labels: { } # -- (string) The type of service to be created. type: LoadBalancer + # -- (dict) The "healthz" definition . + # Use if you need to create a TCP health check for load balancers on cloud services. + healthz: + enabled: false + name: healthz + port: 80 + protocol: TCP + targetPort: 80 # -- (dict) Change the ports to be mapped to the service. # If you change those, make sure to change the server.config and server.ports accordingly. # @notationType -- bigValue @@ -91,12 +99,6 @@ server: port: 25575 protocol: UDP targetPort: 25575 - # -- (dict) The "healthz" port definition . - # Used only to create a health check for load balancers on cloud services. - - name: healthz - port: 80 - protocol: TCP - targetPort: 80 # -- (dict) Change the game server configuration. # If you change those, make sure to change the service.ports and server.ports accordingly. # Those are directly connected with the container image, providing multiple environment variables to the scripts. From 2082667b2a4fcb633e8835436efa5f83e8e471ad Mon Sep 17 00:00:00 2001 From: Twinki Date: Sat, 27 Jan 2024 12:27:11 -0500 Subject: [PATCH 093/119] Cleanup workflows --- .github/workflows/docker-hub.yml | 28 +++++++---------- .github/workflows/linting.yml | 54 +++++++++++++++++++------------- .github/workflows/release.yml | 19 +++++------ 3 files changed, 55 insertions(+), 46 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 9e0ceaa..087d568 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -1,36 +1,32 @@ -name: Docker-Image-Dev -on: +name: Developer image +on: push: - branches: [ main ] + branches: [main] jobs: push: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Login to DockerHub + - name: Docker - Login uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Docker meta + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: - # list of Docker images to use as base name for tags - images: | - ${{ github.repository }} - # generate Docker tags based on the following events/attributes - tags: | - type=raw,value=dev - # always generate latest tag on push + images: ${{ github.repository }} + tags: type=raw,value=dev + flavor: latest=false - - name: Build and push to DockerHub - id: docker_build + - name: Docker - Build / Push uses: docker/build-push-action@v5 with: push: true tags: | - ${{ steps.meta.outputs.tags }} \ No newline at end of file + ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0972a7c..efc3156 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,36 +1,48 @@ name: Linting -on: [pull_request] +on: + pull_request: +run-name: Pull request - ${{ github.event.pull_request.number }} jobs: shellcheck: + name: Lint - Shell runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master + - name: Checkout + uses: actions/checkout@v4 + + - name: Shellcheck + uses: ludeeus/action-shellcheck@2.0.0 + dockerlint: + name: Lint - Docker runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - - uses: hadolint/hadolint-action@v2.0.0 + - name: Checkout + uses: actions/checkout@v4 + + - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile - lint: 'hadolint' + markdownlint: + name: Lint - Markdown runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v2 - - uses: DavidAnson/markdownlint-cli2-action@v15 - with: - config: '.markdownlint.jsonc' - globs: '**/*.md' - test-build: - runs-on: ubuntu-latest - steps: - - name: Build the Image - uses: docker/build-push-action@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint - Markdown + uses: DavidAnson/markdownlint-cli2-action@v15 with: - push: false \ No newline at end of file + config: ".markdownlint.jsonc" + globs: "**/*.md" + + test-build: + name: Docker - Build + runs-on: ubuntu-latest + steps: + - name: Docker - Build + uses: docker/build-push-action@v5 + with: + push: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8b91be..b94b3f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ name: Release -on: +on: release: types: [published] @@ -7,15 +7,16 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Login to DockerHub - uses: docker/login-action@v3 + - name: Docker - Login + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Docker meta + - name: Docker - Metadata id: meta uses: docker/metadata-action@v5 with: @@ -28,11 +29,11 @@ jobs: type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}} # always generate latest tag on push - flavor: | - latest=true - - name: Build and push to DockerHub & GitHub Packages + flavor: latest=true + + - name: Docker - Build / Push id: docker_build uses: docker/build-push-action@v5 with: push: true - tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }} From 46470c49e804472571fd4a18d5c41bf968f37ca4 Mon Sep 17 00:00:00 2001 From: Twinki Date: Sat, 27 Jan 2024 12:34:34 -0500 Subject: [PATCH 094/119] Tweaks --- .github/workflows/docker-hub.yml | 3 +-- .github/workflows/release.yml | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 087d568..d272619 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -28,5 +28,4 @@ jobs: uses: docker/build-push-action@v5 with: push: true - tags: | - ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b94b3f9..df8c48f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,15 +20,12 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - # list of Docker images to use as base name for tags - images: | - ${{ github.repository }} + images: ${{ github.repository }} # generate Docker tags based on the following events/attributes tags: | type=semver,pattern=v{{version}} type=semver,pattern=v{{major}}.{{minor}} type=semver,pattern=v{{major}} - # always generate latest tag on push flavor: latest=true - name: Docker - Build / Push From 2396746865ba26c545854ac83c315107e05a107f Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:09:50 +0100 Subject: [PATCH 095/119] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2dc6a85 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +thijs@loef.dev. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 3cafebe14b8fbb2c62218887e0bacfcd7538a119 Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:14:19 +0100 Subject: [PATCH 096/119] Create dependabot.yml --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a458254 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "docker" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" From a6b7a666d101f73113c8ddf72c70c4cc8100d88c Mon Sep 17 00:00:00 2001 From: Thijs van Loef <58031337+thijsvanloef@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:17:45 +0100 Subject: [PATCH 097/119] Create SECURITY.md --- SECURITY.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..f5a4e7e --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,6 @@ +# Security Policy + +## Reporting a Vulnerability + +Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). +I try to respond to vulnerability reports within 48 hours. From 106102c7b938b657543d7289bd174a8ca65bca23 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 21:41:30 +0100 Subject: [PATCH 098/119] fix linting issues, and change badge style --- chart/VALUES_SUMMARY.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chart/VALUES_SUMMARY.md b/chart/VALUES_SUMMARY.md index e2b7aef..49d3222 100644 --- a/chart/VALUES_SUMMARY.md +++ b/chart/VALUES_SUMMARY.md @@ -1,6 +1,8 @@ # palworld -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational) +![Type: application](https://img.shields.io/badge/Type-application-informational) +![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational) This chart can provide an rAthena emulator installation on a Kubernetes cluster. From 3802a87bf9f96c9f2fc719bd07db0daded2f344a Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sat, 27 Jan 2024 21:44:48 +0100 Subject: [PATCH 099/119] fix linting errors --- CODE_OF_CONDUCT.md | 8 ++++---- SECURITY.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2dc6a85..250ceb0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -thijs@loef.dev. +[thijs@loef.dev](mailto:thijs@loef.dev). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the @@ -116,7 +116,7 @@ the community. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at +[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). diff --git a/SECURITY.md b/SECURITY.md index f5a4e7e..3acea88 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,5 +2,5 @@ ## Reporting a Vulnerability -Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). -I try to respond to vulnerability reports within 48 hours. +Please report (suspected) vulnerabilities at [the security page](https://github.com/thijsvanloef/palworld-server-docker/security). +I try to respond to vulnerability reports within 48 hours. From 9260eff1077ed22016baac38dde9fb62a59575e7 Mon Sep 17 00:00:00 2001 From: Luigi Guevara Date: Sun, 28 Jan 2024 00:57:52 +0100 Subject: [PATCH 100/119] Updating readme documentation with latest SERVER_DESCRIPTION environment variable --- README.md | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 983e33d..1653eba 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ services: - 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" + - SERVER_DESCRIPTION="Awesome World of Pal" volumes: - ./palworld:/palworld/ ``` @@ -90,6 +91,7 @@ docker run -d \ -e SERVER_PASSWORD="worldofpals" \ -e COMMUNITY=false \ -e SERVER_NAME="World of Pals" \ + -e SERVER_DESCRIPTION="Awesome World of Pal" \ --restart unless-stopped \ thijsvanloef/palworld-server-docker:latest @@ -115,24 +117,25 @@ It is highly recommended you set the following environment values before startin * PUID * PGID -| 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-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 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 | -| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | -| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | -| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | +| 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-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 server | | "string" | +| SERVER_DESCRIPTION | Your server Description | | "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 | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | +| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | +| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | *highly recommended to set From fdfffc47d8aac67864ead6c2a89ef5967ab86e31 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 19:49:43 -0500 Subject: [PATCH 101/119] Minimized processes running as root. --- Dockerfile | 7 ++++--- scripts/backup.sh | 4 ++++ scripts/init.sh | 10 +++------- scripts/start.sh | 7 ++++++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 137cf38..363306a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ - mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli + mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ + ln -s /home/steam/server/rcon.yaml /root/rcon.yaml ENV PORT= \ PUID=1000 \ @@ -31,8 +32,8 @@ ENV PORT= \ SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ -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 +RUN chmod u+x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ + ln -s /home/steam/server/backup.sh /usr/local/bin/backup WORKDIR /home/steam/server diff --git a/scripts/backup.sh b/scripts/backup.sh index 82e75eb..61911be 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -9,4 +9,8 @@ FILE_PATH="/palworld/backups/palworld-save-${DATE}.tar.gz" cd /palworld/Pal/ || exit tar -zcf "$FILE_PATH" "Saved/" + +if [ $(id -u) -eq 0 ]; then + chown steam:steam "$FILE_PATH" +fi echo "backup created at $FILE_PATH" diff --git a/scripts/init.sh b/scripts/init.sh index bbf91a4..24c3fac 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -10,12 +10,7 @@ else fi mkdir -p /palworld/backups -chown -R steam:steam /palworld - -if [ "${UPDATE_ON_BOOT}" = true ]; then - printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m\n" - su steam -c '/home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit' -fi +chown -R steam:steam /palworld /home/steam/ term_handler() { if [ "${RCON_ENABLED}" = true ]; then @@ -29,6 +24,7 @@ term_handler() { trap 'term_handler' SIGTERM -./start.sh & +su steam -c ./start.sh & +# Process ID of su killpid="$!" wait $killpid diff --git a/scripts/start.sh b/scripts/start.sh index 2d83c36..bef212f 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ "${UPDATE_ON_BOOT}" = true ]; then + printf "\e[0;32m*****STARTING INSTALL/UPDATE*****\e[0m\n" + /home/steam/steamcmd/steamcmd.sh +force_install_dir "/palworld" +login anonymous +app_update 2394010 validate +quit +fi + STARTCOMMAND=("./PalServer.sh") if [ -n "${PORT}" ]; then @@ -81,5 +86,5 @@ EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" echo "bash -c '${STARTCOMMAND[*]}'" -su steam -c "bash -c '${STARTCOMMAND[*]}'" +"${STARTCOMMAND[@]}" From 763c06774a3c700131a028d725535caf13aad6af Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:01:33 -0500 Subject: [PATCH 102/119] Removed su in start.sh --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index bef212f..6ee233a 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -61,7 +61,7 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld printf "\e[0;32m*****GENERATING CONFIG*****\e[0m\n" # Server will generate all ini files after first run. - su steam -c "timeout --preserve-status 15s ./PalServer.sh 1> /dev/null " + timeout --preserve-status 15s ./PalServer.sh 1> /dev/null # Wait for shutdown sleep 5 From e8089b8f3cfa958c2cea8a2f06c51f974cb20b3f Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:34:20 -0500 Subject: [PATCH 103/119] Removed directory to remove error. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 363306a..e9a853a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ - ln -s /home/steam/server/rcon.yaml /root/rcon.yaml + ln -s /home/steam/server/rcon.yaml /root/rcon.yaml && \ + rmdir /tmp/dumps ENV PORT= \ PUID=1000 \ From ac382af05703636e0c3caf8eb57f6889830a7d16 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:40:08 -0500 Subject: [PATCH 104/119] Added quotes --- scripts/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup.sh b/scripts/backup.sh index 61911be..bf797b7 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -10,7 +10,7 @@ cd /palworld/Pal/ || exit tar -zcf "$FILE_PATH" "Saved/" -if [ $(id -u) -eq 0 ]; then +if [ "$(id -u)" -eq 0 ]; then chown steam:steam "$FILE_PATH" fi echo "backup created at $FILE_PATH" From d93330e1d710f7656938b436e4cecb1041dec609 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:47:25 -0500 Subject: [PATCH 105/119] Removed symbolic links --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9a853a..5fd8106 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz && \ mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli && \ - ln -s /home/steam/server/rcon.yaml /root/rcon.yaml && \ rmdir /tmp/dumps ENV PORT= \ @@ -33,8 +32,8 @@ ENV PORT= \ SERVER_DESCRIPTION= COPY ./scripts/* /home/steam/server/ -RUN chmod u+x /home/steam/server/init.sh /home/steam/server/start.sh /home/steam/server/backup.sh && \ - ln -s /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 f1d1ade290ba9e4788ab175fae6eba8a9edc128b Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 21:48:13 -0500 Subject: [PATCH 106/119] Added spacing --- scripts/backup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/backup.sh b/scripts/backup.sh index bf797b7..43eecb4 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -13,4 +13,5 @@ tar -zcf "$FILE_PATH" "Saved/" if [ "$(id -u)" -eq 0 ]; then chown steam:steam "$FILE_PATH" fi + echo "backup created at $FILE_PATH" From 6330c86fe9aba07e1eef83796528333ae1a209d0 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 22:08:54 -0500 Subject: [PATCH 107/119] Replaced * with @ to match --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6ee233a..5bc0391 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[*]}'" +echo "bash -c '${STARTCOMMAND[@]}'" "${STARTCOMMAND[@]}" From e0d4e6c48f17a603ce4b2b39f0c8e8a2acefc48f Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 22:17:48 -0500 Subject: [PATCH 108/119] Changed back to [*] --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 5bc0391..6ee233a 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[@]}'" +echo "bash -c '${STARTCOMMAND[*]}'" "${STARTCOMMAND[@]}" From b8e64f8e29fa2db44d7db359c6813bec80ce41d9 Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:25:13 -0500 Subject: [PATCH 109/119] Updated readme to explain when the settings can be modified --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 983e33d..fd12ea5 100644 --- a/README.md +++ b/README.md @@ -197,10 +197,13 @@ The server will run a save before the backup if rcon is enabled. When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` -Any changes made there will be applied to the Server on next boot. +Any changes made while the server is live will be overridden. 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. + For a more detailed list of explanations of server settings go to: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html) ## Reporting Issues/Feature Requests From 0ff6286218dbab8ab11de48652b215ca19909255 Mon Sep 17 00:00:00 2001 From: MinJae Kim <33440010+minjae9610@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:51:58 +0900 Subject: [PATCH 110/119] Translate more untranslated content --- docs/kr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kr/README.md b/docs/kr/README.md index 9d0e942..6632216 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -177,7 +177,7 @@ docker exec -it palworld-server rcon-cli | Info | 서버 정보를 표시합니다. | | Save | 월드 정보를 저장합니다. | -For a full list of commands go to: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) +전체 명령어 목록을 보려면 다음으로 이동하세요.: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands) ## 백업 만들기 From 9de1b91cc7e2b5db97df3412adc1cc007699df3e Mon Sep 17 00:00:00 2001 From: "Carlos M. Martinez" Date: Sat, 27 Jan 2024 23:52:10 -0500 Subject: [PATCH 111/119] Updated echo for start command to reflect what is being executed. --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start.sh b/scripts/start.sh index 6ee233a..c60c58b 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -85,6 +85,6 @@ default: EOL printf "\e[0;32m*****STARTING SERVER*****\e[0m\n" -echo "bash -c '${STARTCOMMAND[*]}'" +echo "${STARTCOMMAND[*]}" "${STARTCOMMAND[@]}" From f488ce62d62d04ef8b6f513c1c07f8363acdc3fc Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:10:40 +0100 Subject: [PATCH 112/119] Allow changing of all config trough ENV --- scripts/start.sh | 216 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 216 insertions(+) diff --git a/scripts/start.sh b/scripts/start.sh index 2d83c36..26909f1 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -63,6 +63,222 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi +if [ -n "${DIFFICULTY}" ]; then + echo "DIFFICULTY=$DIFFICULTY" + sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DAYTIME_SPEEDRATE}" ]; then + echo "DAYTIME_SPEEDRATE=$DAYTIME_SPEEDRATE" + sed -E -i "s/DayTimeSpeedRate=[+-]?([0-9]*[.])?[0-9]+/DayTimeSpeedRate=$DAYTIME_SPEEDRATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${NIGHTTIME_SPEEDRATE}" ]; then + echo "NIGHTTIME_SPEEDRATE=$NIGHTTIME_SPEEDRATE" + sed -E -i "s/NightTimeSpeedRate=[+-]?([0-9]*[.])?[0-9]+/NightTimeSpeedRate=$NIGHTTIME_SPEEDRATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${EXP_RATE}" ]; then + echo "EXP_RATE=$EXP_RATE" + sed -E -i "s/ExpRate=[+-]?([0-9]*[.])?[0-9]+/ExpRate=$EXP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_CAPTURE_RATE}" ]; then + echo "PAL_CAPTURE_RATE=$PAL_CAPTURE_RATE" + sed -E -i "s/PalCaptureRate=[+-]?([0-9]*[.])?[0-9]+/PalCaptureRate=$PAL_CAPTURE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_SPAWN_NUM_RATE}" ]; then + echo "PAL_SPAWN_NUM_RATE=$PAL_SPAWN_NUM_RATE" + sed -E -i "s/PalSpawnNumRate=[+-]?([0-9]*[.])?[0-9]+/PalSpawnNumRate=$PAL_SPAWN_NUM_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_DAMAGE_RATE_ATTACK}" ]; then + echo "PAL_DAMAGE_RATE_ATTACK=$PAL_DAMAGE_RATE_ATTACK" + sed -E -i "s/PalDamageRateAttack=[+-]?([0-9]*[.])?[0-9]+/PalDamageRateAttack=$PAL_DAMAGE_RATE_ATTACK/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_DAMAGE_RATE_DEFENSE}" ]; then + echo "PAL_DAMAGE_RATE_DEFENSE=$PAL_DAMAGE_RATE_DEFENSE" + sed -E -i "s/PalDamageRateDefense=[+-]?([0-9]*[.])?[0-9]+/PalDamageRateDefense=$PAL_DAMAGE_RATE_DEFENSE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_DAMAGE_RATE_ATTACK}" ]; then + echo "PLAYER_DAMAGE_RATE_ATTACK=$PLAYER_DAMAGE_RATE_ATTACK" + sed -E -i "s/PlayerDamageRateAttack=[+-]?([0-9]*[.])?[0-9]+/PlayerDamageRateAttack=$PLAYER_DAMAGE_RATE_ATTACK/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_DAMAGE_RATE_DEFENSE}" ]; then + echo "PLAYER_DAMAGE_RATE_DEFENSE=$PLAYER_DAMAGE_RATE_DEFENSE" + sed -E -i "s/PlayerDamageRateDefense=[+-]?([0-9]*[.])?[0-9]+/PlayerDamageRateDefense=$PLAYER_DAMAGE_RATE_DEFENSE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_STOMACH_DECREASE_RATE}" ]; then + echo "PLAYER_STOMACH_DECREASE_RATE=$PLAYER_STOMACH_DECREASE_RATE" + sed -E -i "s/PlayerStomachDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PlayerStomachDecreaceRate=$PLAYER_STOMACH_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_STAMINA_DECREASE_RATE}" ]; then + echo "PLAYER_STAMINA_DECREASE_RATE=$PLAYER_STAMINA_DECREASE_RATE" + sed -E -i "s/PlayerStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PlayerStaminaDecreaceRate=$PLAYER_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_AUTO_HP_REGEN_RATE}" ]; then + echo "PLAYER_AUTO_HP_REGEN_RATE=$PLAYER_AUTO_HP_REGEN_RATE" + sed -E -i "s/PlayerAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PlayerAutoHPRegeneRate=$PLAYER_AUTO_HP_REGEN_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP}" ]; then + echo "PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP=$PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP" + sed -E -i "s/PlayerAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PlayerAutoHpRegeneRateInSleep=$PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_STOMACH_DECREASE_RATE}" ]; then + echo "PAL_STOMACH_DECREASE_RATE=$PAL_STOMACH_DECREASE_RATE" + sed -E -i "s/PalStomachDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStomachDecreaceRate=$PAL_STOMACH_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_STAMINA_DECREASE_RATE}" ]; then + echo "PAL_STAMINA_DECREASE_RATE=$PAL_STAMINA_DECREASE_RATE" + sed -E -i "s/PalStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStaminaDecreaceRate=$PAL_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_AUTO_HP_REGENE_RATE}" ]; then + echo "PAL_AUTO_HP_REGENE_RATE=$PAL_AUTO_HP_REGENE_RATE" + sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGENE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_AUTO_HP_REGENE_RATE_IN_SLEEP}" ]; then + echo "PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DAMAGE_RATE=$BUILD_OBJECT_DAMAGE_RATE" + sed -E -i "s/BuildObjectDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDamageRate=$BUILD_OBJECT_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" + sed -E -i "s/BuildObjectDeteriorationDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDeteriorationDamageRate=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then + echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_DROP_RATE}" ]; then + echo "COLLECTION_DROP_RATE=$COLLECTION_DROP_RATE" + sed -E -i "s/CollectionDropRate=[+-]?([0-9]*[.])?[0-9]+/CollectionDropRate=$COLLECTION_DROP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_OBJECT_HP_RATE}" ]; then + echo "COLLECTION_OBJECT_HP_RATE=$COLLECTION_OBJECT_HP_RATE" + sed -E -i "s/CollectionObjectHpRate=[+-]?([0-9]*[.])?[0-9]+/CollectionObjectHpRate=$COLLECTION_OBJECT_HP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COLLECTION_OBJECT_RESPAWN_SPEED_RATE}" ]; then + echo "COLLECTION_OBJECT_RESPAWN_SPEED_RATE=$COLLECTION_OBJECT_RESPAWN_SPEED_RATE" + sed -E -i "s/CollectionObjectRespawnSpeedRate=[+-]?([0-9]*[.])?[0-9]+/CollectionObjectRespawnSpeedRate=$COLLECTION_OBJECT_RESPAWN_SPEED_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENEMY_DROP_ITEM_RATE}" ]; then + echo "ENEMY_DROP_ITEM_RATE=$ENEMY_DROP_ITEM_RATE" + sed -E -i "s/EnemyDropItemRate=[+-]?([0-9]*[.])?[0-9]+/EnemyDropItemRate=$ENEMY_DROP_ITEM_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DEATH_PENALTY}" ]; then + echo "DEATH_PENALTY=$DEATH_PENALTY" + sed -E -i "s/DeathPenalty=[a-zA-Z]*/DeathPenalty=$DEATH_PENALTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_PLAYER_TO_PLAYER_DAMAGE}" ]; then + echo "ENABLE_PLAYER_TO_PLAYER_DAMAGE=$ENABLE_PLAYER_TO_PLAYER_DAMAGE" + sed -E -i "s/bEnablePlayerToPlayerDamage=[a-zA-Z]*/bEnablePlayerToPlayerDamage=$ENABLE_PLAYER_TO_PLAYER_DAMAGE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_FRIENDLY_FIRE}" ]; then + echo "ENABLE_FRIENDLY_FIRE=$ENABLE_FRIENDLY_FIRE" + sed -E -i "s/bEnableFriendlyFire=[a-zA-Z]*/bEnableFriendlyFire=$ENABLE_FRIENDLY_FIRE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_INVADER_ENEMY}" ]; then + echo "ENABLE_INVADER_ENEMY=$ENABLE_INVADER_ENEMY" + sed -E -i "s/bEnableInvaderEnemy=[a-zA-Z]*/bEnableInvaderEnemy=$ENABLE_INVADER_ENEMY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ACTIVE_UNKO}" ]; then + echo "ACTIVE_UNKO=$ACTIVE_UNKO" + sed -E -i "s/bActiveUNKO=[a-zA-Z]*/bActiveUNKO=$ACTIVE_UNKO/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_AIM_ASSIST_PAD}" ]; then + echo "ENABLE_AIM_ASSIST_PAD=$ENABLE_AIM_ASSIST_PAD" + sed -E -i "s/bEnableAimAssistPad=[a-zA-Z]*/bEnableAimAssistPad=$ENABLE_AIM_ASSIST_PAD/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_AIM_ASSIST_KEYBOARD}" ]; then + echo "ENABLE_AIM_ASSIST_KEYBOARD=$ENABLE_AIM_ASSIST_KEYBOARD" + sed -E -i "s/bEnableAimAssistKeyboard=[a-zA-Z]*/bEnableAimAssistKeyboard=$ENABLE_AIM_ASSIST_KEYBOARD/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_MAX_NUM}" ]; then + echo "DROP_ITEM_MAX_NUM=$DROP_ITEM_MAX_NUM" + sed -E -i "s/DropItemMaxNum=[0-9]*/DropItemMaxNum=$DROP_ITEM_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_MAX_NUM_UNKO}" ]; then + echo "DROP_ITEM_MAX_NUM_UNKO=$DROP_ITEM_MAX_NUM_UNKO" + sed -E -i "s/DropItemMaxNum_UNKO=[0-9]*/DropItemMaxNum_UNKO=$DROP_ITEM_MAX_NUM_UNKO/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BASE_CAMP_MAX_NUM}" ]; then + echo "BASE_CAMP_MAX_NUM=$BASE_CAMP_MAX_NUM" + sed -E -i "s/BaseCampMaxNum=[0-9]*/BaseCampMaxNum=$BASE_CAMP_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BASE_CAMP_WORKER_MAXNUM}" ]; then + echo "BASE_CAMP_WORKER_MAXNUM=$BASE_CAMP_WORKER_MAXNUM" + sed -E -i "s/BaseCampWorkerMaxNum=[0-9]*/BaseCampWorkerMaxNum=$BASE_CAMP_WORKER_MAXNUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${DROP_ITEM_ALIVE_MAX_HOURS}" ]; then + echo "DROP_ITEM_ALIVE_MAX_HOURS=$DROP_ITEM_ALIVE_MAX_HOURS" + sed -E -i "s/DropItemAliveMaxHours=[+-]?([0-9]*[.])?[0-9]+/DropItemAliveMaxHours=$DROP_ITEM_ALIVE_MAX_HOURS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${AUTO_RESET_GUILD_NO_ONLINE_PLAYERS}" ]; then + echo "AUTO_RESET_GUILD_NO_ONLINE_PLAYERS=$AUTO_RESET_GUILD_NO_ONLINE_PLAYERS" + sed -E -i "s/bAutoResetGuildNoOnlinePlayers=[a-zA-Z]*/bAutoResetGuildNoOnlinePlayers=$AUTO_RESET_GUILD_NO_ONLINE_PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS}" ]; then + echo "AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS=$AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS" + sed -E -i "s/AutoResetGuildTimeNoOnlinePlayers=[+-]?([0-9]*[.])?[0-9]+/AutoResetGuildTimeNoOnlinePlayers=$AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${GUILD_PLAYER_MAX_NUM}" ]; then + echo "GUILD_PLAYER_MAX_NUM=$GUILD_PLAYER_MAX_NUM" + sed -E -i "s/GuildPlayerMaxNum=[0-9]*/GuildPlayerMaxNum=$GUILD_PLAYER_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PAL_EGG_DEFAULT_HATCHING_TIME}" ]; then + echo "PAL_EGG_DEFAULT_HATCHING_TIME=$PAL_EGG_DEFAULT_HATCHING_TIME" + sed -E -i "s/PalEggDefaultHatchingTime=[+-]?([0-9]*[.])?[0-9]+/PalEggDefaultHatchingTime=$PAL_EGG_DEFAULT_HATCHING_TIME/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${WORK_SPEED_RATE}" ]; then + echo "WORK_SPEED_RATE=$WORK_SPEED_RATE" + sed -E -i "s/WorkSpeedRate=[+-]?([0-9]*[.])?[0-9]+/WorkSpeedRate=$WORK_SPEED_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_MULTIPLAY}" ]; then + echo "IS_MULTIPLAY=$IS_MULTIPLAY" + sed -E -i "s/bIsMultiplay=[a-zA-Z]*/bIsMultiplay=$IS_MULTIPLAY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_PVP}" ]; then + echo "IS_PVP=$IS_PVP" + sed -E -i "s/bIsPvP=[a-zA-Z]*/bIsPvP=$IS_PVP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP}" ]; then + echo "CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=$CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP" + sed -E -i "s/bCanPickupOtherGuildDeathPenaltyDrop=[a-zA-Z]*/bCanPickupOtherGuildDeathPenaltyDrop=$CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_NON_LOGIN_PENALTY}" ]; then + echo "ENABLE_NON_LOGIN_PENALTY=$ENABLE_NON_LOGIN_PENALTY" + sed -E -i "s/bEnableNonLoginPenalty=[a-zA-Z]*/bEnableNonLoginPenalty=$ENABLE_NON_LOGIN_PENALTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_FAST_TRAVEL}" ]; then + echo "ENABLE_FAST_TRAVEL=$ENABLE_FAST_TRAVEL" + sed -E -i "s/bEnableFastTravel=[a-zA-Z]*/bEnableFastTravel=$ENABLE_FAST_TRAVEL/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${IS_START_LOCATION_SELECT_BY_MAP}" ]; then + echo "IS_START_LOCATION_SELECT_BY_MAP=$IS_START_LOCATION_SELECT_BY_MAP" + sed -E -i "s/bIsStartLocationSelectByMap=[a-zA-Z]*/bIsStartLocationSelectByMap=$IS_START_LOCATION_SELECT_BY_MAP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${EXIST_PLAYER_AFTER_LOGOUT}" ]; then + echo "EXIST_PLAYER_AFTER_LOGOUT=$EXIST_PLAYER_AFTER_LOGOUT" + sed -E -i "s/bExistPlayerAfterLogout=[a-zA-Z]*/bExistPlayerAfterLogout=$EXIST_PLAYER_AFTER_LOGOUT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${ENABLE_DEFENSE_OTHER_GUILD_PLAYER}" ]; then + echo "ENABLE_DEFENSE_OTHER_GUILD_PLAYER=$ENABLE_DEFENSE_OTHER_GUILD_PLAYER" + sed -E -i "s/bEnableDefenseOtherGuildPlayer=[a-zA-Z]*/bEnableDefenseOtherGuildPlayer=$ENABLE_DEFENSE_OTHER_GUILD_PLAYER/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${COOP_PLAYER_MAX_NUM}" ]; then + echo "COOP_PLAYER_MAX_NUM=$COOP_PLAYER_MAX_NUM" + sed -E -i "s/CoopPlayerMaxNum=[0-9]*/CoopPlayerMaxNum=$COOP_PLAYER_MAX_NUM/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${REGION}" ]; then + echo "REGION=$REGION" + sed -E -i "s/Region=\"[^\"]*\"/Region=\"$REGION\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${USEAUTH}" ]; then + echo "USEAUTH=$USEAUTH" + sed -E -i "s/bUseAuth=[a-zA-Z]*/bUseAuth=$USEAUTH/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${BAN_LIST_URL}" ]; then + echo "BAN_LIST_URL=$BAN_LIST_URL" + sed -E -i "s~BanListURL=\"[^\"]*\"~BanListURL=\"$BAN_LIST_URL\"~" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi if [ -n "${RCON_ENABLED}" ]; then echo "RCON_ENABLED=${RCON_ENABLED}" sed -i "s/RCONEnabled=[a-zA-Z]*/RCONEnabled=$RCON_ENABLED/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini From 85dac84a39294db7203bbe054ac2ff1c7f8a6dc7 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:23:36 +0100 Subject: [PATCH 113/119] fix typo add docs --- README.md | 98 +++++++++++++++++++++++++++++++++++++++--------- scripts/start.sh | 12 +++--- 2 files changed, 87 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 28db4cc..89618d2 100644 --- a/README.md +++ b/README.md @@ -117,25 +117,25 @@ It is highly recommended you set the following environment values before startin * PUID * PGID -| 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-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 | +| 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-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 server | | "string" | -| SERVER_DESCRIPTION | Your server Description | | "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 | -| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | -| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | -| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | +| SERVER_NAME | A name for your server | | "string" | +| SERVER_DESCRIPTION | Your server Description | | "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 | +| RCON_ENABLED*** | Enable RCON for the Palworld server | true | true/false | +| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 | +| QUERY_PORT | Query port used to communicate with Steam servers | 27015 | 1024-65535 | *highly recommended to set @@ -198,6 +198,70 @@ The server will run a save before the backup if rcon is enabled. ## Editing Server Settings +### With Environment Variables + +> [!IMPORTANT] +> +> These Environment Variables/Settings are subject to change since the game is still in beta + +| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | +|-------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| +| NETSERVERMAXTICKRATE | Changes the TickRate of the server, be very careful with this setting! | 120 | 30-120 | +| DIFFICULTY | Game Difficulty: | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | +| EXP_RATE | EXP rate | 1.000000 | Float | +| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | +| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | +| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | +| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | +| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | +| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | +| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | +| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | +| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | +| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | +| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | All | `None`,`Item`,`ItemAndEquipment`,`All` | +| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | +| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | +| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | +| ACTIVE_UNKO | Enable UNKO | False | Boolean | +| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | +| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | +| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | +| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | +| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | +| BASE_CAMP_WORKER_MAXNUM | Maximum number of workers | 15 | Integer | +| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | +| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | +| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | +| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | +| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | +| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | +| IS_MULTIPLAY | Enable multiplayer | False | Boolean | +| IS_PVP | Enable PVP | False | Boolean | +| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | +| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | +| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | +| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | +| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | +| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | +| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | +| REGION | Area | | String | +| USEAUTH | Use authentication | True | Boolean | +| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | + +### Manually When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` Any changes made while the server is live will be overridden. diff --git a/scripts/start.sh b/scripts/start.sh index 26909f1..39bc821 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -127,13 +127,13 @@ if [ -n "${PAL_STAMINA_DECREASE_RATE}" ]; then echo "PAL_STAMINA_DECREASE_RATE=$PAL_STAMINA_DECREASE_RATE" sed -E -i "s/PalStaminaDecreaceRate=[+-]?([0-9]*[.])?[0-9]+/PalStaminaDecreaceRate=$PAL_STAMINA_DECREASE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${PAL_AUTO_HP_REGENE_RATE}" ]; then - echo "PAL_AUTO_HP_REGENE_RATE=$PAL_AUTO_HP_REGENE_RATE" - sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGENE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +if [ -n "${PAL_AUTO_HP_REGEN_RATE}" ]; then + echo "PAL_AUTO_HP_REGEN_RATE=$PAL_AUTO_HP_REGEN_RATE" + sed -E -i "s/PalAutoHPRegeneRate=[+-]?([0-9]*[.])?[0-9]+/PalAutoHPRegeneRate=$PAL_AUTO_HP_REGEN_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${PAL_AUTO_HP_REGENE_RATE_IN_SLEEP}" ]; then - echo "PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP" - sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGENE_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +if [ -n "${PAL_AUTO_HP_REGEN_RATE_IN_SLEEP}" ]; then + echo "PAL_AUTO_HP_REGEN_RATE_IN_SLEEP=$PAL_AUTO_HP_REGEN_RATE_IN_SLEEP" + sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$PAL_AUTO_HP_REGEN_RATE_IN_SLEEP/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi if [ -n "${BUILD_OBJECT_DAMAGE_RATE}" ]; then echo "BUILD_OBJECT_DAMAGE_RATE=$BUILD_OBJECT_DAMAGE_RATE" From 31e22fa1603caa0ea25ce7d0b7d1e739130962db Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 12:24:14 +0100 Subject: [PATCH 114/119] fix linting --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 89618d2..6adecf3 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,7 @@ The server will run a save before the backup if rcon is enabled. | BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | ### Manually + When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` Any changes made while the server is live will be overridden. From 4e86948094a0b43c49db58ea4addd35bb96251d2 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:00:03 +0100 Subject: [PATCH 115/119] update description --- README.md | 112 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 6adecf3..7085976 100644 --- a/README.md +++ b/README.md @@ -204,62 +204,62 @@ The server will run a save before the backup if rcon is enabled. > > These Environment Variables/Settings are subject to change since the game is still in beta -| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | -|-------------------------------------------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| -| NETSERVERMAXTICKRATE | Changes the TickRate of the server, be very careful with this setting! | 120 | 30-120 | -| DIFFICULTY | Game Difficulty: | None | `None`,`Normal`,`Difficult` | -| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | -| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | -| EXP_RATE | EXP rate | 1.000000 | Float | -| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | -| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | -| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | -| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | -| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | -| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | -| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | -| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | -| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | -| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | -| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval | 1.000000 | Float | -| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | -| DEATH_PENALTY | What will drop when you die | All | `None`,`Item`,`ItemAndEquipment`,`All` | -| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | -| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | -| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | -| ACTIVE_UNKO | Enable UNKO | False | Boolean | -| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | -| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | -| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | -| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | -| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | -| BASE_CAMP_WORKER_MAXNUM | Maximum number of workers | 15 | Integer | -| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | -| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | -| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | -| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | -| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | -| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | -| IS_MULTIPLAY | Enable multiplayer | False | Boolean | -| IS_PVP | Enable PVP | False | Boolean | -| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | -| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | -| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | -| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | -| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | -| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | -| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | -| REGION | Area | | String | -| USEAUTH | Use authentication | True | Boolean | -| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | +| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | +|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| +| NETSERVERMAXTICKRATE | Changes the TickRate of the server. | 120 | 30-120 | +| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | +| EXP_RATE | EXP earn rate | 1.000000 | Float | +| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | +| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | +| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | +| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | +| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | +| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | +| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | +| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | +| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | +| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | +| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | All | `None`,`Item`,`ItemAndEquipment`,`All` | +| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | +| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | +| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | +| ACTIVE_UNKO | Enable UNKO (?) | False | Boolean | +| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | +| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | +| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | +| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | +| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | +| BASE_CAMP_WORKER_MAXNUM | Maximum number of workers | 15 | Integer | +| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | +| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | +| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | +| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | +| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | +| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | +| IS_MULTIPLAY | Enable multiplayer | False | Boolean | +| IS_PVP | Enable PVP | False | Boolean | +| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | +| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | +| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | +| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | +| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | +| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | +| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | +| REGION | Region | | String | +| USEAUTH | Use authentication | True | Boolean | +| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | ### Manually From 7de59973a2c48080e97dd5b903c6ae27113a4a88 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:18:47 +0100 Subject: [PATCH 116/119] remove config map & remove duplicate --- k8s/configmap.yaml | 76 ---------------------------------------------- scripts/start.sh | 4 --- 2 files changed, 80 deletions(-) diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml index 6933b7e..7c9d854 100644 --- a/k8s/configmap.yaml +++ b/k8s/configmap.yaml @@ -15,79 +15,3 @@ data: 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" SERVER_DESCRIPTION: "" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: palworld-settings -data: - PalWorldSettings.ini: >- - [/Script/OnlineSubsystemUtils.IpNetDriver] - NetServerMaxTickRate=60 - - [/Script/Pal.PalGameWorldSettings] - - OptionSettings=( - Difficulty=None, - DayTimeSpeedRate=1.000000, - NightTimeSpeedRate=1.000000, - ExpRate=1.000000, - PalCaptureRate=1.000000, - PalSpawnNumRate=1.000000, - PalDamageRateAttack=1.000000, - PalDamageRateDefense=1.000000, - PlayerDamageRateAttack=1.000000, - PlayerDamageRateDefense=1.000000, - PlayerStomachDecreaceRate=1.000000, - PlayerStaminaDecreaceRate=1.000000, - PlayerAutoHPRegeneRate=1.000000, - PlayerAutoHpRegeneRateInSleep=1.000000, - PalStomachDecreaceRate=1.000000, - PalStaminaDecreaceRate=1.000000, - PalAutoHPRegeneRate=1.000000, - PalAutoHpRegeneRateInSleep=1.000000, - BuildObjectDamageRate=1.000000, - BuildObjectDeteriorationDamageRate=1.000000, - CollectionDropRate=1.000000, - CollectionObjectHpRate=1.000000, - CollectionObjectRespawnSpeedRate=1.000000, - EnemyDropItemRate=1.000000, - DeathPenalty=All, - bEnablePlayerToPlayerDamage=False, - bEnableFriendlyFire=False, - bEnableInvaderEnemy=True, - bActiveUNKO=False, - bEnableAimAssistPad=True, - bEnableAimAssistKeyboard=False, - DropItemMaxNum=3000, - DropItemMaxNum_UNKO=100, - BaseCampMaxNum=128, - BaseCampWorkerMaxNum=15, - DropItemAliveMaxHours=1.000000, - bAutoResetGuildNoOnlinePlayers=False, - AutoResetGuildTimeNoOnlinePlayers=72.000000, - GuildPlayerMaxNum=20, - PalEggDefaultHatchingTime=72.000000, - WorkSpeedRate=1.000000, - bIsMultiplay=False, - bIsPvP=False, - bCanPickupOtherGuildDeathPenaltyDrop=False, - bEnableNonLoginPenalty=True, - bEnableFastTravel=True, - bIsStartLocationSelectByMap=True, - bExistPlayerAfterLogout=False, - bEnableDefenseOtherGuildPlayer=False, - CoopPlayerMaxNum=4, - ServerPlayerMaxNum=32, - ServerName="Default Palworld Server", - ServerDescription="", - AdminPassword="", - ServerPassword="", - PublicPort=8211, - PublicIP="", - RCONEnabled=False, - RCONPort=25575, - Region="", - bUseAuth=True, - BanListURL="https://api.palworldgame.com/api/banlist.txt" - ) diff --git a/scripts/start.sh b/scripts/start.sh index 39bc821..25c98db 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -143,10 +143,6 @@ if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" sed -E -i "s/BuildObjectDeteriorationDamageRate=[+-]?([0-9]*[.])?[0-9]+/BuildObjectDeteriorationDamageRate=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi -if [ -n "${BUILD_OBJECT_DETERIORATION_DAMAGE_RATE}" ]; then - echo "BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE" - sed -E -i "s/PalAutoHpRegeneRateInSleep=[+-]?([0-9]*[.])?[0-9]+/PalAutoHpRegeneRateInSleep=$BUILD_OBJECT_DETERIORATION_DAMAGE_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini -fi if [ -n "${COLLECTION_DROP_RATE}" ]; then echo "COLLECTION_DROP_RATE=$COLLECTION_DROP_RATE" sed -E -i "s/CollectionDropRate=[+-]?([0-9]*[.])?[0-9]+/CollectionDropRate=$COLLECTION_DROP_RATE/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini From a0f8aef2a248b2a6cbf75515637b6e6d6c868281 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:31:07 +0100 Subject: [PATCH 117/119] remove references of configmap --- k8s/deployment.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index d7a1204..d94759f 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -39,13 +39,7 @@ spec: volumeMounts: - mountPath: /palworld name: datadir - - mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini - name: palworld-settings - subPath: PalWorldSettings.ini volumes: - name: datadir persistentVolumeClaim: claimName: palworld-server-datadir - - name: palworld-settings - configMap: - name: palworld-settings From 0c265e4b583d1d35c182f67b42df619f73bc28ea Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:52:03 +0100 Subject: [PATCH 118/119] fix readme errors --- README.md | 111 +++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 7085976..731e94a 100644 --- a/README.md +++ b/README.md @@ -204,62 +204,61 @@ The server will run a save before the backup if rcon is enabled. > > These Environment Variables/Settings are subject to change since the game is still in beta -| Variable | Description | Default Value | Allowed Value PLAYER_STOMACH_DECREASE_RATE | -|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------| -| NETSERVERMAXTICKRATE | Changes the TickRate of the server. | 120 | 30-120 | -| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | -| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | -| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | -| EXP_RATE | EXP earn rate | 1.000000 | Float | -| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | -| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | -| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | -| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | -| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | -| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | -| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | -| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | -| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | -| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | -| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | -| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | -| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | -| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | -| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval | 1.000000 | Float | -| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | -| DEATH_PENALTY | What will drop when you die | All | `None`,`Item`,`ItemAndEquipment`,`All` | -| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | -| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | -| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | -| ACTIVE_UNKO | Enable UNKO (?) | False | Boolean | -| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | -| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | -| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | -| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | -| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | -| BASE_CAMP_WORKER_MAXNUM | Maximum number of workers | 15 | Integer | -| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | -| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | -| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | -| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | -| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | -| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | -| IS_MULTIPLAY | Enable multiplayer | False | Boolean | -| IS_PVP | Enable PVP | False | Boolean | -| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | -| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | -| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | -| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | -| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | -| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | -| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | -| REGION | Region | | String | -| USEAUTH | Use authentication | True | Boolean | -| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | +| Variable | Description | Default Value | Allowed Value | +|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------| +| DIFFICULTY | Game Difficulty | None | `None`,`Normal`,`Difficult` | +| DAYTIME_SPEEDRATE | Day time speed - Smaller number means shorter days | 1.000000 | Float | +| NIGHTTIME_SPEEDRATE | Night time speed - Smaller number means shorter nights | 1.000000 | Float | +| EXP_RATE | EXP earn rate | 1.000000 | Float | +| PAL_CAPTURE_RATE | Pal capture rate | 1.000000 | Float | +| PAL_SPAWN_NUM_RATE | Pal appearance rate | 1.000000 | Float | +| PAL_DAMAGE_RATE_ATTACK | Damage from pals multipiler | 1.000000 | Float | +| PAL_DAMAGE_RATE_DEFENSE | Damage to pals multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_ATTACK | Damage from player multipiler | 1.000000 | Float | +| PLAYER_DAMAGE_RATE_DEFENSE | Damage to player multipiler | 1.000000 | Float | +| PLAYER_STOMACH_DECREASE_RATE | Player hunger depletion rate | 1.000000 | Float | +| PLAYER_STAMINA_DECREASE_RATE | Player stamina reduction rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE | Player auto HP regeneration rate | 1.000000 | Float | +| PLAYER_AUTO_HP_REGEN_RATE_IN_SLEEP | Player sleep HP regeneration rate | 1.000000 | Float | +| PAL_STOMACH_DECREASE_RATE | Pal hunger depletion rate | 1.000000 | Float | +| PAL_STAMINA_DECREASE_RATE | Pal stamina reduction rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE | Pal auto HP regeneration rate | 1.000000 | Float | +| PAL_AUTO_HP_REGEN_RATE_IN_SLEEP | Pal sleep health regeneration rate (in Palbox) | 1.000000 | Float | +| BUILD_OBJECT_DAMAGE_RATE | Damage to structure multipiler | 1.000000 | Float | +| BUILD_OBJECT_DETERIORATION_DAMAGE_RATE | Structure determination rate | 1.000000 | Float | +| COLLECTION_DROP_RATE | Getherable items multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_HP_RATE | Getherable objects HP multipiler | 1.000000 | Float | +| COLLECTION_OBJECT_RESPAWN_SPEED_RATE | Getherable objects respawn interval | 1.000000 | Float | +| ENEMY_DROP_ITEM_RATE | Dropped Items Multipiler | 1.000000 | Float | +| DEATH_PENALTY | What will drop when you die | All | `None`,`Item`,`ItemAndEquipment`,`All` | +| ENABLE_PLAYER_TO_PLAYER_DAMAGE | Allows players to cause damage to players | False | Boolean | +| ENABLE_FRIENDLY_FIRE | Allow friendly fire | False | Boolean | +| ENABLE_INVADER_ENEMY | Enable invaders | True | Boolean | +| ACTIVE_UNKO | Enable UNKO (?) | False | Boolean | +| ENABLE_AIM_ASSIST_PAD | Enable controller aim assist | True | Boolean | +| ENABLE_AIM_ASSIST_KEYBOARD | Enable Keyboard aim assist | False | Boolean | +| DROP_ITEM_MAX_NUM | Maximum number of drops in the world | 3000 | Integer | +| DROP_ITEM_MAX_NUM_UNKO | Maximum number of UNKO drops in the world | 100 | Integer | +| BASE_CAMP_MAX_NUM | Maximum number of base camps | 128 | Integer | +| BASE_CAMP_WORKER_MAXNUM | Maximum number of workers | 15 | Integer | +| DROP_ITEM_ALIVE_MAX_HOURS | Time it takes for items to despawn in hours | 1.000000 | Float | +| AUTO_RESET_GUILD_NO_ONLINE_PLAYERS | Automatically reset guild when no players are online | False | Bool | +| AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS | Time to automatically reset guild when no players are online | 72.000000 | Float | +| GUILD_PLAYER_MAX_NUM | Max player of Guild | 20 | Integer | +| PAL_EGG_DEFAULT_HATCHING_TIME | Time(h) to incubate massive egg | 72.000000 | Float | +| WORK_SPEED_RATE | Work speed muliplier | 1.000000 | Float | +| IS_MULTIPLAY | Enable multiplayer | False | Boolean | +| IS_PVP | Enable PVP | False | Boolean | +| CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP | Allow players from other guilds to pick up death penalty items | False | Boolean | +| ENABLE_NON_LOGIN_PENALTY | Enable non-login penalty | True | Boolean | +| ENABLE_FAST_TRAVEL | Enable fast travel | True | Boolean | +| IS_START_LOCATION_SELECT_BY_MAP | Enable selecting of start location | True | Boolean | +| EXIST_PLAYER_AFTER_LOGOUT | Toggle for deleting players when they log off | False | Boolean | +| ENABLE_DEFENSE_OTHER_GUILD_PLAYER | Allows defense against other guild players | False | Boolean | +| COOP_PLAYER_MAX_NUM | Maximum number of players in a guild | 4 | Integer | +| REGION | Region | | String | +| USEAUTH | Use authentication | True | Boolean | +| BAN_LIST_URL | Which ban list to use | [https://api.palworldgame.com/api/banlist.txt](https://api.palworldgame.com/api/banlist.txt) | string | ### Manually From 156b3a6a69e036aa069e644dac643f8fcd2d6ee0 Mon Sep 17 00:00:00 2001 From: Thijs van Loef Date: Sun, 28 Jan 2024 13:56:18 +0100 Subject: [PATCH 119/119] change some env variables to PalWorldSettings.in --- scripts/start.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 25c98db..e6795e2 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -6,22 +6,6 @@ if [ -n "${PORT}" ]; then STARTCOMMAND+=("-port=${PORT}") fi -if [ -n "${PLAYERS}" ]; then - STARTCOMMAND+=("-players=${PLAYERS}") -fi - -if [ "${COMMUNITY}" = true ]; then - STARTCOMMAND+=("EpicApp=PalServer") -fi - -if [ -n "${PUBLIC_IP}" ]; then - STARTCOMMAND+=("-publicip=${PUBLIC_IP}") -fi - -if [ -n "${PUBLIC_PORT}" ]; then - STARTCOMMAND+=("-publicport=${PUBLIC_PORT}") -fi - if [ -n "${SERVER_NAME}" ]; then STARTCOMMAND+=("-servername=${SERVER_NAME}") fi @@ -42,6 +26,10 @@ if [ -n "${QUERY_PORT}" ]; then STARTCOMMAND+=("-queryport=${QUERY_PORT}") fi +if [ "${COMMUNITY}" = true ]; then + STARTCOMMAND+=("EpicApp=PalServer") +fi + if [ "${MULTITHREADING}" = true ]; then STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS") fi @@ -63,6 +51,18 @@ if [ ! "$(grep -s '[^[:space:]]' /palworld/Pal/Saved/Config/LinuxServer/PalWorld cp /palworld/DefaultPalWorldSettings.ini /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini fi +if [ -n "${PLAYERS}" ]; then + echo "PLAYERS=${PLAYERS}" + sed -E -i "s/ServerPlayerMaxNum=[0-9]*/ServerPlayerMaxNum=$PLAYERS/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PUBLIC_IP}" ]; then + echo "PUBLIC_IP=${PUBLIC_IP}" + sed -E -i "s/PublicIP=\"[^\"]*\"/PublicIP=\"$PUBLIC_IP\"/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi +if [ -n "${PUBLIC_PORT}" ]; then + echo "PUBLIC_PORT=${PUBLIC_PORT}" + sed -E -i "s/PublicPort=[0-9]*/PublicPort=$PUBLIC_PORT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini +fi if [ -n "${DIFFICULTY}" ]; then echo "DIFFICULTY=$DIFFICULTY" sed -E -i "s/Difficulty=[a-zA-Z]*/Difficulty=$DIFFICULTY/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini