# How to bring your Rust server back after a power cut

[Rust server guides](https://rustsc.com/learn/index.html.md) / [Server management](https://rustsc.com/learn/management/index.html.md)

Automatic recovery has two parts. The host must power on when power returns, and the operating system must start your server when it boots.

## Set what the host does when power returns

Check the manual for your host or its motherboard for its power recovery setting. Some hosts offer a choice such as power on or restore the last power state. Choose the behaviour you want for your dedicated host. If the host stays off after an outage, an operating system startup task has no chance to run.

## Check Rust starts before anyone logs in

Use one startup method that launches the intended server. On Windows, use a Task Scheduler boot trigger if you use a scheduled task. On a Linux host using systemd, enable the configured server service. Run a planned reboot while you can reach the host. Leave it at the sign-in screen and have a client connect to the expected world.

A planned reboot checks the server startup part. Separately, check the firmware behaviour during planned downtime on a spare host with similar hardware if available. Avoid pulling power during a live game just to test recovery.

## Sources

- [Example Dell firmware manual for power recovery](https://dl.dell.com/manuals/common/dell-emc-remote-wake-up-config-dell-client-cmd-suite.pdf)
- [Microsoft guide to starting a task at boot](https://learn.microsoft.com/en-us/windows/win32/taskschd/starting-an-executable-on-system-boot)
- [systemd documentation for services started at boot](https://www.freedesktop.org/software/systemd/man/latest/daemon.html)

## Related resources

- [Host offline](https://rustsc.com/support/guides/computer-offline/index.html.md)
- [Start, stop or restart a server](https://rustsc.com/support/guides/start-stop-restart/index.html.md)

---

HTML version: https://rustsc.com/learn/management/rust-server-start-after-power-returns/
