Useful simple scripts for Palworld Linux server.
Based on my experience about hosting palworld-server-docker on Google Cloud Platform.
Important
You should make the scripts executable (chmod +x <script_name>.sh
)
Palworld servers currently have a memory leak issue. The following shows the memory usage when a server with 32GB of RAM, played by 2 to 5 people in the evening, was set to restart every day at 4:00 and 16:00 and operated for two days.
# Add following line to `crontab -e`
0 4,16 * * * /bin/bash /path/to/restarting.sh
Therefore, I am testing by changing the server to restart every 3 hours.
- 0 4,16 * * * /bin/bash /path/to/restarting.sh
+ 0 */3 * * * /bin/bash /path/to/restarting.sh
Schedule greetings.sh
using crontab -e
. For example:
* * * * * /bin/bash /path/to/greetings.sh
outputs [SYSTEM]:[12:01]<Hansae_Ju>...joined!
using RCON.
Caution
When running (or restarting) the server for the first time, the player's Steam name is sometimes recorded (this seems to be a problem related to 'ShowPlayers').
docker-compose pull
docker-compose up --force-recreate --build -d
docker image prune -f // optional
If you enabled RCON, you can do it using RCON client.
I recommend to install
rcon-cli
as standalone. Refer to DOCKERFILE:rcon-cli
wget -q https://github.com/gorcon/rcon-cli/releases/download/v0.10.3/rcon-0.10.3-amd64_linux.tar.gz -O - | tar -xz sudo mv rcon-0.10.3-amd64_linux/rcon /usr/bin/rcon-cli
Configure
rcon-cli
Refer to gorcon.
You can configure using
rcon.yaml
or via some arguments such as-a <address:port> -p <password>
.Test
rcon-cli
Modify
greetings.sh
Just modify
docker exec -i palworld-server rcon-cli
torcon-cli -a ip:port -p mypassword
.Test
See output message in the game.
Hope this helps :)