-
Notifications
You must be signed in to change notification settings - Fork 155
/
README.md
160 lines (140 loc) · 9.01 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
## Docker - Palworld Dedicated Server
[![Build Docker Image](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push.yml/badge.svg)](https://github.com/jammsen/docker-palworld-dedicated-server/actions/workflows/docker-build-and-push.yml)
![Docker Pulls](https://img.shields.io/docker/pulls/jammsen/palworld-dedicated-server)
![Docker Stars](https://img.shields.io/docker/stars/jammsen/palworld-dedicated-server)
![Image Size](https://img.shields.io/docker/image-size/jammsen/palworld-dedicated-server/latest)
This includes a Palworld Dedicated Server based on Linux and Docker.
## Do you need support for this Docker Image
- What to do?
- Feel free to create a NEW issue
- It is okay to "reference" that you might have the same problem as the person in issue #number
- Follow the instructions and answer the questions of people who are willing to help you
- If your issue is done, close it
- I will Inactivity-Close any issue thats not been active for a week
- What NOT to do?
- Dont re-use issues / Necro!
- You are most likely to chat/spam/harrass thoose participants who didnt agree to be part of your / a new problem and might be totally out of context!
- If this happens, i reserve the rights to lock the issue or delete the comments, you have been warned!
## What you need to run this
- Basic understanding of Docker, Docker-Compose, Linux and Networking (Port-Forwarding/NAT)
## Getting started
1. Choose a Docker-Compose examples from below
2. Create `game` sub-directories on your Dockernode in your game-server-directory (Example: `/srv/palworld`) and give it with `chmod 777 game` full permissions or use `chown -R 1000:1000 game/`.
3. Setup Port-Forwarding or NAT for the ports in the Docker-Compose file
4. (Build the image if you need) Start via `docker-compose up -d` - See docker-compose.yml and next section for more infos
5. After first start, stop the server, setup your config at `game/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` and start it again
## Environment-Variables
| Variable | Describe | Default Value | Allowed Value |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------- |
| ALWAYS_UPDATE_ON_START | Updates the server on startup | true | false/true |
| MAX_PLAYERS | Maximum amout of players | 32 | 1-32 |
| MULTITHREAD_ENABLED | Sets options for "Improved multi-threaded CPU performance" | true | false/true |
| COMMUNITY_SERVER | Sets the server to a "Community-Server". If true, the server will appear in the Community-Serverlist. Needs PUBLIC_IP and PUBLIC_PORT | true | false/true |
| RCON_ENABLED | RCON function - use ADMIN_PASSWORD to login after enabling it | true | false/true |
| RCON_PORT | RCON port to connect to | 25575 | 1024-65535 |
| PUBLIC_IP | Public ip, auto-detect if not specified, see COMMUNITY_SERVER | 10.0.0.1 | ip address |
| PUBLIC_PORT | Public port, auto-detect if not specified, see COMMUNITY_SERVER | 8211 | 1024-65535 |
| SERVER_NAME | Name of the server | jammsen-docker-generated-###RANDOM### | string |
| SERVER_DESCRIPTION | Desription of the server | Palworld-Dedicated-Server running in Docker by jammsen | string |
| SERVER_PASSWORD | Password of the server | serverPasswordHere | string |
| ADMIN_PASSWORD | Admin password of the server | adminPasswordHere | string |
Look at https://tech.palworldgame.com/optimize-game-balance for more information and config-settings in `game/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini`
## Docker-Compose examples
### Standalone gameserver
```yml
version: '3.9'
services:
palworld-dedicated-server:
build: .
container_name: palworld-dedicated-server
image: jammsen/palworld-dedicated-server:latest
restart: always
network_mode: bridge
ports:
- target: 8211 # gamerserver port inside of the container
published: 8211 # gamerserver port on your host
protocol: udp
mode: host
- target: 25575 # rcon port inside of the container
published: 25575 # rcon port on your host
protocol: tcp
mode: host
environment:
- ALWAYS_UPDATE_ON_START=true
- MAX_PLAYERS=32
- MULTITHREAD_ENABLED=true
- COMMUNITY_SERVER=true
- RCON_ENABLED=true
- RCON_PORT=25575
- PUBLIC_IP=10.0.0.5
- PUBLIC_PORT=8211
- SERVER_NAME=jammsen-docker-generated-###RANDOM###
- SERVER_DESCRIPTION=Palworld-Dedicated-Server running in Docker by jammsen
- SERVER_PASSWORD=serverPasswordHere
- ADMIN_PASSWORD=adminPasswordHere
volumes:
- ./game:/palworld
```
### Gameserver with RCON
```yml
version: '3.9'
services:
palworld-dedicated-server:
build: .
container_name: palworld-dedicated-server
image: jammsen/palworld-dedicated-server:latest
restart: always
network_mode: bridge
ports:
- target: 8211 # gamerserver port inside of the container
published: 8211 # gamerserver port on your host
protocol: udp
mode: host
- target: 25575 # rcon port inside of the container
published: 25575 # rcon port on your host
protocol: tcp
mode: host
environment:
- ALWAYS_UPDATE_ON_START=true
- MAX_PLAYERS=32
- MULTITHREAD_ENABLED=true
- COMMUNITY_SERVER=true
- RCON_ENABLED=true
- RCON_PORT=25575
- PUBLIC_IP=10.0.0.5
- PUBLIC_PORT=8211
- SERVER_NAME=jammsen-docker-generated-###RANDOM###
- SERVER_DESCRIPTION=Palworld-Dedicated-Server running in Docker by jammsen
- SERVER_PASSWORD=serverPasswordHere
- ADMIN_PASSWORD=adminPasswordHere
volumes:
- ./game:/palworld
rcon:
image: outdead/rcon:latest
entrypoint: ['/rcon', '-a', '10.0.0.5:25575', '-p', 'adminPasswordHere']
profiles: ['rcon']
```
The profiles defintion, prevents the container from starting with the server and in your console you can run now RCON commands via
#### RCON
In your shell you can now run commands against the gameserver via RCON
```shell
$ docker compose run --rm rcon ShowPlayers
name,playeruid,steamid
$ docker compose run --rm rcon info
Welcome to Pal Server[v0.1.2.0] jammsen-docker-generated-20384
$ docker compose run --rm rcon save
Complete Save
```
**Imporant:**
- Keep the `--rm` in the command line, or you will have many exited containers in your list.
- All RCON-Commands can be research here: https://tech.palworldgame.com/server-commands
## FAQ
### How can i look into the config of my Palworld container?
You can run this `docker exec -ti palworld-dedicated-server cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini` and it will show you the config inside the container.
### Im seeing S_API errors in my logs when i start the container
Errors like `[S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded.` are safe to ignore.
## Planned features in the future
- Feel free to suggest something
## Software used
- CM2Network SteamCMD (Officially recommended by Valve - https://developer.valvesoftware.com/wiki/SteamCMD#Docker)
- Palworld Dedicated Server (APP-ID: 2394010 - https://steamdb.info/app/2394010/config/)