Command-line arguments can be used to tweak some parameters of BeamNG.tech before the simulation starts. This page contains a list of all such parameters useful for BeamNG.tech.
How to Use
To run BeamNG.tech with command-line arguments, you can use the following instructions depending on your operating system.
Windows
Start an instance of “Command Prompt” and use the following commands to run BeamNG.tech with command-line arguments.
cd /d C:/path/to/BeamNG.tech
Bin64\BeamNG.tech.x64.exe -arg1 -arg2 -arg3
You can also create a shortcut to the BeamNG.tech.x64.exe
executable with the New → Shortcut
option in Windows context menu. You can set the arguments in the Properties
of this shortcut.
Create a new shortcut in the desired location Set the arguments in the shortcut properties
Linux
Start an instance of a terminal and use the following commands to run BeamNG.tech with command-line arguments.
cd /path/to/BeamNG.tech
BinLinux/BeamNG.tech.x64 -arg1 -arg2 -arg3
Connect to BeamNGpy
These arguments are used to control the connection to BeamNGpy.
If you want to start BeamNG.tech instance which is ready to be connected to BeamNGpy and listens to connections on 127.0.0.1:25252
(the default), use the following arguments. Because of the way how arguments are parsed on different operating systems, the command-line is a little different for Windows and Linux.
Windows
Bin64\BeamNG.tech.x64.exe -tcom-listen-ip 127.0.0.1 -lua extensions.tech_techCore.openServer(25252) -console
Linux
BinLinux/BeamNG.tech.x64 -tcom-listen-ip 127.0.0.1 -lua "extensions.tech_techCore.openServer(25252)"
Arguments List
The list of all BeamNG.tech related arguments follows.
BeamNGpy
-tcom-listen-ip X.X.X.X
: Sets the IP address on which the BeamNG.tech server binds and listens to BeamNGpy clients.-tcom-debug
: Enables the BeamNG.tech communication debug mode. That has multiple effects: the Capture Player is automatically recording captures in this mode, and also errors in BeamNGpy protocol crash the communication and full stacktrace is shown.
Physics
-physicsfps N
: Sets the number of physics steps per second toN
. By default,N=2000
. Too high values ofN
can result in slower-than-realtime simulation and unexpected behavior.
Graphics
-gfx dx11
(Windows only): Sets the rendering API to DirectX 11 (default for Windows).-gfx vk
: Sets the rendering API to Vulkan (default for Linux).
Security
There are multiple sandboxes which can be controlled by the usage of the BeamNG.tech arguments:
- Lua sandbox: Limits the usage of LuaJIT API to reduce the possibility of running malicious code (shared library loading, unsafe memory operations, etc.).
- Network sandbox: Limits the IP addresses and domains that BeamNG can connect to.
- CEF renderer sandbox: A feature of the Chromium Embedded Framework which protects the browser renderer process.
In the default configuration of BeamNG.tech, the Lua sandbox is disabled, the network sandbox is enabled, and the CEF renderer sandbox is enabled. This may change in the future to the security-by-default approach.
-enable-sandbox
: Enables the Lua sandbox and enables the network sandbox.-disable-sandbox
: Disables the Lua sandbox and disables the network sandbox.-nosandbox
: Disables the network sandbox only. The name of this argument is in place for historical reasons.-nocefsandbox
(Linux only): Disable the CEF renderer sandbox. This can be used to bypass the error “The SUID sandbox helper binary was found, but is not configured correctly” which occurs on some Linux configurations (Docker, Ubuntu 24.04).
Headless Mode
-batch
: Runs in non-interactive mode (no system dialogs are shown).-headless
(Linux only): NOT USABLE YET! Enables true headless mode (no window is rendered).
To run without a visible window on Linux (such as on servers), 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
You will still need a GPU which supports all the Vulkan features required by non-headless BeamNG. You can also use the Docker template which is included with instructions in the BeamNG.tech /tech/docker
directory.
Annotations
-partannotationconfig
: Configuration file for colors of vehicle part annotations. Used by the Impactgen project.-annotationconfig
: Configuration file for colors of object annotations. Used by the Impactgen project.
Miscellaneous
-console
(Windows only): The extra console window is open on start.-colorStdOutLog
(Linux only): Standard output of the program is colored depending on the logging level of the shown messages.-lua CHUNK
: Runs a chunk of Lua code during BeamNG startup.-luastdin
: BeamNG accepts Lua commands from the standard input.-luadebug
: Starts a Lua debugging server on port 21110, which can be used to debug BeamNG.tech using the Lua Remote Debugger for Visual Studio Code extension.-attachOnStart
: Usable only with-luadebug
. The simulator waits until debugger is attached before starting.