Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dashboy1998 committed Jan 31, 2024
1 parent 0390f60 commit eb4bfde
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ This Docker container has been tested and will work on both Linux (Ubuntu/Debian

Keep in mind that you'll need to change the [environment variables](#environment-variables).

> [!IMPORTANT]
> You must set user to `YOUR_UID:YOUR_GID`
> To find your UID run `id -u` & to find your GID run `id -g`. In the examples they are listed as 1000:1000.
> If you wish to run it as a different UID/GID this can by done by changing the ownership: `chown UID:GID palworld/`
> or by changing the permissions for all other: `chmod o=rwx palworld/`
### Docker Compose

This repository includes an example [docker-compose.yml](/docker-compose.yml) file you can use to set up your server.
Expand All @@ -55,11 +49,12 @@ services:
restart: unless-stopped
container_name: palworld-server
stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
user: 1000:1000
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
Expand All @@ -86,7 +81,6 @@ services:
restart: unless-stopped
container_name: palworld-server
stop_grace_period: 30s # Set to however long you are willing to wait for the container to gracefully stop
user: 1000:1000
ports:
- 8211:8211/udp
- 27015:27015/udp
Expand All @@ -103,10 +97,11 @@ Change every <> to your own configuration
```bash
docker run -d \
--name palworld-server \
--user 1000:1000 \
-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 \
Expand All @@ -130,7 +125,6 @@ correct values. Change your docker run command to this:
```bash
docker run -d \
--name palworld-server \
--user 1000:1000 \
-p 8211:8211/udp \
-p 27015:27015/udp \
-v ./<palworld-folder>:/palworld/ \
Expand All @@ -146,6 +140,29 @@ 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.

### Running without root

This is only recommended for advance users

It is possible to run this container and [override the default user](https://docs.docker.com/engine/reference/run/#user) which is root in this image.

Check failure on line 147 in README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Line length

README.md:147:121 MD013/line-length Line length [Expected: 120; Actual: 149] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md013.md

If you want to find your UID: `id -u`
If you want to find your GID: `id -g`

You must set user to `NUMBERICAL_UID:NUMBERICAL_GID`.

* In docker run add `--user 1000:1000 \` above the last line.
* In docker compose add `user: 1000:1000` above ports.
* In k8s add the following above the ports in deployment.yaml

Check failure on line 156 in README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Trailing spaces

README.md:156:62 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md009.md
```

Check failure on line 157 in README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Fenced code blocks should be surrounded by blank lines

README.md:157 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md031.md

Check failure on line 157 in README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Fenced code blocks should have a language specified

README.md:157 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: " ```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
securityContext:
runAsUser: 1000
runAsGroup: 1000
```

If you wish to run it with a different UID/GID than your own you will need to change the ownership of the directory that is being bind: `chown UID:GID palworld/`

Check failure on line 163 in README.md

View workflow job for this annotation

GitHub Actions / Lint - Markdown

Line length

README.md:163:121 MD013/line-length Line length [Expected: 120; Actual: 161] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md013.md
or by changing the permissions for all other: `chmod o=rwx palworld/`

#### Using helm chart

Follow up the docs on the [README.md for the helm chart](./charts/palworld/README.md) to deploy.
Expand All @@ -157,12 +174,16 @@ It is highly recommended you set the following environment values before startin

* PLAYERS
* PORT
* PUID
* PGID

| Variable | Info | Default Values | Allowed Values |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|------------------------------------------------------------------------------------------------------------|
| TZ | Timezone used for time stamping backup server | UTC | See [TZ Identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Time_Zone_abbreviations) |
| PLAYERS* | Max amount of players that are able to join the server | 16 | 1-32 |
| PORT* | UDP port that the server will expose | 8211 | 1024-65535 |
| PUID* | The uid of the user the server should run as | 1000 | !0 |
| PGID* | The gid of the group the server should run as | 1000 | !0 |
| MULTITHREADING** | Improves performance in multi-threaded CPU environments. It is effective up to a maximum of about 4 threads, and allocating more than this number of threads does not make much sense. | false | true/false |
| COMMUNITY | Whether or not the server shows up in the community server browser (USE WITH SERVER_PASSWORD) | false | true/false |
| PUBLIC_IP | You can manually specify the global IP address of the network on which the server running. If not specified, it will be detected automatically. If it does not work well, try manual configuration. | | x.x.x.x |
Expand Down

0 comments on commit eb4bfde

Please sign in to comment.