Linux setup
setting up with 22.04
https://linuxgsm.com/servers/pwserver/
Create a user and login.
sudo adduser pwserver
#what is displayed
Adding user `pwserver' ...
Adding new group `pwserver' (1002) ...
Adding new user `pwserver' (1002) with group `pwserver' ...
Creating home directory `/home/pwserver' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for pwserver
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
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
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=ts3server
WorkingDirectory=/home/ts3server
#Assume that the service is running after main process exits with code 0
RemainAfterExit=yes
ExecStart=/home/ts3server/ts3server start
ExecStop=/home/ts3server/ts3server stop
Restart=no
[Install]
WantedBy=multi-user.target
ctrl+x then y
You need to reload the systemd-daemon once to make it aware of the new service file by
systemctl daemon-reload
Now you can do
systemctl start ts3server # Start the server
systemctl stop ts3server # Stop the server
systemctl enable ts3server # Enable start on boot
systemctl disable ts3server # Disable start on boot
Auto updates
crontab -e
*/5 * * * * /home/pwserver/pwserver monitor > /dev/null 2>&1
*/30 * * * * /home/pwserver/pwserver update > /dev/null 2>&1
0 0 * * 0 /home/pwserver/pwserver update-lgsm > /dev/null 2>&1
0 0,6,12,18 * * * /home/pwserver/pwserver restart > /dev/null 2>&1