Building UE4 source to render in headless mode

Hi.I would like to use UE4 in a headless mode.By “headless” I mean,that I want to render not to a display,but to a texture which I can then store to disc,send over network,etc.So the question is whether I have to hack into engin’s source,locate the framebuffer,read the final frame to CPU and disable blit into display,or there is some compiler flag which can build the engine to be run in headless mode.With the first option I see the problem,where it is not enough to read the frame buffer data,but the context init,at least on Linux, should also be headless(probably using egl or pbufer),because when running on a headless server it will probably fail to create display based context.All that means I need also to change the way UE create the OpenGL context.Any advice here?

Hi were you able to figure this out? I am also interested in running UE4 in headless mode as well.

It took me a while to find for this, but for anyone still searching for this answer, since Unreal version 4.14 headless rendering (using EGL through SDL) has been supported on Linux. You shouldn’t have to change any settings, the executable should just be able to run. Reference these links for more info: