---
title: "Installing the Server"
description: "Install the LumiScan Annotation Web server on Windows 11 or Ubuntu 24.04, sign in as the first administrator and start the server automatically."
product: "LumiScan Annotation Web"
component: "lumiscan-annotation-web"
version: "2.5.0"
display_version: "2.5.0.2"
latest_version: false
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/installing-the-server.html"
---

# Installing the Server – LumiScan Annotation Web

## Windows 11

1. Unpack `LumiScanAnnotationWeb-<version>-win64.zip`, for example to `C:\LumiScanAnnotationWeb`. It contains:
   ```none
   C:\LumiScanAnnotationWeb\
       lumiscan-annotation-server.exe    the server
       www\                              the web pages
       config\annotation-server.example.json
       README.md, Changelog.md
   ```
2. Copy `config\annotation-server.example.json` to `config\annotation-server.json` and adapt it, see [Configuration](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/configuration.html). To start, set at least `port` and either `data_root` (an existing image folder) or `projects_root`.
3. Start the server in a command prompt:
   ```bat
   cd C:\LumiScanAnnotationWeb
   lumiscan-annotation-server.exe --config config\annotation-server.json
   ```
4. Allow the port (default 8080) in the Windows firewall for the network the users are in.

## Ubuntu 24.04 {#ubuntu}

Install the package `lumiscan-annotation-web_<version>_amd64.deb` (`arm64` for ARM computers):

```bash
sudo apt install ./lumiscan-annotation-web_<version>_amd64.deb
```

It installs the server to `/opt/hdvision/lumiscan-annotation-web` (with `/usr/bin/lumiscan-annotation-server`), creates the service account `lumiscan-annotation` with the data folder `/var/lib/lumiscan-annotation-web`, and adds the systemd service `lumiscan-annotation-server`. Install the CodeMeter Runtime too and plug the LumiScan Key into the server (see [Licence](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/requirements.html#licence)).

1. Copy the example configuration and adapt it, see [Configuration](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/configuration.html):
   ```bash
   sudo install -o lumiscan-annotation -g lumiscan-annotation -m 640 \
     /opt/hdvision/lumiscan-annotation-web/config/annotation-server.example.json \
     /var/lib/lumiscan-annotation-web/annotation-server.json
   ```
2. The account `lumiscan-annotation` must be able to read and write the project folders.
3. Start the service and start it at boot:
   ```bash
   sudo systemctl enable --now lumiscan-annotation-server
   ```

Without the package: unpack `LumiScanAnnotationWeb-<version>-linux-amd64.tar.gz`, for example to `/opt/lumiscan-annotation-web`, put the configuration at `/etc/lumiscan-annotation-web/annotation-server.json` and create a service account:

```bash
sudo useradd --system --home-dir /var/lib/lumiscan-annotation-web --create-home --shell /usr/sbin/nologin lsa
sudo chown -R lsa: /etc/lumiscan-annotation-web
sudo -u lsa /opt/lumiscan-annotation-web/lumiscan-annotation-server --config /etc/lumiscan-annotation-web/annotation-server.json
```

## First sign-in

At the first start, with no accounts yet, the server creates the local user `admin` with a random password and writes it to `initial-admin-password.txt` next to the database (the log names the file).

1. Open `https://<server>:8080/` in the browser. The browser warns about the self-signed certificate: compare the fingerprint with the server log and continue, see [HTTPS](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/configuration.html#https).
2. Sign in as `admin` with that password.
3. Choose a new password. The file is then deleted.
4. Create the other accounts, or set up the directory or single sign-on, see [Users and Roles](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/users-and-roles.html).

If nobody can sign in as administrator any more:

```none
lumiscan-annotation-server --config <configuration> --reset-password admin
```

This prints a new password (and creates the account if it is missing). It must be changed at the next sign-in.

## Starting the server automatically

The server is one program without a window. The Ubuntu package brings its systemd service (see [Ubuntu 24.04](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/installing-the-server.html#ubuntu)). Otherwise, start it at boot with the usual tools of the operating system, as the service account.

- **Linux (systemd), `/etc/systemd/system/lumiscan-annotation-web.service`:**
  ```ini
  [Unit]
  Description=LumiScan Annotation Web
  After=network-online.target
  Wants=network-online.target

  [Service]
  User=lsa
  ExecStart=/opt/lumiscan-annotation-web/lumiscan-annotation-server --config /etc/lumiscan-annotation-web/annotation-server.json
  Restart=on-failure

  [Install]
  WantedBy=multi-user.target
  ```

  Then `sudo systemctl enable --now lumiscan-annotation-web`.

- **Windows (Task Scheduler), in an administrator PowerShell:**
  ```powershell
  $exe = "C:\LumiScanAnnotationWeb\lumiscan-annotation-server.exe"
  $action = New-ScheduledTaskAction -Execute $exe -Argument "--config C:\LumiScanAnnotationWeb\config\annotation-server.json" -WorkingDirectory "C:\LumiScanAnnotationWeb"
  $trigger = New-ScheduledTaskTrigger -AtStartup
  $settings = New-ScheduledTaskSettingsSet -RestartCount 999 -RestartInterval (New-TimeSpan -Minutes 1) -ExecutionTimeLimit ([TimeSpan]::Zero)
  Register-ScheduledTask -TaskName "LumiScan Annotation Web" -Action $action -Trigger $trigger -Settings $settings -User "SYSTEM" -RunLevel Highest
  ```

  The account must be able to read and write the project folders; for network shares, use a domain service account instead of `SYSTEM`.

## Command-line options

Options on the command line override the configuration file.

|   |   |
| --- | --- |
| `--config <file>` | the configuration file (JSON) |
| `--data-root <dir>` | a folder with images, becomes the project `default` |
| `--bind <address>`, `--port <port>` | listen address (default `0.0.0.0`) and port (default `8080`) |
| `--https <mode>` | `auto`, `on` or `off`, see [HTTPS](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/configuration.html#https) |
| `--web-root <dir>` | the web pages (default: `www` next to the program) |
| `--log-dir <dir>` | write rotating log files there |
| `--database <file>` | the database (default: `annotation-server.db` next to the configuration); local disk only |
| `--backup <file>` | write a backup and exit; works while the server runs |
| `--restore <file>` | restore a backup and exit; the server must be stopped (`--force` skips that check) |
| `--reset-password <user>` | give a local user a new random password, print it and exit |
| `--version`, `--help` | version, list of options |

## Updating

1. Stop the server. Optional, but recommended: make a backup first (`--backup`, see [Backup and Restore](https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.5.0/backup-and-restore.html)).
2. Replace the program and the `www` folder (Ubuntu package: `sudo apt install ./lumiscan-annotation-web_<version>_amd64.deb`). Keep the configuration and the database.
3. Start the server. It updates its database itself if needed.
4. Users reload the page in the browser.
