# How to host session on dedicated server if it has no player?

**URL:** <https://forums.unrealengine.com/t/how-to-host-session-on-dedicated-server-if-it-has-no-player/652461>\
**Category:** Multiplayer & Networking\
**Tags:** dedicated-server, online-session, unreal-engine, UE5-0, question\
**Created:** [September 20, 2022, 10:16am UTC](https://forums.unrealengine.com/t/how-to-host-session-on-dedicated-server-if-it-has-no-player/652461 "2022-09-20T10:16:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 20, 2022, 2:43pm UTC](https://forums.unrealengine.com/t/how-to-host-session-on-dedicated-server-if-it-has-no-player/652461/2 "2022-09-20T14:43:55Z")

</div>

What i did - i’ve crated NetId mannually.

```auto
FUniqueNetIdPtr unid = (FUniqueNetIdRef)FUniqueNetIdString::Create(FString::Printf(TEXT("Dedicated-Server%d"), 0), NULL_SUBSYSTEM);

```

But then it turns out that FOnlineSessionNull::CreateSession desnt even need it:

```auto
bool FOnlineSessionNull::CreateSession(const FUniqueNetId& HostingPlayerId, FName SessionName, const FOnlineSessionSettings& NewSessionSettings)
{
	// todo: use proper	HostingPlayerId
	return CreateSession(0, SessionName, NewSessionSettings);
}

```

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-host-session-on-dedicated-server-if-it-has-no-player/652461)._
