---
title: "Installing the Script Runner"
description: "Install LumiScan Script Runner on Windows 11 or Ubuntu 24.04: HALCON first, then the Script Runner, the first start and the connection to LumiScan Keryx."
product: "LumiScan Script Runner"
component: "lumiscan-script-runner"
version: "1.0.0"
display_version: "1.0.0.2"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-script-runner/installation.html"
---

# Installing the Script Runner – LumiScan Script Runner

## Before you start

- The PC meets the [Requirements](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/requirements.html).
- You have the HALCON delivery and the LumiScan Script Runner installer (Windows) or package (Ubuntu).
- LumiScan Keryx is installed on the PC.

## 1. Install HALCON

1. Install MVTec HALCON 22.11 with its runtime licence, **for all users**. HALCON’s installer then sets the system environment variable `HALCONROOT` and puts HALCON’s program folder on `PATH`.
2. Check: the file `%HALCONROOT%\bin\x64-win64\halcon.dll` exists.

The Script Runner does not bring HALCON’s libraries with it: it uses the HALCON installation. Before it installs anything, its installer checks two things:

- the **system** environment variable `HALCONROOT` is set (a HALCON installed for one user only sets a user variable, which does not count);
- `bin\x64-win64\halcon.dll` exists in the folder `HALCONROOT` names.

If either is missing, the installer stops with the message *LumiScan Script Runner needs MVTec HALCON 22.11 (Steady) with a runtime licence, and HALCON was not found*, and installs nothing. See [Troubleshooting](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/troubleshooting.html#ts-installer-halcon).

1. Install MVTec HALCON 22.11 for Linux (`x64-linux`) with its runtime licence.
2. For the user who starts the Script Runner, set the environment variable `HALCONROOT` to the HALCON folder and put `$HALCONROOT/lib/x64-linux` on `LD_LIBRARY_PATH`, for example in `~/.profile`. Sign out and in again.
3. Check: the file `$HALCONROOT/lib/x64-linux/libhalcon.so` exists, and `echo $LD_LIBRARY_PATH` shows its folder.

The Script Runner does not bring HALCON’s libraries with it: it uses the HALCON installation.

> [!IMPORTANT]
> The Script Runner runs only with HALCON 22.11 (any 22.11.x) and checks that at every start: with HALCON of another release it stops. The installer checks only that HALCON is installed, not its release. See [HALCON 22.11 only](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/requirements.html#halcon-release).

## 2. Install the Script Runner

1. Run the LumiScan Script Runner installer as an administrator. It installs for all users of the PC and adds a Start menu entry and a desktop shortcut.
2. Plug the LumiScan Key into the PC.

1. Install the package:
   ```shell
   sudo apt install ./lumiscan-script-runner_<version>_amd64.deb
   ```
2. Plug the LumiScan Key into the PC.

The installation holds the program, the shipped settings (`etc`) and the licence texts of the third-party software it uses (`licenses`, with `THIRD-PARTY.txt`).

## 3. Start it the first time

1. Start LumiScan Keryx.
2. Start LumiScan Script Runner: on Windows **LumiScan Script Runner** from the Start menu, on Ubuntu `lumiscan-script-runner` in a terminal in which `HALCONROOT` and `LD_LIBRARY_PATH` are set.

At the first start the Script Runner copies its shipped settings into its [settings folder](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/settings-folder.html): the application file `lumiscan-script-runner.json`, its JSON schema and, into a script folder that holds no procedure yet, three example procedures. It then sets up HDevEngine, checks the HALCON licence, loads the procedures and publishes its nodes under `hdvisionsystems/lumiscan-script-runner`.

Check that it runs:

- `hdvisionsystems/lumiscan-script-runner/api-version` is `1`.
- `v1/system/status-text` is `Initialized`.
- `v1/system/engine/license-valid` is `true`, and `v1/system/engine/version` shows the HALCON version.
- `v1/add/status/code`, `v1/blobs/status/code` and `v1/convert/status/code` are `0`: the three example modules are ready.

Then follow [Run Your First Script](https://docs.hdvisionsystems.com/en/lumiscan-script-runner/how-tos/run-your-first-script.html).

## Connecting to LumiScan Keryx

By default the Script Runner connects to LumiScan Keryx on the same PC. To use another broker, start the program with the options `--keryx-backend` and `--keryx-url`; `lumiscan-script-runner --help` lists them. See the [LumiScan Keryx manual](https://docs.hdvisionsystems.com/en/lumiscan-keryx/index.html).

## Updating and uninstalling

Install a new version over the old one. Your settings folder, the application file and the procedures in the script folder are kept: the application file and its schema are copied only where they are missing, and the example procedures only into a script folder without any procedure. So an example that is new in a version does not appear in a script folder you already use: copy it from the installation’s `etc/scripts` folder and add its module from the installation’s `etc/lumiscan-script-runner.json`.

On Windows, run the new installer; the installation is by default `C:\Program Files\HD Vision Systems GmbH\LumiScan Script Runner`. Uninstall the Script Runner in the Windows settings under **Apps**.

On Ubuntu, install the new package with `sudo apt install ./lumiscan-script-runner_<version>_amd64.deb`. Uninstall the Script Runner with `sudo apt remove lumiscan-script-runner`.

The settings folder stays on the PC; delete it yourself if you no longer need it.
