# Command-line options

> Every flag the HiveBoard app accepts — port, data folder, portable mode, window and tray — its one-off commands, and the environment variables it reads.

Source: https://hiveboard.dev/docs/settings/command-line · Section: Settings and your data · HiveBoard 0.1.7 · Updated 2026-10-19

## In short

- HiveBoard needs no flags; a double-click starts it. Flags are for a terminal or a shortcut.
- It listens only on this computer, on port 8737 unless told otherwise; when another program holds the port it moves to the next free one.
- Starting it again on the same port opens the copy that is running instead of a second one.
- --list-hosts, --add-host and --init do one thing and exit — and --init replaces config.yaml without a backup.

HiveBoard is started with a double-click and needs no options. From a
terminal, or in a shortcut, you can give it flags: another port, another data
folder, no window at start, no tray icon. A few flags are one-off commands that
do their job and exit.

In the examples below, `hiveboard` stands for the file you downloaded:
`.\hiveboard-0.1.7-windows.exe` on Windows, `./hiveboard-0.1.7-linux` on Linux,
`./hiveboard-0.1.7-macos-arm64` (or `-macos-intel`) on a Mac.

```text
hiveboard --port 9000
hiveboard --data-dir hb-test --port 9001
hiveboard --no-browser
hiveboard --list-hosts
```

On Windows the app is a windowed program, with no console of its own. Started
from a terminal, it prints its messages into that terminal; started any other
way, an error that stops it at start-up is shown in a message box.

## Flags for starting HiveBoard

| Flag | What it does |
|---|---|
| `--port N` | Listens on port N instead of 8737 |
| `--data-dir PATH` | Keeps the settings, keys and caches in PATH ([the data folder](/docs/settings/data-folder)) |
| `--portable` | Keeps everything in a `hiveboard-data` folder beside the app ([portable mode](/docs/settings/portable-mode)) |
| `--config PATH` | Reads, and saves, this settings file instead of the one in the data folder |
| `--no-browser` | Shows nothing at start; the tray icon opens the window when you want it |
| `--no-tray` | Shows no tray icon; closing the window then quits HiveBoard |
| `--tab` | Shows the dashboard in a browser tab instead of the app window |
| `--host ADDRESS` | The address to listen on; only this computer's own is accepted |

With both `--no-browser` and `--no-tray`, HiveBoard runs with nothing on
screen: open `http://127.0.0.1:8737` (or the port you gave) in a browser
yourself. The window, the tray and what each of these flags does to them are on
[the app window and the tray](/docs/settings/app-window-and-tray).

The port can also be set in `config.yaml`, under `server:` as `port:`; a
`--port` given at start wins.

> [!TIP]
> On Windows, a flag can go in a shortcut: right-click the shortcut, choose
> *Properties*, and add the flag at the end of *Target*, after the file's path.

## One copy per port

- **HiveBoard is already running on that port:** the new launch brings the
  running copy's window forward — or, where HiveBoard shows in the browser,
  opens a tab on it — and exits. It never starts a second copy.
  With `--tab` it opens a browser tab on the running copy instead; with
  `--no-browser`, nothing.
- **Another program holds the port:** HiveBoard moves to the next free one,
  trying up to 20 ports further on. From a terminal it says so — "(port 8737
  was busy, using 8738 instead)" — and the tray icon's menu shows the address
  in use.
- **A different `--port`:** that is a second, separate copy. Give it its own
  `--data-dir` as well, so that the two do not write to the same files.

## Only on this computer

HiveBoard has no login of its own, so it listens only on this computer's own
address, `127.0.0.1` — anything that could reach it could reach your cluster
accounts. `--host` accepts `127.0.0.1`, `localhost` or another loopback
address, and refuses anything else at start-up, with the reason. Every request
is also checked for coming from HiveBoard's own page, so other web pages open
in your browser cannot drive it
([what leaves your computer](/docs/safety/what-leaves-your-computer)).

To look at it from another device, forward the port over SSH from that device,
as the refusal suggests:

```text
ssh -L 8737:127.0.0.1:8737 <this computer>
```

## One-off commands

These do one thing and exit; they start no window.

- **`--list-hosts`** prints the hosts in your `~/.ssh/config`, with the address
  each one stands for. Entries with wildcards are left out.
- **`--add-host NAME`** adds one host of `~/.ssh/config` as a server, exactly
  as `ssh NAME` reaches it, with job control off and every simulation code
  looked for. The host must already be in `~/.ssh/config`. In the app,
  **Add several at once** does the same for several hosts
  ([hosts from your SSH config](/docs/connections/ssh-config-hosts)).
- **`--init`** writes a starter `config.yaml` into the data folder: no
  servers, with the hosts of your `~/.ssh/config` listed in it only as
  comments.

> [!WARNING]
> `--init` replaces a `config.yaml` that is already in the data folder — your
> servers with it — and keeps no backup. Use it only on a new data folder.
> Your keys and trusted hosts are not touched.

## Environment variables

| Variable | What it does |
|---|---|
| `HIVEBOARD_HOME` | The data folder, when no `--data-dir` is given |
| `HIVEBOARD_CONFIG` | The settings file, when no `--config` is given |
| `ANTHROPIC_API_KEY` | Switches the assistant on, at the next start ([the assistant](/docs/job/assistant)) |
| `SSH_AUTH_SOCK` | The SSH agent to ask, for a server set to use one ([security keys, smart cards and the SSH agent](/docs/keys/ssh-agent)) |

> [!BUILD]
> The Python build takes the same flags except `--no-tray` and `--portable`.
> It always shows the dashboard in a browser tab: its `--tab` changes nothing,
> and its `--no-browser` opens nothing at start.

## Check yourself

1. You start HiveBoard while it is already running on the same port. What happens?
   - The running copy is brought forward and the new one exits ← the answer
   - A second copy starts on the next port
   - The new copy stops the old one
   - It refuses with an error
   Why: A launch that finds HiveBoard answering on its port opens that copy instead of starting another.

2. What does --init do to a config.yaml that is already there?
   - Replaces it with a starter file that has no servers ← the answer
   - Adds the hosts of ~/.ssh/config to it
   - Nothing — it only acts on a first start
   - Backs it up and merges the new hosts in
   Why: --init writes a fresh starter config.yaml into the data folder; the servers in the old one are not kept, and no backup is made.

## Try it in the app

- Run HiveBoard from a terminal with --list-hosts and compare the list with the hosts **Add several from ~/.ssh/config…** offers in the Connections list's More menu.

## Related

- [The data folder](https://hiveboard.dev/docs/settings/data-folder.md)
- [Portable mode](https://hiveboard.dev/docs/settings/portable-mode.md)
- [The app window and the tray](https://hiveboard.dev/docs/settings/app-window-and-tray.md)
- [The config.yaml file](https://hiveboard.dev/docs/settings/config-file.md)
