Skip to content

Instantly share code, notes, and snippets.

@troyfontaine
Last active August 3, 2026 02:00
Show Gist options
  • Select an option

  • Save troyfontaine/1f55fb13db2dc8de7f52c02c86874a2b to your computer and use it in GitHub Desktop.

Select an option

Save troyfontaine/1f55fb13db2dc8de7f52c02c86874a2b to your computer and use it in GitHub Desktop.
Set up a Palworld Dedicated Server On Ubuntu 22.04

How to Set up a Palworld Dedicated Server On an Ubuntu 22.04 Host (VM or baremetal)

WORK IN PROGRESS

Because the documentation scattered around the internet is pretty inconsistent, I'm putting everything I've found that seems to work together here.

Overview

This took too much effort to get sorted out, so I'm documenting everything figured out so far here.

Acknowledgements

This gist owes a great big thank you to A1RM4X and their repo HowTo-Palworld for the maintenance script and the systemd unit file provided.

Multiple Dedicated Server Warning

It looks like the dedicated server currently has several limitations:

  • No way to bind to a specific Network Adapter
  • No way to specify a different port for the "Query Port" so hosting multiple dedicated servers likely requires running the server in a containerized form so that individual game servers don't fight to bind to the query port - is now managed via the flag -QueryPort=
  • The PalServer.sh script doesn't seem to have any options to specify a different configuration folder for reading the GameUserSettings.ini file so that you could run multiple instances more easily

Firewall Ports

This was painful, so I'm putting this first.

Port Protocol Purpose Notes
8211 UDP Game Server REQUIRED You connect to the server on UDP 8211, this can be modified. To validate that the port is open on the firewall between you and the game server, you can run nc -ulW 1 <your-dedicated-server-ip> 8211

Enabling Port Forwarding on Unifi Gateways

  1. Navigate to "Settings"
  2. Click on "Policy Table"
  3. Click on "Create New Policy"
  4. Set the Policy type to "Port Forwarding"
  5. Name the rule
  6. Set the WAN Interface to WAN1 (or different if you're using a more advanced configuration)
  7. Set the WAN Port to 8211
  8. Set From to "Any"
  9. Set the Forward IP Address to the internal IP of your Palworld server
  10. Set the Forward Port to 8211
  11. Set the Protocol to UDP
  12. Click "Add"

Set up script

Part 1: Initial Set up

#!/usr/bin/env bash
# Run this script as either root or using sudo

steam_software_id="2394010"

DEBIAN_FRONTEND=noninteractive

echo "Running updates and installing"
apt-get update && apt-get install \
software-properties-common \
ufw \
lsb-release \
wget \
-y

echo "Setting up UFW"
apt-get install -y ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
# Uncomment if you use mosh in addition to SSH
# ufw allow mosh
ufw allow 8211/udp
ufw enable

echo "Setting up steamcmd"

# Add the Steam User
useradd -m steam

# Add the dependency repo and configuration
add-apt-repository multiverse -y
dpkg --add-architecture i386

# Prepare to install
apt-get update

echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections

apt-get install -y steamcmd

# Make the steam install directories
mkdir -p /home/steam/.steam/{root,steam}

# Fix the permissions
chown steam:steam /home/steam/.steam -R
chmod 755 /home/steam/.steam -R

echo "Running commands as Steam user to complete setup"
sudo -u steam bash <<'EOF'

mkdir -p /home/steam/Palworld_backups

echo "Setting up Palworld Dedicated Server"
cd ~/ && /usr/games/steamcmd +login anonymous +app_update ${steam_software_id} validate +quit

echo "Download the Palworld maintenance shell script"
wget https://gist.githubusercontent.com/troyfontaine/1f55fb13db2dc8de7f52c02c86874a2b/raw/342e9463c7ec0783b5ff4b2f5d1abec202f3f1ab/palworld-maintenance.sh -O /home/steam/palworld-maintenance.sh

chmod 500 /home/steam/palworld-maintenance.sh
EOF

# Download the systemd service file
echo "Downloading Systemd Unit File"
wget https://gist.githubusercontent.com/troyfontaine/1f55fb13db2dc8de7f52c02c86874a2b/raw/e54ff75dfce9ecc129dfaf066925988da80b62a1/palworld.service -O /etc/systemd/system/palworld.service
chmod 644 /etc/systemd/system/palworld.service

# Enable the Systemd Service
echo "Configuring the systemd service"
systemctl enable /etc/systemd/system/palworld.service
systemctl start palworld &
journalctl -u palworld -f &

Part 2: Secure things

You will need to set the password for the steam user next.

sudo passwd steam

Part 3: Cloning Things

You can clone a VM running Palworld and set up a new VM running on a different internal IP AND on different ports that could be forwarded to externally.

You can do this by doing the following:

  • Modify the startup script to use a different game server port (the -port argument)
  • Modify the startup script to use a different query port (the -QueryPort argument)
  • Update the Server configuration located under ../PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
  • Update the DedicatedServerName located in ../PalServer/Pal/Saved/Config/LinuxServer/GameUserSettings.ini by replacing the existing 32 Character string with another (you can generate a folder name using a site like this one - ensure you use Numeric Digits and Uppercase letters only)
    • This property is also crucial when restoring a backed up server-this tells the Palworld dedicated server which save folder to use
  • Update the UFW settings
  • Forward the ports on your public facing firewall to the new VM

Configuring the Server

Your server configuration is stored at /home/steam/.steam/steamapps/common/PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini.

An example configuration is:

This customized configuration reduces the difficulty in some ways (disabling base attacks, disabling death penalty, disabling the time required to hatch an egg, etc.)

[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,DayTimeSpeedRate=0.600000,NightTimeSpeedRate=2.000000,ExpRate=1.000000,PalCaptureRate=1.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=1.000000,PlayerAutoHpRegeneRateInSleep=1.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=1.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=1.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=1.000000,DeathPenalty=None,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=False,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=3000,DropItemMaxNum_UNKO=100,BaseCampMaxNumInGuild=20,BaseCampMaxNum=128,BaseCampWorkerMaxNum=30,DropItemAliveMaxHours=1.000000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,PalEggDefaultHatchingTime=0,WorkSpeedRate=1.000000,bIsMultiplay=True,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=False,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=12,ServerPlayerMaxNum=32,ServerName="My Palworld Server",ServerDescription="",bAllowGlobalPalboxExport=true,bAllowGlobalPalboxImport=true,AdminPassword="MySuperSecretAdminPassword",ServerPassword="MySuperSecretGamePassword",PublicPort=8211,PublicIP="",RCONEnabled=False,Region="NA",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

1.0 Issues

After upgrading to PalWorld 1.0, I ran into issues with the maintenance script. I had to add in some additional commands which seemed to clear up the problem with the game failing to start.

#!/bin/bash

# Update PalWorld automatically
/usr/games/steamcmd +login anonymous +app_update 2394010 validate +quit

# Ensure Steam is fully exited
killall -9 steam

# Erase the Steam cache
rm -rf ~/.steam/steam/appcache/httpcache

# Make a backup file for the current date and time of the contents of the PalWorld Saved directory
tar -czvf /home/steam/Palworld_backups/"Palworld_$(date '+%Y-%m-%d_%H-%M-%S').tar.gz" /home/steam/.steam/steam/steamapps/common/PalServer/Pal/Saved

# Find any game backups that are older than 20 days and delete them to save on disk space
find /home/steam/Palworld_backups/ -mtime +20 -type f -delete
#!/bin/bash
# All-in-One Update and Backup script
# Use Steam to update the Palworld server
/usr/games/steamcmd +login anonymous +app_update 2394010 validate +quit
# Kill Steam to allow for maintenance
killall -9 steam
# Clear the Steam httpcache
rm -rf ~/.steam/steam/appcache/httpcache
# Backup Game Saves
tar -czvf /home/steam/Palworld_backups/"Palworld_$(date '+%Y-%m-%d_%H-%M-%S').tar.gz" /home/steam/.steam/steam/steamapps/common/PalServer/Pal/Saved
# Purge old backups
find /home/steam/Palworld_backups/ -mtime +20 -type f -delete
chown steam:steam /home/steam/.steam/steam/steamapps/common/PalServer/Pal/Saved -R
[Unit]
Description=Palworld Dedicated Server by Troy Fontaine 1.0
Wants=network-online.target
After=network-online.target
[Service]
User=steam
Group=steam
Environment="templdpath=$LD_LIBRARY_PATH"
Environment="LD_LIBRARY_PATH=/home/steam/:$LD_LIBRARY_PATH"
Environment="SteamAppId=2394010"
ExecStartPre=/home/steam/palworld-maintenance.sh
ExecStart=/home/steam/.steam/steam/steamapps/common/PalServer/PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS > /dev/null
Restart=always
# Give the service more time to start
TimeoutStartSec=3min
# RuntimeMaxSec is dictated by how much memory is available on your server
RuntimeMaxSec=6h
LimitCORE=0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment