mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-06 04:32:43 +00:00
Merge branch 'main' into cron-backup
This commit is contained in:
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1,3 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: thijsvanloef
|
||||
ko_fi: thijsvanloef
|
||||
|
||||
15
.github/dependabot.yml
vendored
Normal file
15
.github/dependabot.yml
vendored
Normal file
@@ -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"
|
||||
29
.github/workflows/docker-hub.yml
vendored
29
.github/workflows/docker-hub.yml
vendored
@@ -1,36 +1,31 @@
|
||||
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 }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
57
.github/workflows/linting.yml
vendored
57
.github/workflows/linting.yml
vendored
@@ -1,39 +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: azohra/shell-linter@latest
|
||||
with:
|
||||
severity: "error"
|
||||
- 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'
|
||||
failure-threshold: error
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: Release
|
||||
on:
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
@@ -7,32 +7,30 @@ 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:
|
||||
# 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: 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 }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,4 @@
|
||||
palworld
|
||||
palworld
|
||||
.idea
|
||||
values*.yaml
|
||||
!chart/values.yaml
|
||||
128
CODE_OF_CONDUCT.md
Normal file
128
CODE_OF_CONDUCT.md
Normal file
@@ -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](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
|
||||
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](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](https://www.contributor-covenant.org/faq). Translations are available at
|
||||
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
||||
12
Dockerfile
12
Dockerfile
@@ -9,8 +9,10 @@ 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
|
||||
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 && \
|
||||
rmdir /tmp/dumps
|
||||
|
||||
RUN rm -f /var/run/crond.pid
|
||||
COPY ./scripts/backup.sh /usr/local/bin/backup
|
||||
@@ -32,14 +34,14 @@ ENV PORT= \
|
||||
RCON_PORT=25575 \
|
||||
QUERY_PORT=27015 \
|
||||
TZ=UTC \
|
||||
SERVER_DESCRIPTION=
|
||||
BACKUP_ENABLED=false \
|
||||
DAYS_TO_KEEP= \
|
||||
BACKUP_CRON_EXPRESSION=
|
||||
|
||||
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
|
||||
|
||||
|
||||
162
README.md
162
README.md
@@ -1,12 +1,18 @@
|
||||
# Palworld Dedicated Server Docker
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/thijsvanloef/palworld-server-docker/releases)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags)
|
||||
[](https://discord.com/invite/UxBxStPAAE)
|
||||
[](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)
|
||||
|
||||
[Chat with the community on Discord](https://discord.gg/UxBxStPAAE)
|
||||
|
||||
[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/)
|
||||
|
||||
@@ -20,13 +26,21 @@ 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 | 12GB |
|
||||
|
||||
## How to use
|
||||
|
||||
Keep in mind that you'll need to change the [environment variables](#environment-variables).
|
||||
|
||||
### 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:
|
||||
@@ -42,15 +56,15 @@ 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
|
||||
- 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_PASSWORD="worldofpals"
|
||||
# - SERVER_NAME="World of Pals"
|
||||
- SERVER_NAME="World of Pals"
|
||||
- SERVER_DESCRIPTION="Awesome World of Pal"
|
||||
volumes:
|
||||
- ./palworld:/palworld/
|
||||
```
|
||||
@@ -74,7 +88,10 @@ docker run -d \
|
||||
-e RCON_PORT=25575 \
|
||||
-e TZ=UTC \
|
||||
-e ADMIN_PASSWORD="adminPasswordHere" \
|
||||
-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
|
||||
|
||||
@@ -86,6 +103,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.
|
||||
@@ -96,29 +117,37 @@ 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-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
|
||||
|
||||
** Make sure you know what you are doing when running this option enabled
|
||||
|
||||
*** 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 |
|
||||
@@ -130,13 +159,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
|
||||
|
||||
@@ -157,7 +186,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
|
||||
@@ -165,6 +194,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.
|
||||
|
||||
## Setting Up Automatic Backups with Cron
|
||||
|
||||
Setting Up Automatic Backups with Cron
|
||||
@@ -200,17 +231,80 @@ BACKUP_ENABLED=true
|
||||
|
||||
## 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 |
|
||||
|-------------------------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------|----------------------------------------|
|
||||
| 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
|
||||
|
||||
When the server starts, a `PalWorldSettings.ini` file will be created in the following location: `<mount_folder>/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`.
|
||||
|
||||
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)
|
||||
> [!IMPORTANT]
|
||||
> Changes can only be made to `PalWorldSettings.ini` while the server is off.
|
||||
|
||||
> [!TIP]
|
||||
> If the `<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` is empty,
|
||||
> delete the file and restart the server, a new file with content will be created.
|
||||
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
|
||||
|
||||
|
||||
6
SECURITY.md
Normal file
6
SECURITY.md
Normal file
@@ -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.
|
||||
20
chart/Chart.yaml
Normal file
20
chart/Chart.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v2
|
||||
name: palworld
|
||||
version: 0.0.1
|
||||
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
|
||||
32
chart/README.md
Normal file
32
chart/README.md
Normal file
@@ -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
|
||||
```
|
||||
68
chart/VALUES_SUMMARY.md
Normal file
68
chart/VALUES_SUMMARY.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# palworld
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
This chart can provide an rAthena emulator installation on a Kubernetes cluster.
|
||||
|
||||
**Homepage:** <https://github.com/thijsvanloef/palworld-server-docker>
|
||||
|
||||
## Maintainers
|
||||
|
||||
| Name | Email | Url |
|
||||
| ---- | ------ | --- |
|
||||
| Filipe Souza | <filipe.souza@mestre8d.com> | <https://github.com/Filipe-Souza> |
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/thijsvanloef/palworld-server-docker>
|
||||
|
||||
## 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.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. |
|
||||
| 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.type | string | `"LoadBalancer"` | The type of service to be created. |
|
||||
| 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 | `"12Gi"` | 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)
|
||||
40
chart/templates/configmaps.yaml
Normal file
40
chart/templates/configmaps.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
{{- $cPwd := randAlphaNum 12 | nospace -}}
|
||||
{{- $sName := "" -}}
|
||||
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 }}
|
||||
{{ 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 }}
|
||||
70
chart/templates/deployments.yaml
Normal file
70
chart/templates/deployments.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: {{ .Values.namespace }}
|
||||
name: "{{ .Release.Name }}-server"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: "{{ .Release.Name }}-server"
|
||||
strategy:
|
||||
type: "{{ .Values.server.strategy }}"
|
||||
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:
|
||||
{{ if .Values.server.service.healthz.enabled }}
|
||||
- name: healthz
|
||||
image: "chussenot/tiny-server:latest"
|
||||
imagePullPolicy: {{ .Values.server.image.imagePullPolicy }}
|
||||
ports:
|
||||
- name: healthz
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
{{ end }}
|
||||
- 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 }}
|
||||
{{- 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:
|
||||
{{- if not .Values.server.storage.external }}
|
||||
claimName: "{{ .Release.Name }}-datadir-pvc"
|
||||
{{ else }}
|
||||
claimName: "{{ .Values.server.storage.externalName }}"
|
||||
{{ end }}
|
||||
31
chart/templates/pvcs.yaml
Normal file
31
chart/templates/pvcs.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- if not .Values.server.storage.external }}
|
||||
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 }}
|
||||
{{ end }}
|
||||
25
chart/templates/secrets.yaml
Normal file
25
chart/templates/secrets.yaml
Normal file
@@ -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 }}
|
||||
34
chart/templates/services.yaml
Normal file
34
chart/templates/services.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
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:
|
||||
{{ 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 }}
|
||||
type: {{ .Values.server.service.type }}
|
||||
139
chart/values.yaml
Normal file
139
chart/values.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
# -- 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) 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.
|
||||
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.
|
||||
size: 12Gi
|
||||
# -- 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
|
||||
# -- (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.
|
||||
# @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) 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
|
||||
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) 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: ""
|
||||
@@ -6,23 +6,23 @@ 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
|
||||
- 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"
|
||||
- SERVER_DESCRIPTION=""
|
||||
- BACKUP_ENABLED=true
|
||||
- DAYS_TO_KEEP=
|
||||
- BACKUP_CRON_EXPRESSION=
|
||||
# Enable the environment variables below if you have COMMUNITY=true
|
||||
# - SERVER_PASSWORD="worldofpals"
|
||||
# - SERVER_NAME="World of Pals"
|
||||
volumes:
|
||||
- ./palworld:/palworld/
|
||||
|
||||
215
docs/kr/README.md
Normal file
215
docs/kr/README.md
Normal file
@@ -0,0 +1,215 @@
|
||||
# Palworld 전용 서버 도커
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/thijsvanloef/palworld-server-docker/blob/main/docs/kr/README.md)
|
||||
|
||||
[Docker Hub에서 보기](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
|
||||
[Discord에서 커뮤니티와 채팅하세요](https://discord.gg/UxBxStPAAE)
|
||||
|
||||
[English](/README.md) | [한국어](/docs/kr/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-folder>:/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 | 월드 정보를 저장합니다. |
|
||||
|
||||
전체 명령어 목록을 보려면 다음으로 이동하세요.: [https://tech.palworldgame.com/server-commands](https://tech.palworldgame.com/server-commands)
|
||||
|
||||
## 백업 만들기
|
||||
|
||||
현재 시점의 게임 세이브 백업을 생성하려면 다음 명령을 사용합니다.
|
||||
|
||||
```bash
|
||||
docker exec palworld-server backup
|
||||
```
|
||||
|
||||
다음 위치에 백업이 생성됩니다. `/palworld/backups/`
|
||||
|
||||
rcon이 활성화된 경우 서버는 백업 전에 저장을 실행합니다.
|
||||
|
||||
## 서버 설정 편집
|
||||
|
||||
서버가 시작되면 `PalWorldSettings.ini` 파일은 다음 위치에 생성됩니다.
|
||||
`<mount_folder>/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`
|
||||
|
||||
여기서 변경한 사항은 다음 부팅 시 서버에 적용됩니다.
|
||||
|
||||
환경 변수는 항상 `PalWorldSettings.ini`의 변경 사항을 덮어쓴다는 점에 유의하세요.
|
||||
|
||||
서버 설정에 대한 자세한 설명 목록을 보려면 다음을 참조하세요.: [shockbyte](https://shockbyte.com/billing/knowledgebase/1189/How-to-Configure-your-Palworld-server.html)
|
||||
|
||||
> [!팁]
|
||||
> 만약 `<mount_folder>/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)에 나열되어 있습니다.
|
||||
213
docs/zh-CN/README.md
Normal file
213
docs/zh-CN/README.md
Normal file
@@ -0,0 +1,213 @@
|
||||
# Palworld Dedicated Server Docker
|
||||
|
||||
[](https://github.com/thijsvanloef/palworld-server-docker/releases)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker)
|
||||
[](https://hub.docker.com/r/thijsvanloef/palworld-server-docker/tags)
|
||||
[](https://discord.com/invite/UxBxStPAAE)
|
||||
[](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)
|
||||
|
||||
> [!TIP]
|
||||
> 不知道从何开始? [看看这里吧!](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 上运行
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 目前, 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
|
||||
|
||||
将`<palworld-folder>`修改为您自己的路径
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name palworld-server \
|
||||
-p 8211:8211/udp \
|
||||
-p 27015:27015/udp \
|
||||
-v ./<palworld-folder>:/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命令保存并关闭服务器的必要条件
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 环境变量中使用的布尔值区分大小写,因为它们是在 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` 文件将在 `<mount_folder>/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) 中列出
|
||||
@@ -7,83 +7,11 @@ 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.
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: palworld-settings
|
||||
data:
|
||||
PalWorldSettings.ini: >-
|
||||
[/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"
|
||||
)
|
||||
SERVER_NAME: "World of Pals"
|
||||
SERVER_DESCRIPTION: ""
|
||||
|
||||
@@ -6,6 +6,8 @@ metadata:
|
||||
name: palworld-server
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: palworld-server
|
||||
@@ -37,13 +39,7 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: /palworld
|
||||
name: datadir
|
||||
- name: palworld-settings
|
||||
mountPath: /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
|
||||
subPath: PalWorldSettings.ini
|
||||
volumes:
|
||||
- name: datadir
|
||||
persistentVolumeClaim:
|
||||
claimName: palworld-server-datadir
|
||||
- name: palworld-settings
|
||||
configMap:
|
||||
name: palworld-settings
|
||||
@@ -9,4 +9,4 @@ spec:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storage: 12Gi
|
||||
|
||||
47
migration/README.md
Normal file
47
migration/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Migrate From Existing Server
|
||||
|
||||
## Using the script
|
||||
|
||||
> [!WARNING]
|
||||
> Use this script at your own risk, I am not responsible for dataloss!
|
||||
>
|
||||
> Please make sure you always have a backup!
|
||||
|
||||
1. Find a directory which is named by game server name and contains all saved game data,
|
||||
usually it will at `~/Steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/`
|
||||
2. Make sure `migration/migrate.sh`, saved game data directory and mounted volume
|
||||
(e.g. `palworld/`) are in the same directory. Like this:
|
||||
|
||||
```shell
|
||||
ubuntu@VM-4-5-ubuntu:~/test-pal-migrate$ ll
|
||||
total 24
|
||||
drwxrwxr-x 4 ubuntu ubuntu 4096 Jan 26 03:31 ./
|
||||
drwxr-x--- 12 ubuntu ubuntu 4096 Jan 26 03:31 ../
|
||||
drwxr-xr-x 2 ubuntu ubuntu 4096 Jan 26 03:30 74406BE1D7B54114AA5984CCF1236865/
|
||||
-rw-r--r-- 1 ubuntu ubuntu 840 Jan 25 05:51 docker-compose.yml
|
||||
-rw-rw-r-- 1 ubuntu ubuntu 848 Jan 26 03:31 migrate.sh
|
||||
drwxrwxr-x 7 ubuntu ubuntu 4096 Jan 26 03:31 palworld/
|
||||
```
|
||||
|
||||
3. Run `migrate.sh` like this
|
||||
|
||||
```shell
|
||||
./migrate.sh {CONTAINER_NAME} {SERVER_NAME}
|
||||
```
|
||||
|
||||
For example,
|
||||
|
||||
```shell
|
||||
./migrate.sh test-pal-migrate 74406BE1D7B54114AA5984CCF1236865
|
||||
```
|
||||
|
||||
## Manually
|
||||
|
||||
1. Copy the save from your old dedicated server to your new dedicated server.
|
||||
2. In the `PalServer\Pal\Saved\Config\LinuxServer\GameUserSettings.ini` file of the **new** server,
|
||||
change the `DedicatedServerName` to match your save's folder name. For example,
|
||||
if your save's folder name is `2E85FD38BAA792EB1D4C09386F3A3CDA`, the DedicatedServerName changes to
|
||||
DedicatedServerName=`2E85FD38BAA792EB1D4C09386F3A3CDA`.
|
||||
3. Delete the entire new server save at `PalServer\Pal\Saved\SaveGames\0\<your_save_here>`,
|
||||
and replace it with the folder from the old server.
|
||||
4. Restart the new server
|
||||
29
migration/migrate.sh
Normal file
29
migration/migrate.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CONTAINER_NAME=$1
|
||||
MIGRATION_SERVER_NAME=$2
|
||||
|
||||
if [ ! -d ./"${MIGRATION_SERVER_NAME}" ]; then
|
||||
echo "can not find ${MIGRATION_SERVER_NAME} dir at current dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d ./palworld ]; then
|
||||
echo "can not find palworld dir at current dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTAINER_ID=$(docker ps --filter name="${CONTAINER_NAME}" --format '{{.ID}}')
|
||||
|
||||
echo "########## STOPPING CONTAINER ${CONTAINER_NAME} NOW ##########"
|
||||
docker stop "${CONTAINER_ID}"
|
||||
|
||||
cp -r ./"${MIGRATION_SERVER_NAME}" ./palworld/Pal/Saved/SaveGames/0/"${MIGRATION_SERVER_NAME}"/
|
||||
|
||||
sed -i "s/DedicatedServerName=.*/DedicatedServerName=${MIGRATION_SERVER_NAME}/" ./palworld/Pal/Saved/Config/LinuxServer/GameUserSettings.ini
|
||||
|
||||
echo "########## STARTING CONTAINER ${CONTAINER_NAME} NOW ##########"
|
||||
docker start "${CONTAINER_ID}"
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${RCON_ENABLED}" = true ]; then
|
||||
rcon-cli save
|
||||
fi
|
||||
|
||||
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
DESTINATION_PATH="/palworld/backups"
|
||||
FILE_PATH="${DESTINATION_PATH}/backup_palworld_${DATE}.tar.gz"
|
||||
@@ -12,6 +16,11 @@ fi
|
||||
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"
|
||||
|
||||
if [[ -n "${DAYS_TO_KEEP}" && "${DAYS_TO_KEEP}" =~ ^[0-9]+$ ]]; then
|
||||
|
||||
@@ -10,11 +10,21 @@ else
|
||||
fi
|
||||
|
||||
mkdir -p /palworld/backups
|
||||
chown -R steam:steam /palworld
|
||||
chown -R steam:steam /palworld /home/steam/
|
||||
|
||||
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
|
||||
term_handler() {
|
||||
if [ "${RCON_ENABLED}" = true ]; then
|
||||
rcon-cli save
|
||||
rcon-cli "shutdown 1"
|
||||
else # Does not save
|
||||
kill -SIGTERM "$(pidof PalServer-Linux-Test)"
|
||||
fi
|
||||
tail --pid=$killpid -f 2>/dev/null
|
||||
}
|
||||
|
||||
./start.sh
|
||||
trap 'term_handler' SIGTERM
|
||||
|
||||
su steam -c ./start.sh &
|
||||
# Process ID of su
|
||||
killpid="$!"
|
||||
wait $killpid
|
||||
|
||||
285
scripts/start.sh
285
scripts/start.sh
@@ -1,63 +1,285 @@
|
||||
#!/bin/bash
|
||||
|
||||
STARTCOMMAND="./PalServer.sh"
|
||||
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
|
||||
STARTCOMMAND="${STARTCOMMAND} -port=${PORT}"
|
||||
fi
|
||||
|
||||
if [ -n "${PLAYERS}" ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} -players=${PLAYERS}"
|
||||
fi
|
||||
|
||||
if [ "${COMMUNITY}" = true ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} EpicApp=PalServer"
|
||||
fi
|
||||
|
||||
if [ -n "${PUBLIC_IP}" ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} -publicip=${PUBLIC_IP}"
|
||||
fi
|
||||
|
||||
if [ -n "${PUBLIC_PORT}" ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} -publicport=${PUBLIC_PORT}"
|
||||
STARTCOMMAND+=("-port=${PORT}")
|
||||
fi
|
||||
|
||||
if [ -n "${SERVER_NAME}" ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} -servername=${SERVER_NAME}"
|
||||
STARTCOMMAND+=("-servername=${SERVER_NAME}")
|
||||
fi
|
||||
|
||||
if [ -n "${SERVER_DESCRIPTION}" ]; then
|
||||
STARTCOMMAND+=("-serverdescription=${SERVER_DESCRIPTION}")
|
||||
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 [ "${COMMUNITY}" = true ]; then
|
||||
STARTCOMMAND+=("EpicApp=PalServer")
|
||||
fi
|
||||
|
||||
if [ "${MULTITHREADING}" = true ]; then
|
||||
STARTCOMMAND="${STARTCOMMAND} -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS"
|
||||
STARTCOMMAND+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS")
|
||||
fi
|
||||
|
||||
cd /palworld || exit
|
||||
|
||||
printf "\e[0;32m*****CHECKING FOR EXISTING CONFIG*****\e[0m\n"
|
||||
|
||||
if [ ! -f /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini ]; 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"
|
||||
|
||||
# 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
|
||||
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
|
||||
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_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_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"
|
||||
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 "${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
|
||||
@@ -80,12 +302,13 @@ if [[ -n $BACKUP_ENABLED ]]; then
|
||||
fi
|
||||
|
||||
# Configure RCON settings
|
||||
cat >~/.rcon-cli.yaml <<EOL
|
||||
host: localhost
|
||||
port: ${RCON_PORT}
|
||||
password: ${ADMIN_PASSWORD}
|
||||
cat >/home/steam/server/rcon.yaml <<EOL
|
||||
default:
|
||||
address: "127.0.0.1:${RCON_PORT}"
|
||||
password: ${ADMIN_PASSWORD}
|
||||
EOL
|
||||
|
||||
printf "\e[0;32m*****STARTING SERVER*****\e[0m\n"
|
||||
echo "${STARTCOMMAND}"
|
||||
su steam -c "${STARTCOMMAND}"
|
||||
echo "${STARTCOMMAND[*]}"
|
||||
"${STARTCOMMAND[@]}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user