Skip to content

Commit

Permalink
Merge pull request #66 from thijsvanloef/include-rcon-in-image
Browse files Browse the repository at this point in the history
Include RCON in docker image
  • Loading branch information
thijsvanloef authored Jan 23, 2024
2 parents 933b66c + 0d12d05 commit deae401
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ LABEL maintainer="[email protected]"
RUN apt-get update && apt-get install -y --no-install-recommends \
xdg-user-dirs=0.17-2 \
procps=2:3.3.17-5 \
wget=1.21-1+deb11u1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://github.com/itzg/rcon-cli/releases/download/1.6.4/rcon-cli_1.6.4_linux_amd64.tar.gz -O - | tar -xz
RUN mv rcon-cli /usr/bin/rcon-cli

ENV PORT= \
PUID=1000 \
PGID=1000 \
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ services:
# - SERVER_NAME="World of Pals"
volumes:
- ./palworld:/palworld/
rcon:
image: outdead/rcon:latest
entrypoint: ['/rcon', '-a', 'palworld:25575', '-p', 'adminPasswordHere']
profiles: ['rcon']
```
### Docker Run
Expand Down Expand Up @@ -117,12 +113,14 @@ It is highly recommended you set the following environment values before startin
## Using RCON

RCON is enabled by default for the palworld-server-docker image.
Using the RCON commands is quite easy:
Opening the RCON cli is quite easy:

```bash
docker compose run --rm rcon "Server Command"
docker exec -it palworld-server rcon-cli
```

This will open a CLI that use can use to write commands to the Palworld Server.

### List of server commands

| Command | Info |
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ services:
# - SERVER_NAME="World of Pals"
volumes:
- ./palworld:/palworld/
rcon:
image: outdead/rcon:latest
entrypoint: ['/rcon', '-a', 'palworld:25575', '-p', 'adminPasswordHere']
profiles: ['rcon']
7 changes: 7 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ if [ -n "${RCON_PORT}" ]; then
sed -i "s/RCONPort=[0-9]*/RCONPort=$RCON_PORT/" /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
fi

# Configure RCON settings
cat >~/.rcon-cli.yaml <<EOL
host: localhost
port: ${RCON_PORT}
password: ${ADMIN_PASSWORD}
EOL

printf "\e[0;32m*****STARTING SERVER*****\e[0m\n"
echo "${STARTCOMMAND}"
su steam -c "${STARTCOMMAND}"

0 comments on commit deae401

Please sign in to comment.