# Command-line flags

> Every command-line flag of the eaxPLC binaries, with type, default and description.

Product: eaxPLC · Type: Reference · Editions: Free
Source: https://eaxware.com/docs/eaxplc/reference/generated/cli/
Verified against commit 6a5fc9e.

<!-- GENERATED by tools/docgen (node tools/docgen/docgen.mjs). Do not edit by hand: change the source and regenerate. -->

Command-line flags of the eaxPLC binaries, read from their flag definitions. A flag can be written with one or two dashes (`-flag` or `--flag`); `-h` prints the same list.

## `eaxsim`

Source: `eaxPLC/cmd/eaxsim`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-http` | string |  | HTTP API address (default: the scenario's, 127.0.0.1:8090; "-": none) |
| `-local-users-breakglass` | bool | `false` | with `--scada-url`: let local users sign in and sign while eaxScada is unreachable (audited BREAK_GLASS; default off) |
| `-mode` | string |  | override the scenario's mode: realtime or virtual |
| `-nats` | string |  | NATS broker (default: the scenario's; "-": none) |
| `-nats-nkey` | string |  | NKey seed file the UNS prefix guard connects to the broker with (a broker that requires NKeys, as eaxScada's; the identity must subscribe plc.*.birth, plc.*.status and uns.telemetry.&gt;; empty: the broker URL's credentials); when the guard cannot connect with it, every PLC's UNS telemetry and commands are refused |
| `-report` | string |  | check the scenario's expect entries (virtual time) and write the eaxsim.checks/1 report to this file when the run ends; exit 1 unless the verdict is pass |
| `-restore` | string |  | continue from a snapshot file (taken from the same scenario) |
| `-save` | string |  | write a snapshot of the plant to this file when the run ends |
| `-scada-url` | string | `http://127.0.0.1:8080` | eaxScada base URL: sign-in, e-signatures and its PLC token key (ignored with `--standalone`; EAX_DEV_MODE=1 disables auth for development) |
| `-scenario` | string |  | scenario file (JSON) |
| `-speed` | float | `-1` | virtual mode: speed factor (0: as fast as possible) |
| `-standalone` | bool | `false` | standalone PLC: local users (plc-server user ...) are the authority and no eaxScada is contacted |
| `-stats-file` | string |  | write the final scheduler counters (scans, time) as JSON when the run ends (metering) |
| `-token-key` | string | `data/security/plc_token_ed25519.key` | this PLC's own token signing key (plc-server token keygen); tokens it signs are trusted (standalone use) |
| `-token-pin` | string | `data/security/scada_plc_token.pub` | where eaxScada's token key is pinned after the first fetch (delete it to accept a new eaxScada key) |
| `-token-pubkey` | string |  | eaxScada's PLC token public key (file or base64); default: fetched once from `--scada-url` and pinned in `--token-pin` |
| `-until` | float | `0` | virtual mode: stop at this simulated time (s; absolute, also after -restore) |
| `-users-file` | string | `data/security/users.json` | local user store: the authority with `--standalone`; managed with plc-server user ... |

## `eaxsim-cloud`

Source: `eaxPLC/cmd/eaxsim-cloud`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-config` | string | `cloud.json` | configuration file (the former eaxcloud's loads unchanged) |

## `eaxsimctl`

Source: `eaxPLC/cmd/eaxsimctl`

### `eaxsimctl create`

Upload a scenario and every file under DIR (its programs, units; paths relative to DIR, default: the scenario's directory).

Usage:

```text
eaxsimctl create -name NAME [-dir DIR] [-id-only] SCENARIO.json
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-dir` | string |  | directory of the files the scenario uses (default: the scenario's) |
| `-id-only` | bool | `false` | print the new simulation's id only |
| `-name` | string |  | simulation name |

### `eaxsimctl list`

Usage:

```text
eaxsimctl list
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

No flags.

### `eaxsimctl report`

The checks report of the last run (a virtual run of a scenario with expect entries; schema eaxsim.checks/1); exit 0: every check passed, 1: one failed, or no report.

Usage:

```text
eaxsimctl report [-o FILE] SIM
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-o` | string |  | also write the report to this file |

### `eaxsimctl start`

Usage:

```text
eaxsimctl start [-mode realtime|virtual] [-speed X] [-until S] SIM
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-mode` | string |  | realtime or virtual (default: the scenario's) |
| `-speed` | float | `0` | virtual: speed factor (0: the scenario's) |
| `-until` | float | `0` | virtual: stop at this simulated time, s |

### `eaxsimctl status`, `stop`, `delete`

Usage:

```text
eaxsimctl status SIM
eaxsimctl stop SIM
eaxsimctl delete SIM
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

No flags.

### `eaxsimctl test`

Run the scenario here (no key, no platform, no broker, no API), in virtual time to until\_s, and check its "expect" entries; prints the JSON report (schema eaxsim.checks/1); exit 0: every check passed, 1: one failed, 2: error (no run).

Usage:

```text
eaxsimctl test [-until S] [-speed X] [-workers N] [-report FILE] [-timeout D] SCENARIO.json
```

Source: `eaxPLC/cmd/eaxsimctl/test.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-report` | string |  | also write the JSON report to this file |
| `-speed` | float | `-1` | speed factor (0: as fast as possible; default: the scenario's) |
| `-timeout` | duration | `0` | give up after this wall time (exit 2; 0: none) |
| `-until` | float | `0` | stop at this simulated time, s (default: the scenario's until_s) |
| `-workers` | int | `0` | scheduler workers (default: the scenario's, else the CPUs) |

### `eaxsimctl usage`

Usage:

```text
eaxsimctl usage [-month 2026-10]
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-month` | string |  | month, 2026-10 (default: this one) |

### `eaxsimctl wait`

Until the run ends; exit 0: ended (stopped), 1: failed, or its checks did not pass, 3: timeout.

Usage:

```text
eaxsimctl wait [-timeout 10m] [-interval 1s] SIM
```

Source: `eaxPLC/cmd/eaxsimctl/main.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-interval` | duration | `time.Second` | poll interval |
| `-timeout` | duration | `10*time.Minute` | give up after |

## `ecatsim`

Source: `eaxPLC/cmd/ecatsim`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-i` | string |  | network interface of the bus (e.g. ecs0) |
| `-slaves` | string | `di8,do8,aio` | slaves in line: di8, do8, aio |

## `plc-bench`

Source: `eaxPLC/cmd/plc-bench`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-cpu` | string | `all` | CPU tier for PackML benchmark (eaxCPU-700, eaxCPU-900, all) |
| `-cycles` | int | `10000` | Number of scan cycles for real-time jitter benchmark |
| `-freq` | int | `1000` | Scan loop frequency in Hz (e.g., 1000 for 1ms cycle) |
| `-packml` | bool | `false` | Run dedicated ISA-TR88 PackML industrial benchmark only |

## `plc-runtime`

Source: `eaxPLC/cmd/plc-runtime`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-audit-disk` | bool | `false` | Persist the cycle recording to disk (closed blocks of cycles; default false for lean edge) |
| `-audit-recover` | bool | `false` | Start over an audit trail (data/plc_audit.jsonl) damaged before its end: copy it to plc_audit.jsonl.corrupt-&lt;time&gt; and start a new chain whose first record names the copy and its sha256. Without it the PLC refuses to start on such a file (a torn last record is recovered without it) |
| `-cpu` | string |  | PLC CPU tier: eaxCPU-100 (64KB), eaxCPU-300 (512KB), eaxCPU-500 (4MB), eaxCPU-700 (32MB), eaxCPU-900 (64MB) |
| `-dvr-disk-mb` | int | `10` | Size cap of the on-disk cycle recording in MB (with `--audit-disk`) |
| `-dvr-max-mb` | int | `256` | Memory cap of the cycle recording in MB (the oldest history goes first when the program changes too much to keep `--dvr-seconds`) |
| `-dvr-seconds` | int | `600` | Cycle recorder (DVR) history kept in memory, in seconds |
| `-eaxtags-scripts` | bool | `false` | Run the eaxTags scripts eaxScada pins to this PLC (in this process: their allocations can add GC pauses to the scan) |
| `-enterprise` | bool | `true` | Start the per-cycle flight recorder (DVR) - included in eaxPLC Performance; ignored without that licence |
| `-executor` | string | `auto` | program executor: auto (amd64 machine code; elsewhere a Go plugin where supported, else the VM), jit, native (Go plugin), vm |
| `-freq` | int | `1000` | PLC scan frequency in Hz (default: the CPU tier's rate - eaxCPU-100 100 Hz, eaxCPU-300 500 Hz, others 1000 Hz) |
| `-gc-memory-limit-mb` | int | `0` | Go memory limit in MB (0: auto - the live heap measured after start-up and after each program load + the cycle recorder's `--dvr-max-mb` + 7 copies of the CPU tier's process image + 64 MB of garbage, over the 97 % of the limit the Go heap may reach, never below the start-up value, within 3/4 of a container's memory limit; GOMEMLIMIT, when set, is kept) |
| `-gc-percent` | string | `off` | Go GC target percentage, or off: with off the GC runs only at `--gc-memory-limit-mb` (the scan allocates nothing; each collection stops the scan goroutine briefly, and Go otherwise forces one every 2 minutes) |
| `-http` | int | `8085` | HTTP port for Micro Control API and WebSocket telemetry (0 to disable) |
| `-http-bind` | string | `127.0.0.1` | address the HTTP API listens on (0.0.0.0 exposes it to the network; every call still needs an eaxScada session) |
| `-local-users-breakglass` | bool | `false` | with `--scada-url`: let local users sign in and sign while eaxScada is unreachable (audited BREAK_GLASS; default off) |
| `-log-format` | string | `text` | console log format: text (for people) or json (one JSON object per line, for collectors); the log file is always JSON |
| `-log-level` | string | `info` | log level: debug, info, warn or error |
| `-mem` | int | `0` | Custom memory size in MB (e.g. 32, 64) |
| `-metrics-anonymous-localhost` | bool | `false` | serve GET /metrics without a session to scrapers on this machine (loopback only; requests through a proxy, with X-Forwarded-For, still need one). Off: /metrics needs the same session or PLC token as /api/stats |
| `-modbus` | int | `5020` | Modbus TCP port (0 to disable) |
| `-modbus-bind` | string | `127.0.0.1` | address the Modbus TCP server listens on (Modbus has no authentication: 0.0.0.0 lets anyone on the network read and write the process image) |
| `-modbus-max-reads` | int | `3000` | Modbus TCP server: most read requests (FC 1-4) answered per second, all connections together; reads over it wait, none is refused, writes are never limited. It keeps busy clients from taking CPU from the scan. 0: no limit |
| `-native-module-dir` | string |  | eaxPLC source tree the binary was built from (the native executor builds Go plugins against it) |
| `-nats` | string |  | Optional external NATS server URL (e.g. nats://localhost:4222) |
| `-nats-legacy-telemetry` | bool | `false` | Also publish every cycle's changes as JSON on plc.&lt;id&gt;.telemetry.delta (and .rungs.powerflow) and the whole image once a second on plc.&lt;id&gt;.telemetry.snapshot. Nothing in eaxScada or the Studio reads these (they use telemetry sessions); off, the PLC builds none of it |
| `-nats-nkey` | string |  | NKey seed file identifying this PLC to the SCADA broker (eaxScada creates data/security/nkeys/&lt;plc-id&gt;.nk for `--edge-plcs`) |
| `-nats-pass` | string |  | Optional NATS password |
| `-nats-queue` | string | `plc-workers` | NATS system command queue group name |
| `-nats-token` | string |  | Optional NATS authentication bearer token |
| `-nats-user` | string |  | Optional NATS username |
| `-no-http` | bool | `false` | Disable HTTP server entirely (air-gapped fieldbus & IPC only) |
| `-no-modbus` | bool | `false` | Disable Modbus TCP server |
| `-opcua-anonymous` | bool | `false` | allow anonymous read-only OPC UA sessions |
| `-opcua-bind` | string | `127.0.0.1` | OPC UA listen address (0.0.0.0 to expose it on the network) |
| `-opcua-cert-dir` | string | `data/opcua` | directory of the OPC UA server certificate (created on first start) |
| `-opcua-port` | int | `0` | embedded OPC UA server port, e.g. 4840 (0: off) |
| `-plc-id` | string | `plc-01` | Unique PLC runtime identifier for NATS subjects (e.g. plc-01) |
| `-project` | string | `data/program.st` | Path to ST program or project file to execute |
| `-rt-class` | string |  | Windows process priority class: normal, high or realtime (realtime needs administrator rights; default: high with `--rt-priority`, else normal) |
| `-rt-cpu` | int | `-1` | pin the scan thread to this CPU (Linux: pair with isolcpus=&lt;cpu&gt;) |
| `-rt-mlock` | bool | `false` | no page faults in the scan: Linux mlockall (needs CAP_IPC_LOCK); Windows VirtualLock of the process image and the JIT code |
| `-rt-mmcss` | string |  | Windows: register the scan thread with MMCSS under this task, e.g. "Pro Audio" |
| `-rt-priority` | int | `0` | scan thread priority: Linux SCHED_FIFO 1-99 (needs CAP_SYS_NICE); Windows &gt;0 = TIME_CRITICAL |
| `-rt-spin-us` | int | `0` | busy-wait this many microseconds before each deadline (default: 1200 on Windows, 150 on Linux) |
| `-rt-yield-us` | int | `0` | yield the scan goroutine to the Go scheduler in the cycle's slack at least this often (default 2000, and 8000 for a Linux scan pinned with `--rt-cpu` and SCHED_FIFO; -1 = never). Keeps Go's forced preemption out of the deadline |
| `-scada-url` | string | `http://127.0.0.1:8080` | eaxScada base URL: sign-in, e-signatures and its PLC token key (ignored with `--standalone`; EAX_DEV_MODE=1 disables auth for development) |
| `-standalone` | bool | `false` | standalone PLC: local users (plc-server user ...) are the authority and no eaxScada is contacted |
| `-token-key` | string | `data/security/plc_token_ed25519.key` | this PLC's own token signing key (plc-server token keygen); tokens it signs are trusted (standalone use) |
| `-token-pin` | string | `data/security/scada_plc_token.pub` | where eaxScada's token key is pinned after the first fetch (delete it to accept a new eaxScada key) |
| `-token-pubkey` | string |  | eaxScada's PLC token public key (file or base64); default: fetched once from `--scada-url` and pinned in `--token-pin` |
| `-uns-prefix` | string |  | UNS path prefix for the PLC's variables, e.g. Plant/Line2/plc-01 (empty: UNS publishing off; needs `--nats`) |
| `-uns-writable` | string |  | comma-separated glob patterns of variables that UNS commands and OPC UA clients may write, e.g. "Setpoint*,Recipe[*]" (empty: read-only) |
| `-use-saved-cpu` | bool | `false` | Load hardware configuration from data/cpu_config.json |
| `-users-file` | string | `data/security/users.json` | local user store: the authority with `--standalone`; managed with plc-server user ... |
| `-version` | bool | `false` | print the version and exit |
| `-ws-max-per-ip` | int | `32` | concurrent telemetry WebSockets per client address; past it a socket is closed with 1008 (0: default 32, negative: no cap) |
| `-ws-max-per-session` | int | `8` | concurrent telemetry WebSockets (/api/telemetry) per session; past it a socket is closed with 1008 (0: default 8, negative: no cap) |

### `plc-runtime token keygen`, `pubkey`, `mint`

Usage:

```text
plc-runtime token keygen|pubkey|mint [flags]
```

Source: `eaxPLC/internal/tokencmd/tokencmd.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-key` | string | `data/security/plc_token_ed25519.key` | signing key file (base64 Ed25519 seed) |
| `-level` | int | `0` | mint: role level (default: the level of -role: Administrator 100, Lead_Engineer 80, Process_Supervisor 60, Shift_Operator 40, Compliance_Auditor 20) |
| `-role` | string |  | mint: role, e.g. Lead_Engineer |
| `-ttl` | duration | `8*time.Hour` | mint: validity |
| `-user` | string |  | mint: user name (sub) |

### `plc-runtime user add`, `passwd`, `role`, `lock`, `unlock`, `del`, `list`

Local accounts of a PLC started with `--standalone`.

Usage:

```text
plc-runtime user add|passwd|role|lock|unlock|del|list [-file F] [-user U] [-role R] [-password-stdin]
```

Source: `eaxPLC/internal/usercmd/usercmd.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-file` | string | `data/security/users.json` | local user store |
| `-password-stdin` | bool | `false` | read the password from stdin (one line) instead of prompting |
| `-role` | string |  | role: Administrator, Lead_Engineer, Process_Supervisor, Shift_Operator, Compliance_Auditor |
| `-user` | string |  | user name |

## `plc-server`

Source: `eaxPLC/cmd/plc-server`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-attach` | string |  | Studio only: drive the eaxPLC runtime with this PLC id over NATS (`--nats`, and `--nats-nkey` / `--nats-user` / `--nats-token` for the broker); no PLC runs in this process |
| `-audit-disk` | bool | `false` | Persist the cycle recording to disk (closed blocks of cycles) |
| `-audit-recover` | bool | `false` | Start over an audit trail (data/plc_audit.jsonl) damaged before its end: copy it to plc_audit.jsonl.corrupt-&lt;time&gt; and start a new chain whose first record names the copy and its sha256. Without it the PLC refuses to start on such a file (a torn last record is recovered without it) |
| `-cpu` | string |  | PLC CPU tier: eaxCPU-100 (64KB), eaxCPU-300 (512KB), eaxCPU-500 (4MB), eaxCPU-700 (32MB), eaxCPU-900 (64MB) |
| `-dvr-disk-mb` | int | `10` | Size cap of the on-disk cycle recording in MB (with `--audit-disk`) |
| `-dvr-max-mb` | int | `256` | Memory cap of the cycle recording in MB (the oldest history goes first when the program changes too much to keep `--dvr-seconds`) |
| `-dvr-seconds` | int | `600` | Cycle recorder (DVR) history kept in memory, in seconds |
| `-eaxtags-scripts` | bool | `false` | Run the eaxTags scripts eaxScada pins to this PLC (in this process: their allocations can add GC pauses to the scan) |
| `-enterprise` | bool | `true` | Start the per-cycle flight recorder (DVR) - included in eaxPLC Performance; ignored without that licence |
| `-executor` | string | `auto` | program executor: auto (amd64 machine code; elsewhere a Go plugin where supported, else the VM), jit, native (Go plugin), vm |
| `-freq` | int | `1000` | PLC scan frequency in Hz (default: the CPU tier's rate - eaxCPU-100 100 Hz, eaxCPU-300 500 Hz, others 1000 Hz) |
| `-gc-memory-limit-mb` | int | `0` | Go memory limit in MB (0: auto - the live heap measured after start-up and after each program load + the cycle recorder's `--dvr-max-mb` + 7 copies of the CPU tier's process image + 64 MB of garbage, over the 97 % of the limit the Go heap may reach, never below the start-up value, within 3/4 of a container's memory limit; GOMEMLIMIT, when set, is kept) |
| `-gc-percent` | string | `off` | Go GC target percentage, or off: with off the GC runs only at `--gc-memory-limit-mb` (the scan allocates nothing; each collection stops the scan goroutine briefly, and Go otherwise forces one every 2 minutes) |
| `-headless` | bool | `false` | Run in headless mode without embedded Web Studio assets |
| `-http` | int | `8085` | HTTP port for Web IDE and WebSocket telemetry |
| `-http-bind` | string | `127.0.0.1` | address the HTTP API listens on (0.0.0.0 exposes it to the network; every call still needs an eaxScada session) |
| `-local-users-breakglass` | bool | `false` | with `--scada-url`: let local users sign in and sign while eaxScada is unreachable (audited BREAK_GLASS; default off) |
| `-log-format` | string | `text` | console log format: text (for people) or json (one JSON object per line, for collectors); the log file is always JSON |
| `-log-level` | string | `info` | log level: debug, info, warn or error |
| `-mem` | int | `0` | Custom memory size in MB (e.g. 32, 64) |
| `-metrics-anonymous-localhost` | bool | `false` | serve GET /metrics without a session to scrapers on this machine (loopback only; requests through a proxy, with X-Forwarded-For, still need one). Off: /metrics needs the same session or PLC token as /api/stats |
| `-modbus` | int | `5020` | Modbus TCP port |
| `-modbus-bind` | string | `127.0.0.1` | address the Modbus TCP server listens on (Modbus has no authentication: 0.0.0.0 lets anyone on the network read and write the process image) |
| `-modbus-max-reads` | int | `3000` | Modbus TCP server: most read requests (FC 1-4) answered per second, all connections together; reads over it wait, none is refused, writes are never limited. It keeps busy clients from taking CPU from the scan. 0: no limit |
| `-native-module-dir` | string |  | eaxPLC source tree the binary was built from (the native executor builds Go plugins against it) |
| `-nats` | string |  | Optional external NATS server URL (e.g. nats://localhost:4222) |
| `-nats-legacy-telemetry` | bool | `false` | Also publish every cycle's changes as JSON on plc.&lt;id&gt;.telemetry.delta (and .rungs.powerflow) and the whole image once a second on plc.&lt;id&gt;.telemetry.snapshot. Nothing in eaxScada or the Studio reads these (they use telemetry sessions); off, the PLC builds none of it |
| `-nats-nkey` | string |  | NKey seed file identifying this PLC to the SCADA broker (the SCADA creates data/security/nkeys/&lt;plc-id&gt;.nk) |
| `-nats-pass` | string |  | Optional NATS password |
| `-nats-queue` | string | `plc-workers` | NATS system command queue group name |
| `-nats-token` | string |  | Optional NATS authentication bearer token |
| `-nats-user` | string |  | Optional NATS username |
| `-opcua-anonymous` | bool | `false` | allow anonymous read-only OPC UA sessions |
| `-opcua-bind` | string | `127.0.0.1` | OPC UA listen address (0.0.0.0 to expose it on the network) |
| `-opcua-cert-dir` | string | `data/opcua` | directory of the OPC UA server certificate (created on first start) |
| `-opcua-port` | int | `0` | embedded OPC UA server port, e.g. 4840 (0: off) |
| `-plc-id` | string | `plc-01` | Unique PLC runtime identifier for NATS subjects (e.g. plc-01) |
| `-rt-class` | string |  | Windows process priority class: normal, high or realtime (realtime needs administrator rights; default: high with `--rt-priority`, else normal) |
| `-rt-cpu` | int | `-1` | pin the scan thread to this CPU (Linux: pair with isolcpus=&lt;cpu&gt;) |
| `-rt-mlock` | bool | `false` | no page faults in the scan: Linux mlockall (needs CAP_IPC_LOCK); Windows VirtualLock of the process image and the JIT code |
| `-rt-mmcss` | string |  | Windows: register the scan thread with MMCSS under this task, e.g. "Pro Audio" |
| `-rt-priority` | int | `0` | scan thread priority: Linux SCHED_FIFO 1-99 (needs CAP_SYS_NICE); Windows &gt;0 = TIME_CRITICAL |
| `-rt-spin-us` | int | `0` | busy-wait this many microseconds before each deadline (default: 1200 on Windows, 150 on Linux) |
| `-rt-yield-us` | int | `0` | yield the scan goroutine to the Go scheduler in the cycle's slack at least this often (default 2000, and 8000 for a Linux scan pinned with `--rt-cpu` and SCHED_FIFO; -1 = never). Keeps Go's forced preemption out of the deadline |
| `-scada-url` | string | `http://127.0.0.1:8080` | eaxScada base URL: sign-in, e-signatures and its PLC token key (ignored with `--standalone`; EAX_DEV_MODE=1 disables auth for development) |
| `-standalone` | bool | `false` | standalone PLC: local users (plc-server user ...) are the authority and no eaxScada is contacted |
| `-token-key` | string | `data/security/plc_token_ed25519.key` | this PLC's own token signing key (plc-server token keygen); tokens it signs are trusted (standalone use) |
| `-token-pin` | string | `data/security/scada_plc_token.pub` | where eaxScada's token key is pinned after the first fetch (delete it to accept a new eaxScada key) |
| `-token-pubkey` | string |  | eaxScada's PLC token public key (file or base64); default: fetched once from `--scada-url` and pinned in `--token-pin` |
| `-uns-prefix` | string |  | UNS path prefix for the PLC's variables, e.g. Plant/Line2/plc-01 (empty: UNS publishing off; needs `--nats`) |
| `-uns-writable` | string |  | comma-separated glob patterns of variables that UNS commands and OPC UA clients may write, e.g. "Setpoint*,Recipe[*]" (empty: read-only) |
| `-users-file` | string | `data/security/users.json` | local user store: the authority with `--standalone`; managed with plc-server user ... |
| `-version` | bool | `false` | print the version and exit |
| `-workdir` | string |  | Directory holding data/ and logs/ (default: current directory; as a Windows service: the executable's directory) |
| `-ws-max-per-ip` | int | `32` | concurrent telemetry WebSockets per client address; past it a socket is closed with 1008 (0: default 32, negative: no cap) |
| `-ws-max-per-session` | int | `8` | concurrent telemetry WebSockets (/api/telemetry) per session; past it a socket is closed with 1008 (0: default 8, negative: no cap) |

### `plc-server token keygen`, `pubkey`, `mint`

Usage:

```text
plc-server token keygen|pubkey|mint [flags]
```

Source: `eaxPLC/internal/tokencmd/tokencmd.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-key` | string | `data/security/plc_token_ed25519.key` | signing key file (base64 Ed25519 seed) |
| `-level` | int | `0` | mint: role level (default: the level of -role: Administrator 100, Lead_Engineer 80, Process_Supervisor 60, Shift_Operator 40, Compliance_Auditor 20) |
| `-role` | string |  | mint: role, e.g. Lead_Engineer |
| `-ttl` | duration | `8*time.Hour` | mint: validity |
| `-user` | string |  | mint: user name (sub) |

### `plc-server user add`, `passwd`, `role`, `lock`, `unlock`, `del`, `list`

Local accounts of a PLC started with `--standalone`.

Usage:

```text
plc-server user add|passwd|role|lock|unlock|del|list [-file F] [-user U] [-role R] [-password-stdin]
```

Source: `eaxPLC/internal/usercmd/usercmd.go`

| Flag | Type | Default | Description |
|---|---|---|---|
| `-file` | string | `data/security/users.json` | local user store |
| `-password-stdin` | bool | `false` | read the password from stdin (one line) instead of prompting |
| `-role` | string |  | role: Administrator, Lead_Engineer, Process_Supervisor, Shift_Operator, Compliance_Auditor |
| `-user` | string |  | user name |
