A comprehensive batch file crafted to seamlessly manage server operations, including automated server restarts, Discord webhook notifications, update checks, warning broadcasts, data backups, crash recovery, 4-hour interval auto-backups, and backup creation before each restart.
This batch file performs the following tasks:
- Checks for updates.
- Launches the server.
- Sends a Discord webhook message indicating that the server is online after 2 minutes and at the 5-minute warning.
- Initiates in-game broadcasts for a 5-minute warning and a 1-minute warning, as well as saving data, after 8 hours.
- Initiates in-game broadcasts for a restart warning and a 1-minute warning, as well as saving data, after 8 hours.
- Performs a backup of save files after shutting down the server, then loops back to checking for updates.
- Backs up every 4 hours.
- Checks every 5 mins if the server has crashed and restarts it.
-
Place the startup batch file (
start_server.bat
) in the same directory as yourPalServer-Win64-Test-Cmd.exe
. For example, if yourPalServer-Win64-Test-Cmd.exe
is located at\PalServer\Pal\Binaries\Win64
, place the batch file there. -
Place
ARRCON.exe
in the same location as the batch file. -
Update
C:\SteamServers\steamapps\common\PalServer\steamcmd.exe
to match the location of yoursteamcmd.exe
. -
Change
C:\SteamServers\steamapps\common\PalServer\Pal\Binaries\Win64\PalServer-Win64-Test-Cmd.exe
to match the location of yourPalServer-Win64-Test-Cmd.exe
. -
Add any command line arguments you need for your server after
EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
. Such as-port=8211
-RCONPort=25575.
-queryport=27015
-
Ensure IP address
192.0.0.1
, port25575
for RCON, and admin password match your server configuration. -
Update
C:\SteamServers\steamapps\common\PalServer\Pal\Pal\Saved\SaveGames\
to match the location of your savegames folder. -
Update
C:\Users\NoPantsCarl\Documents\PalWorld_BackUps
to where you want the backups to be located. -
Update
D:\PalWorld_BackUps
to the location where you'd like your secondary backups in case the primary location fails. -
Replace
Your Discord Webhook URL
with your actual Discord webhook URL. -
Customize
Your Server Name
,STARTING
,ONLINE
andRESTARTING
to the desired messages for your Discord webhook. -
Adjust the duration of the server restart by changing the
timeout
value (in seconds) aftertimeout /t 14400
. For example, for an 8-hour restart, set it totimeout /t 14400
. -
Optionally, adjust the timeout duration after server boot on line 14 (
timeout /t 120
). The default is 120 seconds, allowing time for the server to initialize before players join.
To verify the server's status, we employ a supplementary batch file to check its activity. Place this batch file in the same directory as the server startup script. Adjust the path C:\SteamServers\steamapps\common\PalServer\Pal\Binaries\Win64
to match the location of your server startup script.
If you don't want to use Discord webhooks, you can remove line 14 (timeout /t 120
) and all the other lines that start with curl
.
Feel free to reach out if you need further assistance! I might update this guide to be clearer in the future!