Skip to main content

Linux setup with LinuxGSM

Setting up with 22.04 Ubuntu With LinuxGSM

Requirements

CPU 4Cores (recommend)
RAM 16GB Recommend over 32GB for stable operation. It is possible to start the server with 8 GB, but the further you play, the server will crash due to out of memory.
Network UDP Port 8211 (Default) Port forwarding required.


https://linuxgsm.com/servers/pwserver/ 

https://tech.palworldgame.com/

 Create a user and login.

sudo adduser pwserver
usermod -aG sudo pwserver
su pwserver

 Download linuxgsm.sh.

wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh pwserver

Run the installer following the on-screen instructions.

./pwserver install

start/stop/restart

./pwserver start
./pwserver stop
./pwserver restart

Auto Start 

https://docs.linuxgsm.com/configuration/running-on-boot

You need to create a service file in /etc/systemd/system/
Example pwserver.service

sudo nano /etc/systemd/system/pwserver.service
[Unit]
Description=LinuxGSM Palworld Server
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
User=pwserver
WorkingDirectory=/home/pwserver
#Assume that the service is running after main process exits with code 0
RemainAfterExit=yes
ExecStart=/home/pwserver/pwserver start
ExecStop=/home/pwserver/pwserver stop
Restart=no

[Install]
WantedBy=multi-user.target
You need to reload the systemd-daemon once to make it aware of the new service file by sudo systemctl daemon-reload
Now you can do systemctl enable pwserver 
systemctl start pwserver # Start the server
systemctl stop pwserver # Stop the server
systemctl enable pwserver # Enable start on boot
systemctl disable pwserver # Disable start on boot

Auto updates/restarts/Monitor

  • Monitor your server every 5 minutes.
  • Check for an update every 30 minutes, update and restart only if an update is detected.
  • Update check and update LinuxGSM every Sunday at 1am.
  • Restart at midnight, 6am, noon and 6pm.
Discord Monitor webhook

Add code below to nano pwserver/lgsm/config-lgsm/pwserver/common.cfg

# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="on"
discordwebhook="Webhook URL"

Save and run ./pwserver ta to test


crontab -e
add these to bottom
*/5 * * * * /home/pwserver/pwserver monitor > /dev/null 2>&1
*/30 * * * * /home/pwserver/pwserver update > /dev/null 2>&1
0 1 * * 0 /home/pwserver/pwserver update-lgsm > /dev/null 2>&1
0 0,6,12,18 * * *  /home/pwserver/pwserver restart > /dev/null 2>&1
to change restart times use site below.
https://crontab.guru/#0_0,6,12,18_*__

Auto Backups

*/5 * * * * /home/pwserver/pwserver monitor > /dev/null 2>&1
*/30 * * * * /home/pwserver/pwserver update > /dev/null 2>&1
0 1 * * 0 /home/pwserver/pwserver update-lgsm > /dev/null 2>&1
0 0,6,12,18 * * *  /home/pwserver/pwserver restart > /dev/null 2>&1
*/10 * * * * /home/pwserver/pwbackup.sh > /dev/null 2>&1

Continue to editing configuration parameters