How do I make a Minecraft-like dedicated server for my game?

Hey guys,

I’m looking to create a dedicated server for my game which works like the dedicated server minecraft has.
Basically it’s a like a CMD window. I want the same kind of server setup. I want the host to be able to, for example type ‘kill player1’ in the server window and execute it.

Where do I start and how do I build/package the server?

If you useing UE4’s replication system it already have dedicated server support, because what dedicated server is, it’s mode when only server portion is active without client. Dedicated server mode is build in by default here you can find instructions how to do run it:

You can also build engine to have only server, you would need to build it from engine source as server build (or im missed something? ;p). But in usually dedicated server is distributed together with client as buildin feature , at least in Q3 engine times. Minecraft is exception as they developed server and client separately, not long ago they integrated them both.

Thank you for your answer.
The thing is that I can’t get it to work. I must be doing something wrong but I just can’t build the dedicated server. Is there, besides that page, a detailed step by step tutorial to build the dedicated server?

Whats going wrong? can you describe it?

Not really.
When I try to run my game through command line with: -server. It does just start the game, not the server.
So I tried really building a dedicated server with the following page: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

The thing is, it says: “The next step is to compile the server code using Visual Studio”… I have no idea how to compile the server. I know how to add an actor class and other classes to my project. But not how to compile the code from that page to create a dedicated server.

I hope you can still catch my drift because I’m confused an I’m not native English so it’s not the easiest thing to explain things for me :wink:

Here you have guide how to set up C++ development environment which let you compile your project:

Thanks for the link! I will soon try it it out and let you know if I succeeded. thank you for your help so far.

con hamchi

starting my game’s dev build from the commandline (in version 4.17.2) with -server -log
does not seem to make a difference, either (same as your problem). The game just launches as if I double clicked it, rendering graphics and making sounds and playing the game as a player instead of acting like a dedicated server.

Dedicated servers have advanced performance potential making them an efficient platform for gaming workloads. Minecraft dedicated servers are the ideal option for online Minecraft gaming. In this tutorial, you will learn why and how to set up a dedicated Minecraft server.