# How to Run Dedicated Server Games From Commandline

**URL:** <https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [October 16, 2015, 10:53am UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488 "2015-10-16T10:53:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [October 16, 2015, 10:53am UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488/1 "2015-10-16T10:53:59Z")

</div>

#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:

 ![62922-dedicatedserverwinsockip.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/4/b4421eaef49adca1241931286bcdd47acb39319d.jpeg)

#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**

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Enjoy!

🙂

Rama

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [October 16, 2015, 10:54am UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488/2 "2015-10-16T10:54:39Z")

</div>

#For The Community

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

Have fun today!

#❤

Rama

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [November 16, 2015, 9:39am UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488/3 "2015-11-16T09:39:56Z")

</div>

#Why Do Clients Load Into Black Map?

Project Settings-\> Maps and Modes → Show All Advanced

Server map was probably “Entry”

😉

#❤

Rama

---

<div class="post-metadata">

**Author:** ![Mark\_James\_G](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mark\_James\_G](https://forums.unrealengine.com/u/Mark_James_G)\
**Post date:** [November 16, 2015, 5:49pm UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488/4 "2015-11-16T17:49:49Z")

</div>

_answered Oct 16 '15 at 2:54 AM_

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

---

<div class="post-metadata">

**Author:** ![Luis\_Martinez](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Luis\_Martinez](https://forums.unrealengine.com/u/Luis_Martinez)\
**Post date:** [August 24, 2018, 11:11pm UTC](https://forums.unrealengine.com/t/how-to-run-dedicated-server-games-from-commandline/335488/5 "2018-08-24T23:11:46Z")

</div>

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!
