# Set Up Scheduled Restarts on Your Valheim Server (/docs/valheim/scheduled-restarts)



import { Step, Steps } from 'fumadocs-ui/components/steps';

Regular restarts clear memory leaks and cached data, keeping your Valheim server at peak performance. Use the panel **Schedules** feature to automate this — no external tools or RCON required.

Why Restart Regularly [#why-restart-regularly]

Valheim servers gradually accumulate memory usage from:

* Players connecting and disconnecting
* World exploration loading new chunks
* Mods running background processes
* Long uptime without restarts

A daily restart fixes most performance issues and prevents the server from becoming sluggish.

Set Up an Automatic Restart [#set-up-an-automatic-restart]

<Steps>
  <Step>
    Open Schedules [#open-schedules]

    In the [XGamingServer Panel](https://panel.xgamingserver.com), click **Schedules** in the sidebar.

    {/* Screenshot needed: Schedules page */}
  </Step>

  <Step>
    Create a new schedule [#create-a-new-schedule]

    Click **New Schedule**. Give it a name (e.g., "Daily Restart") and set the cron timing — for example, every day at 4:00 AM.
  </Step>

  <Step>
    Add a Restart task [#add-a-restart-task]

    Inside the schedule, add a task with **Action: Restart Server**.
  </Step>

  <Step>
    Save and activate [#save-and-activate]

    Save the schedule and ensure it's set to **Active**. The server will restart automatically at the scheduled time.
  </Step>
</Steps>

> **Tip:** Schedule restarts during off-peak hours (usually early morning) to affect the fewest players. Check your server's player activity in **Activity** to find the quietest time.

Recommended Restart Frequency [#recommended-restart-frequency]

| Server Type           | Frequency           |
| --------------------- | ------------------- |
| Small (1–5 players)   | Once daily          |
| Medium (5–10 players) | Once or twice daily |
| Large (10+ players)   | Every 8–12 hours    |
| Heavily modded        | Every 6–8 hours     |

Multiple Schedules [#multiple-schedules]

You can create multiple restart schedules. For a busy server:

* **4:00 AM** — Early morning restart
* **4:00 PM** — Afternoon restart between activity peaks

Save Before Restart [#save-before-restart]

Valheim auto-saves before a graceful shutdown. To be extra safe, create a second scheduled task that sends a `save` command 5 minutes before the restart:

| Time    | Action                               |
| ------- | ------------------------------------ |
| 3:55 AM | Send Power → Custom Command → `save` |
| 4:00 AM | Send Power → Restart                 |

This guarantees the world saves immediately before the restart.

No Built-In Warnings [#no-built-in-warnings]

Valheim doesn't have a native restart warning system. Players will be disconnected when the restart happens and can reconnect once the server is back up (usually 30–60 seconds).

For warnings, use a mod like **WebhookMessages** or **Server Sided Messages** that can broadcast a message to all players ahead of the restart. Install via the panel **Mods** page.

Related Guides [#related-guides]

* [Server Performance](/docs/valheim/server-performance)
* [Backup & Restore](/docs/valheim/backup-restore)
* [Force Save](/docs/valheim/force-save)
