Skip to content

Commit

Permalink
Merge pull request thijsvanloef#6 from Twinki14/admin-password
Browse files Browse the repository at this point in the history
Add ADMIN_PASSWORD environment variable
  • Loading branch information
thijsvanloef authored Jan 19, 2024
2 parents 3b284d2 + 00385a2 commit 7fe63a9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure the scripts use LF line endings, not CRLF
*.sh text eol=lf
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


ENV PORT=8211 \
PLAYERS=16 \
MULTITHREADING=false \
Expand All @@ -15,6 +14,7 @@ ENV PORT=8211 \
PUBLIC_PORT= \
SERVER_PASSWORD= \
SERVER_NAME= \
ADMIN_PASSWORD= \
UPDATE_ON_BOOT=true

COPY ./scripts/* /home/steam/server/
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ It is highly recommended you set the following environment values before startin
* MULTITHREADING

| Variable | Info | Default Values | Allowed Values |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|----------------|
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------------- |
| 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 |
| 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 |
Expand All @@ -75,16 +75,18 @@ It is highly recommended you set the following environment values before startin
| 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. | | x.x.x.x |
| 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 |


*highly recommended to set

** Make sure you know what you are doing when running this this option enabled

### Game Ports

| Port | Info | note |
|-------|------------------|------------------------------------------------|
| ----- | ---------------- | ---------------------------------------------- |
| 8211 | Game Port (UDP) | |
| 27015 | Query Port (UDP) | You are not able to change this port as of now |

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ services:
# Enable the environment variables below if you have COMMUNITY=true
# - SERVER_PASSWORD="worldofpals"
# - SERVER_NAME="World of Pals"
# - ADMIN_PASSWORD="someAdminPassword"
volumes:
- ./palworld:/palworld/
4 changes: 4 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if [ -n "${SERVER_PASSWORD}" ]; then
STARTCOMMAND="${STARTCOMMAND} -serverpassword=${SERVER_PASSWORD}"
fi

if [ -n "${ADMIN_PASSWORD}" ]; then
STARTCOMMAND="${STARTCOMMAND} -adminpassword=${ADMIN_PASSWORD}"
fi

if [ "${MULTITHREADING}" = true ]; then
STARTCOMMAND="${STARTCOMMAND} -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS"
fi
Expand Down

0 comments on commit 7fe63a9

Please sign in to comment.