Homarr
AdvancedCommand line interface

Command line interface

The Homarr image includes a recovery CLI for operations that cannot be completed in the web interface. It is not an application API; use the API or MCP endpoint for automation.

Back up the database and stop Homarr before running a command that changes data. Failed commands print an error and return a non-zero exit code, so shell scripts can stop safely.

Run the recovery CLI

Open a shell in the container, then pass a command to homarr:

docker exec -it <container-id> /bin/bash
homarr <command>

QNAP Container Station

  1. Open Container Station.

Container Station in the QNAP application menu

  1. Select Containers.

Containers menu in QNAP Container Station

  1. Select the Homarr container.

Homarr container selected in QNAP Container Station

  1. Select Execute.

Execute action for the Homarr container in QNAP Container Station

  1. Select /bin/bash, then select Execute.

Bash selected in the QNAP execute console

  1. Run homarr <command> in the console.

Bash console open for Homarr in QNAP Container Station

See the pages in this section for available commands.

Build a local branch harness

The repository's host-side CLI can build the current checkout and run it as a named Docker harness:

Homarr developer CLI showing pull requests, local images, and PR CI status

pnpm cli harness setup feature-board

This creates homarr:feature-board, starts it with persistent demo data, and prints the assigned URL. Query the port again with:

pnpm cli harness port feature-board

Pass environment overrides with repeated --env options:

pnpm cli harness setup feature-board \
  --env WORKSHOP_WEB_URL=https://example.test \
  --env FEATURE_FLAG=true

Related commands are harness build <name>, harness run <name>, and harness stop <name>.

On this page