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.
To run BeamNG.tech with command-line arguments, you can use the following instructions depending on your operating system.
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
BeamNG.tech.exe -arg1 -arg2 -arg3
You can also create a shortcut to the BeamNG.tech.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
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
These arguments are used to control the connection to BeamNGpy. BeamNGpy always tries to connect to an existing BeamNG instance, but it will be successful only if the BeamNG instance started the server. If BeamNGpy doesn’t manage to connect, it will try to launch a new BeamNG session.
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.
Windows: BeamNG.tech.exe -tcom -console
Linux: BinLinux/BeamNG.tech.x64 -tcom
After launching BeamNG, you can use BeamNGpy to connect to the existing instance:
from beamngpy import BeamNGpy
beamng = BeamNGpy('localhost', 25252) # Replace with the IP/port you specified if not default
beamng.open() # Connect to BeamNG.tech
print(beamng.system.get_info()) # Gets information about host system
{'type': 'GetSystemInfo', 'tech': True, 'os': {'buildNumber': 2.0, 'versionMinor': 4.0, 'shortname': 'Ubuntu', 'type': 'linux', 'fullname': 'Ubuntu VERSION="24.04.2 LTS (Noble Numbat)"', 'gamearch': 'x64', 'bits': 64.0, 'versionMajor': 24.0}}
You can set the -tport and -tcom-listen-ip to listen on another port/address. In this example, BeamNG starts a server listening on 192.168.0.3:12345.
Bin64\BeamNG.tech.x64.exe -tcom -console -tport 12345 -tcom-listen-ip 192.168.0.3
You can use a custom BeamNGpy Wireshark plugin to debug the communication protocol on the network layer.
Debugging BeamNGpy using Wireshark
The list of BeamNG.tech related arguments follows.
-tcom: Starts the BeamNGpy server, by default on 127.0.0.1:25252.-tport N: Sets the TCP port on which the BeamNGpy server listens to N.-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.-tcom-capture FILENAME: Runs the capture with the provided VFS filename using the Capture Player
.-physicsfps f: Sets the physics simulation frequency (number of physics steps per simulated second) to f. By default, f = 2000. Too high values of f can result in slower-than-realtime simulation and unexpected behavior. Values lower than the default are not
recommended and can result in limited simulation accuracy and stability.-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).-headless: Enables headless mode (no window shown). For more information, see the Headless Mode
documentation page.There are multiple sandboxes which can be controlled by the usage of the BeamNG.tech arguments:
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: Disable the CEF renderer sandbox. Unused in current versions.-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.-console (Windows only): The extra console window is open on start.-noColorStdOutLog (Linux only): Disables the colors in the standard output of the program.-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.-batch: Runs in non-interactive mode (no system dialogs are shown).SDL_VIDEODRIVER=wayland (Linux only): Forces the native Wayland window manager implementation.Was this article helpful?