How to Run Dedicated Server Games From Commandline

#Overview

Dear Community,

I"ve just created a tutorial on how to run Dedicated Servers with 2 connecting clients from commandline! (editor closed)

The key part is that you can’t use 127.0.0.1 for the clients who want to connect to the dedicated server.

#Dedicated Commandline

When the server instands loads via this commandline (Assuming bat file is in same dir as .uproject of your game)

VictoryCreateDedicatedServer.bat

"C:\Program Files\Epic Games\4.9\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\YourProject.uproject" MapName -server -log -nosteam

You then have to check the log to find out what the IP address for the server is listed as!

You’ll see something like this:

#Client Commandline

You should use that IP address for your client commandline:

VictoryCreateClient.bat

TIMEOUT /T 6
 "C:\Program Files\Epic Games\4.9\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\YourProject.uproject" 192.168.0.3 -game -ResX=800 -ResY=900 -WinX=800 -WinY=20 -log -nosteam

#Running Dedicated w/ 2 Clients

 start VictoryCreateDedicatedServer
 start VictoryCreateClient
 VictoryCreateClient

#Wiki Link
How To Test Dedicated Server Games Via Commandline

Enjoy!

:slight_smile:

Rama

3 Likes

#For The Community

There was no tutorial I could find that explained this so I wrote this for your enjoyment.

Have fun today!

#:heart:

Rama

#Why Do Clients Load Into Black Map?

Project Settings-> Maps and Modes → Show All Advanced

Server map was probably “Entry”

:wink:

#:heart:

Rama

answered Oct 16 '15 at 2:54 AM

Yeah, that sounds about right coming from you Rama. Good job!

Hey Rama, Good Job. I’m just wondering if you would happen to know how to -log a dedicated server that was launched through FPlatform::CreateProc. I am able to see the server launch in my processes and I see the map opening correctly. I dont however see where to add the -log switch commandline argument so I can debug those Servers

Thanks for your time!