Open your Projects DefaultEngine.ini located in \ProjectDir\Config\DefaultEngine.ini, paste the code (or parts of it) shown below and customize to your needs.

MAKE SURE you don’t already have these settings in your Config file before copy-pasting.

[URL]
GameName=GameName
Port=7777

[OnlineSubsystemSteam]
bEnabled=True
SteamAppId=480
SteamDevAppId=480

[OnlineSubsystem]
DefaultPlatformService=Steam