Headless mode is a feature of BeamNG that allows you to run the simulation with no window shown. This can be useful in server or cloud environments where no displays are connected. To control the simulation, you can use BeamNGpy or your custom Lua extension.
In this mode, CEF (the web UI framework) is not running and therefore UI is not rendered. Other than that, the full rendering pipeline runs but the presentation is skipped.
You still need a GPU which supports all the features required by non-headless BeamNG.
To run headless you have to launch BeamNG with the -headless
command-line argument
. It is common to add the -tcom
argument to be able to control the simulation from BeamNGpy (see the Connect to BeamNGpy
section).
BinLinux/BeamNG.tech.x64 -headless -tcom
Bin64\BeamNG.tech.x64.exe -headless -tcom
You can use the Docker template which is included with instructions in the BeamNG.tech /tech/docker
directory. The Docker template already includes the -headless
argument in the configuration.
To run without a visible window on Linux but still render the UI, you can use the X Virtual Framebuffer (Xvfb):
sudo apt-get install xvfb # install Xvfb
xvfb-run --auto-servernum BinLinux/BeamNG.tech.x64 # put other command-line arguments here, -headless is not needed
Was this article helpful?