Setting up automatic restarts with warnings on a Palworld server ensures the game stays stable and prevents data corruption by cleanly shutting down during low-activity periods, while giving players time to save and log out. You'll need access to your server's host machine (physical or cloud), a working Palworld dedicated server installation, and basic command-line knowledge—no extra software is required if you're using built-in OS tools.

What You'll Need

  • A Palworld dedicated server installed and running (tested on Windows 10/11 and Ubuntu 20.04/22.04 LTS)
  • Server admin access (physical or SSH)
  • Text editor (e.g., Notepad on Windows, nano or vim on Linux)
  • Basic understanding of scheduled tasks or cron jobs
  • Optional: A backup of your save data (recommended before any automated changes)

Step-by-Step

  1. Verify your server is running as a persistent process. Before scheduling restarts, ensure your Palworld server starts reliably and stays running. On Windows, this is usually done via a batch file or Task Scheduler; on Linux, via systemd or screen/tmux. Confirm your server logs show "Server started" and players can join without issues.
  2. Locate your server configuration file. Navigate to the server directory (typically Pal/Saved/Config/WindowsServer on Windows or Pal/Saved/Config/LinuxServer on Linux) and open PalWorldSettings.ini. Find or add the line AutoSaveGameInterval=600.000000 (this sets auto-save every 10 minutes—adjust as needed). Save the file.
  3. Create a restart warning script. This script will broadcast warnings and then stop the server cleanly. On Windows, create a new file named restart_with_warning.bat in your server root folder with this content:
    @echo off
    %1 mshta vbscript:CreateObject("WScript.Shell").Run("%~dp0PalServer.exe --stop",0,true)
    echo Waiting 30 seconds before shutdown...
    timeout /t 30 /nobreak >nul
    echo Broadcasting final warning...
    %1 mshta vbscript:CreateObject("WScript.Shell").Run("echo Warning: Server restarting in 10 seconds >> PalServer.log",0,true)
    timeout /t 10 /nobreak >nul
    echo Stopping server...
    %1 mshta vbscript:CreateObject("WScript.Shell").Run("taskkill /f /im PalServer.exe",0,true)
    Note: This uses a workaround to simulate console input since Palworld's server doesn’t accept remote shutdown commands. On Linux, create restart_with_warning.sh:
    #!/bin/bash
    echo "Server restart initiated. Broadcasting warnings..."
    echo "Warning: Server restarting in 30 seconds..." >> PalServer.log
    echo "Warning: Server restarting in 20 seconds..." >> PalServer.log
    echo "Warning: Server restarting in 10 seconds..." >> PalServer.log
    sleep 30
    

    If running in screen/tmux, attach and send "quit"

    Otherwise, kill the process cleanly if possible

    pkill -f PalServer echo "Server stopped." sleep 5
    Make it executable with chmod +x restart_with_warning.sh.
  4. Schedule the restart task. On Windows, open Task Scheduler > Create Task > Triggers tab > New > Set recurrence (e.g., daily at 04:00) > Advanced settings > Repeat task every 1 day for a duration of Indefinitely. In the Actions tab > New > Browse to your restart_with_warning.bat file. Ensure "Run whether user is logged on or not" is checked. On Linux, open your crontab with crontab -e and add a line like 0 4 * * * /home/youruser/palworld/restart_with_warning.sh (adjust paths and time as needed).
  5. Test the setup. Manually run your script once (e.g., double-click the .bat file or ./restart_with_warning.sh) and verify logs show the warning messages, followed by a clean shutdown. Check PalServer.log for entries like "Server stopping..." and "Server stopped." Also confirm players receive in-game chat warnings (if your server uses a plugin to echo logs to chat) or that the server becomes unresponsive briefly before restarting.
  6. Enable optional in-game chat warnings (Linux only). If you use a screen session to run the server, modify the script to send chat messages before shutdown:
    screen -S palworld -X stuff "broadcast Server restarting in 30 seconds...$(printf \r)"
    sleep 30
    screen -S palworld -X stuff "broadcast Server restarting in 10 seconds...$(printf \r)"
    sleep 10
    screen -S palworld -X stuff "quit$(printf \r)"
    This requires the server to be running inside a screen session named palworld. Adjust the session name if different.
  7. Verify auto-restart. After a successful manual test, let the scheduled task run at its next interval. Confirm the server comes back online by checking PalServer.log for "Server started" and testing a player connection. Ensure the save file timestamp updates after the restart (e.g., Saved/SaveData/PalWorldsav).

Common Mistakes

  • Using the wrong shutdown command. Palworld’s server doesn’t respond to standard kill signals on Windows without a script that forces termination. Skipping the warning phase can cause players to lose progress if they’re mid-action.
  • Ignoring file permissions. On Linux, if the script fails silently, check ls -l restart_with_warning.sh to ensure it’s executable. Also ensure the user running the cron job owns the Palworld folder.
  • Overlapping tasks. If the previous restart is still running when the next scheduled task triggers (e.g., due to a long warning countdown), multiple processes may compete. Always allow at least 60 seconds between scheduled restarts and the script’s total runtime.
  • Hardcoding paths with spaces. On Windows, wrap paths in quotes only if the script uses them correctly (e.g., "C:\PalServer\PalServer.exe"), but avoid spaces in folder names for reliability.

Tips

  • Run restarts during low-traffic hours (e.g., 4:00 AM local server time) to minimize disruption.
  • Log all warnings to a separate file (e.g., restart_log.txt) to track timing and success.
  • Use a separate batch/shell script to start the server after shutdown—don’t rely on the OS to auto-restart the service unless you’ve configured a watchdog (see troubleshooting).
  • Keep a backup of PalWorldSettings.ini and your Saved/SaveData folder before testing—automated restarts can expose race conditions in saves.
  • On Linux, consider using systemd’s Restart=on-failure as a fallback, but pair it with a manual restart script for controlled warnings.

Troubleshooting

If the server doesn’t restart as scheduled:

  1. Check the task/service status. On Windows, open Task Scheduler and verify the task’s "Last Run Time" and "Last Task Result" (0x0 = success). On Linux, run systemctl status cron and journalctl -u cron for errors.
  2. Look for process conflicts. If multiple Palworld processes appear in Task Manager or ps aux | grep PalServer, kill all instances manually before retesting.
  3. Verify script syntax. On Windows, run the .bat file from Command Prompt to see real-time errors. On Linux, test the script manually with bash -x restart_with_warning.sh to trace execution.
  4. Confirm log permissions. If warnings don’t appear in PalServer.log, ensure the user account has write access to the server folder (e.g., icacls "C:\PalServer" /grant Users:F on Windows).
  5. Test with shorter intervals. Temporarily schedule a restart every 5 minutes (during off-peak) to isolate timing issues.
  6. Restore from backup. If saves become corrupted during restarts, replace Saved/SaveData/PalWorldsav with the last known-good backup before retrying.

Frequently Asked Questions

How often should I restart my Palworld server?

Every 12–24 hours is ideal for stability. More frequent restarts (e.g., every 6 hours) may be needed if you notice memory leaks or lag buildup, but avoid restarting more than once per 4 hours to reduce save corruption risk.

Will automatic restarts delete player builds or items?

No—if auto-save is enabled and the server shuts down cleanly, player progress is saved. Always keep AutoSaveGameInterval at or below 600 seconds (10 minutes) for safety.

Can I use a third-party tool like PM2 or supervisor?

Yes, but only for Linux. Tools like PM2 can auto-restart the server if it crashes, but they won’t handle warnings. Combine them with a custom script that stops the server gracefully before PM2 restarts it.

Why do players still see "Connection lost" instead of warnings?

Palworld’s server doesn’t natively broadcast server shutdowns to players. You’ll need a mod (e.g., Palworld Server Manager) to echo log messages to chat. Without it, players only see a disconnect when the process terminates.

Does this work on hosted servers (e.g., Nitrado or G-Server)?

No—most managed hosting providers block custom scripts and scheduled tasks. Contact support to request scheduled maintenance windows or use their built-in restart tools if available.

What if the server doesn’t start back up after a restart?

Check PalServer.log for port conflicts (e.g., "Failed to bind port 8211"). Kill any lingering processes, verify your PalServer.exe isn’t blocked by antivirus, and ensure no firewall rules changed after the restart.