Server ownership on dedicated server

I have an actor thats replicated and is spawned on the server. When i try to call RPC’s i get a warning that the owning connection isnt setup, but im not sure what the owner should be, since the server doesnt have a controller or pawn. Anyone know what the owner should be?

the server doesnt have a controller or pawn

Normally, the server does have both controllers and pawns. (The controller is replicated to the owning client and the pawn is replicated everywhere.)

In PIE mode under settings on top right of outliner you can switch between the worlds of server and the clients so you can see which actors are present in each world and what their properties are.

There is a really good YouTube video on unreal networking by Alex Forsythe here:

You could be right about the controller, but im not sure how to get it. The server does not have a pawn though, and isnt going through the normal player login process, so im confused on how to get the servers controller, playerstate, etc so i can make them owners of certain actors.

For anyone that runs into the same question, you have to make sure that the non-owned actor has no RPC’s and create the RPC’s in an actor that has an owner, like a PlayerController. Then just call a regular event to that actor. There is no pawn, controller, playerstate, etc that the server uses to own these kinds of actors so this is the only work around ive found.

Only players have PlayerControllers which include a Listen-Server but a dedicated server won’t have a PlayerController of its own.

Multicast RPC’s work fine on Actors with no Owner.

Server RPC’s when called by the Server will be called instantly as a regular Function.

Client RPC’s should not be called with no owner and will log a warning but when called from a server it will be called regardless as a regular Function.

That is not correct. A dedicated server has the authority instance of all APlayerControllers. These are created/returned by the Login function of AGameModeBase when the UPlayer travels to a map. These are then replicated as autonomous proxies to their owning client. (Non-owning clients do not receive a copy.)

You can see this in (for example) AGameModeBase::GetNumPlayers() which iterates all the player controllers in the world. (Recall that game modes only exist on the server and are not replicated.)

The behaviour of RPCs depending on kind and context is well-documented on this page:

The question is about Dedicated Server Ownership what you are referring to is where the Actors are spawned also known as authority. Obviously the server is spawning everything that is being replicated since that is how replication works.