cyr62110 / palworld-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

palworld-docker

This project generated nighly docker images for Palworld server and provides scripts to execute it on a Linux machine.

Install the palworld server

Install on Debian

Install docker

To install docker, please follow the official documentation.

Create a palworld user

Create a palworld user that will run the container. The save will be stored inside the home directory of the palword user. The user is added to the docker group so it can launch the palworld server docker container generated by this repository.

CONTAINER_UID=$(sudo docker run --entrypoint=bash ghcr.io/cyr62110/palworld:latest -c "id -u")
CONTAINER_GID=$(sudo docker run --entrypoint=bash ghcr.io/cyr62110/palworld:latest -c "id -g")
sudo groupadd -g $CONTAINER_GID palworld
sudo useradd --create-home palworld -u $CONTAINER_UID -g palworld --groups docker --shell /bin/bash

The user id and group id of the palworld user are matched to the one of the user in the container. This will allow the container user to write on the user home.

TODO: Improve how to handle the user & the group inside the container.

Install the palworld systemd service

Download the palworld systemd service from this repository:

sudo curl https://raw.githubusercontent.com/cyr62110/palworld-docker/main/etcd/palworld.service > /etc/systemd/system/palword.service

Finally enable the service:

sudo systemctl enable palworld

Configure the Palworld server

The docker container will check the presence of a configuration for the Palworld server before starting.

You can copy a default configuration template by running the following commands as palworld user:

docker run --entrypoint=bash \
    -e PALSERVER_PATH=/home/steam/Steam/steamapps/common/PalServer \
    -v /home/palworld:/home/steam/Steam/steamapps/common/PalServer/Pal/Saved \
    ghcr.io/cyr62110/palworld:latest -c "mkdir -p \$PALSERVER_PATH/Pal/Saved/Config/LinuxServer && cp \$PALSERVER_PATH/DefaultPalWorldSettings.ini \$PALSERVER_PATH/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini"

Check the Config/LinuxServer/PalWorldSettings.ini has been properly created.

Run the server

sudo systemctl start palworld

About


Languages

Language:Shell 67.4%Language:Dockerfile 32.6%