# Building UE4 source to render in headless mode

**URL:** <https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634>\
**Category:** C++\
**Tags:** opengl, unreal-engine, UE4, question, CPP\
**Created:** [October 27, 2016, 3:48pm UTC](https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634 "2016-10-27T15:48:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [October 27, 2016, 3:48pm UTC](https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634/1 "2016-10-27T15:48:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8df75c1d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8df75c1d](https://forums.unrealengine.com/u/anonymous_user_8df75c1d)\
**Post date:** [January 23, 2017, 10:16am UTC](https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634/2 "2017-01-23T10:16:37Z")

</div>

Hi, I am trying to do exactly the same here. Did you make any progress? Is there any way of getting this to work without modifying the engine’s source code?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c4f2f7c7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c4f2f7c7](https://forums.unrealengine.com/u/anonymous_user_c4f2f7c7)\
**Post date:** [August 7, 2018, 9:31pm UTC](https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634/3 "2018-08-07T21:31:03Z")

</div>

It took me a while to find for this, but for anyone still searching for this answer, since Unreal version 4.14 headless rendering 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:

> **[Can't run ue 4.19 on a headless ubuntu 16.04](https://forums.unrealengine.com/questions/800917/cant-run-ue-419-on-a-headless-ubuntu-1604.html)**
>
> I’m trying to run ue 4.19 on a headless ubuntu 16.04 without success. My card: 1080ti, nvidia driver: 390.67 I’ve installed ‘xserver-xorg-video-dummy’ and my xorg looks like this: Section "Module" Load "RANDR" Load "dbe" Load ...

> **[What's New](https://docs.unrealengine.com/5.2/en-US/whats-new/)**
>
> Information about new features in each release of Unreal Engine

---

<div class="post-metadata">

**Author:** ![SasMaster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SasMaster](https://forums.unrealengine.com/u/SasMaster)\
**Post date:** [February 15, 2021, 8:49am UTC](https://forums.unrealengine.com/t/building-ue4-source-to-render-in-headless-mode/374634/4 "2021-02-15T08:49:21Z")

</div>

Hi Nick. This is an old one but I am still curious to know: Once the headless mode is set, is there a default setup for where the frames are stored? Or it is something I have to configure inside the application?Thanks.
