---
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.3.0"
display_version: "2.3.0.0"
latest_version: false
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-annotation-web/2.3.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.3.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

1. Copy the server and the `www` folder, for example to `/opt/lumiscan-annotation-web`, and the configuration to `/etc/lumiscan-annotation-web/annotation-server.json`.
2. Create a service account that may read and write the project folders:
   ```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
   ```
3. Start it once by hand to check the configuration:
   ```bash
   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.3.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.3.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. 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.3.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.3.0/backup-and-restore.html)).
2. Replace the program and the `www` folder. 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.
