As the title says, in order to run a dedicated server, I need to build from source the entire engine? I’m currently diging into this and so far that’s what I figured it out but. I came from unity, there I just build the game in the same way as a client and then, start it in headless mode y pass to it some flags to use it as a dedicated server. Can I do this on UE4 ?
Dedicated server mode is avable in any build with server code build (build with WITH_SERVER defined) an can host the game, which is only excluded in Client build as far as i know. To run dedicated server all you need to do is start game with -server option in command line and you can run it even from editor on your project (with -game option to run without editor) as examples there:
You only need to special build if you want special build just with dedicated server mode (aka Server build) without client and rendering portion, same goes with Client build which only contains client portion of the code, you need to do special build for it too. The default game build that launcher version of UE4 comes with server code. But only need that build when you got paid game and you want to distribute server for free, for example RTCW:Enemy Territory never had dedicated server build, because it was free, server providers only placed full game on the server and run it on dedicated server mode.
Btw you can run it directly in editor, there “Run Dedicated Server” option when you extend play button (menu where you got all play modes avable)
Editor build of engine is mostly full featured anyway, so things like special builds of your game you can always worry about it later. Ofcorse you need to remember plans about them when you code your game so you don’t trip on it later.