Simple Dockerfile that installs steamcmd and a palworld server with option of saves
Note: Other docker images exist, but they didn't work for me and what I wanted. So I made this for myself, and thought I'd just share.
Installation
- download this repo to any directory.
- Make sure you have docker installed.
- Enable Ports 8211 and 25575 in your firewall. (Docker will change your IP tables, and it may go around your firewall (ufw). Do some research if changes need to be made.)
- Within repo directory, there is a folder /files/Config/ to place your PalWorldSettings.ini from a previous server. There is also a folder /files/World/0/RecentSave/ which you can optionally place a backup save (server save), ie. "Level.sav LevelMeta.sav Players/*". (The RecentSave folder will be copied into the container, but since the hash folder is randomly generated you'll need to manually move the files over).
- Inside repo dir, run
Docker build -t palworld_server .
and wait for completion. - Next run,
./docker-run.sh
to build the container. - Setup your Router to port-forward to your host PC's IP address
192.168.1.***"
ports:25575:25575 8211:8211
To Connect from WITHIN YOUR LAN: the IP is your host PC's IP Address. To Connect from OUTSIDE YOUR LAN, AKA WAN: the IP is your router's IP. (If you want to make these the same IP, that's messing with NAT Hair-pinning within your Router settings..if it has it. Mine doesn't.) - LOGIN! Make a character and play.
Modifying the Server
To access the server within the container, run
docker exec -it palworld_srvcntr /bin/bash
If you intend on making modifications to an existing docker server, the services running within will keep the Server up if it crashes or is killed. To disable this, runsystemctl stop palworld.service
. THEN modify your saves or settings: To enable againg runsystemctl start palworld.service
and the server should boot up in a few moments. - To modify your server settings:
nano /home/steam/serverdata/palworld/Pal/Saved/Config/LinuxServer/PalWorldSetting.ini
- To copy savegame files to server save. MAKE SURE A CHARACTER HAS BEEN CREATED ON THE SERVER FIRST or the folder won't exist.
cp -rf ~/Saved_Game/World/SaveGames/0/RecentSave/* ~/serverdata/palworld/Pal/Saved/SaveGames/0/*insert known hash*/*
Happy Pal--Pallying---Hunting!
Note: Other docker images exist, but they didn't work for me and what I wanted. So I made this for myself, and thought I'd just share.