# Dedicated Server - How to handle save files?

**URL:** <https://forums.unrealengine.com/t/dedicated-server-how-to-handle-save-files/1279065>\
**Category:** Programming & Scripting\
**Tags:** dedicated-server, unreal-engine, question, CPP\
**Created:** [August 31, 2023, 6:54pm UTC](https://forums.unrealengine.com/t/dedicated-server-how-to-handle-save-files/1279065 "2023-08-31T18:54:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![0xsomeone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0xsomeone](https://forums.unrealengine.com/u/0xsomeone)\
**Post date:** [August 31, 2023, 6:54pm UTC](https://forums.unrealengine.com/t/dedicated-server-how-to-handle-save-files/1279065/1 "2023-08-31T18:54:26Z")

</div>

Hello everyone,

I have a question in regard to server-side save files. I have read all relevant resources (i.e. WizardCell as well as that multiplayer compendium) but it seems no one is talking about how to manage data on the server.

I have created a simple save file subsystem, however, I am facing trouble connecting to the correct lifecycle hooks for the following:

- Handling Player Data on Player Exit (i.e. position & rotation of pawn)
- Saving All Data on Server Exit (i.e. Play-In-Editor stop / exit)

I am trying to use a combination of the `GameModeBase::Logout` function and data stored in the `PlayerController`, however, I cannot find the right hooks on the `PlayerController` to store the controlled pawn’s rotation / transform before they exit / logout from the game. I have tried all the following hooks to no avail:

- `AActor::OnNetCleanup` ← Called before `GameModeBase::Logout` but `GetPawn` not available here
- `AActor::BeforeDestroy` ← Called after `GameModeBase::Logout`

I do not want to resort to an external solution (i.e. SQL database) as I want the servers to be runnable on any machine, I do not care about cheating. I just wish to store some data on the server whenever a client disconnects as well as write the save file to disk when the server shuts down.

---

<div class="post-metadata">

**Author:** ![PDubulous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pdubulous/32/1194655_2.png) [@PDubulous](https://forums.unrealengine.com/u/PDubulous)\
**Post date:** [April 8, 2026, 1:32pm UTC](https://forums.unrealengine.com/t/dedicated-server-how-to-handle-save-files/1279065/2 "2026-04-08T13:32:55Z")

</div>

Did you ever sort this out? We are facing a similar issue right now.
