Skip to content

Workstation Command Line Flags

Warning

Important Version Difference

  • Versions before 8.4.313 → only support command line arguments / shortcut flags, and do not use -D. Example: -exclusiveHost=192.168.2.28:8080

Overview

CostOS Workstation can be customized at launch using command line flags. There are two ways to apply them:

  1. Default configuration via CostOS.l4j.ini

  2. This file already exists in the installation folder next to CostOS.exe.

  3. Any -D flags inside it are automatically applied whenever anyone launches the application.
  4. Useful for setting company-wide or installation-wide defaults.
  5. Extra configuration via shortcut or command line

  6. If you need specific properties for a particular launch, add them at the end of a shortcut or when running from the command line.

  7. These override or extend the defaults from the .ini file.

Editing CostOS.l4j.ini

  • Location: same folder as CostOS.exe.
  • Format: one flag per line.
  • Example:
-Dlogfilelocation="D:\SharedLogs\costos"
-DauthenticationMode=WINDOWS

Whenever the application is started, these settings will be applied.


Adding Flags via Shortcut

  1. Exit any running instance of CostOS.
  2. Right-click your CostOS shortcut → Properties.
  3. In the Target field, append -D flags at the end.

Example:

"C:\Program Files\CostOS\CostOS.exe" -DexclusiveHost=192.168.2.28:8080
  1. Launch CostOS like normal.

Adding Flags via Command Line

You can also launch CostOS directly with flags:

CostOS.exe -exclusiveHost=192.168.2.28:8080 -DauthenticationMode=WINDOWS

Supported Parameters

Flag Description Example
-DexclusiveHost Sets the server hostname. The login hostname field becomes non-editable. -DexclusiveHost=192.168.2.28:8080
-DpropertiesFolder Changes the folder where user properties/configs are saved. Useful for multiple installations. Supports Java system properties (e.g., ${user.home}, ${user.name}) and environment variables (e.g., ${env:APPDATA} or %APPDATA% on Windows). -DpropertiesFolder=.costos2
-DpropertiesFolder="D:\costosFolder\${user.name}\.costos2"
-DpropertiesFolder="%APPDATA%\.costos2"
-Dlogfilelocation Defines the log file location. Supports Java system variables (e.g., ${user.home}, ${user.name}). Also supports environment variables via ${env:VAR_NAME} (e.g., ${env:APPDATA})
Default: {install}\bin\logs.
-Dlogfilelocation="logs2"
-Dlogfilelocation="\\hostname\logs"
-Dlogfilelocation="${user.home}/logs/"
-Dlogfilelocation="${env:APPDATA}/CostOS/logs"
-DauthenticationMode Sets the default authentication mode. -DauthenticationMode=USERNAME_PASSWORD
-DauthenticationMode=WINDOWS
-DauthenticationMode=WEB
-DssoTimeoutSeconds Maximum time (in seconds) between login start and SSO completion. -DssoTimeoutSeconds=50
-DbrowserCommand Command or path to launch the browser for authentication. -DbrowserCommand=firefox
-DbrowserCommand="C:\Program Files\Google\Chrome\Application\chrome.exe"
-DpropertiesOSEncryption Enables OS-based encryption for sensitive data stored in the ui.properties file. The encryption key is generated from the machine’s hardware, ensuring the data can only be decrypted on the same system.
⚠️ Important: If a user profile is moved to another machine with different hardware, decryption will fail. In such cases, set this parameter to false, and the system will use a static encryption key instead.
Default value: true
-DpropertiesOSEncryption=true
-DpropertiesOSEncryption=false