Wrap the code for that with **WITH_SERVER_CODE **Preprocessor flag
Example
#if WITH_SERVER_CODE
// code to load up your mananger and stuff here
#endif
in this setup the code to load manager and other things would only be present in the Server builds and hence will only run on dedicated servers