Configuration
The server reads one JSON file, given with --config. An example with every section is in config\annotation-server.example.json. Relative paths are relative to the folder of the configuration file. Secrets (passwords, keys) can be kept in separate files that only the service account may read: use the keys ending in _file.
Example
{
"bind": "0.0.0.0",
"port": 8080,
"public_url": "https://annotation.example.com",
"projects_root": "../projects",
"project_folders": ["D:/LumiScan"],
"data_root": "D:/LumiScan/annotation-data",
"database": "annotation-server.db",
"web_root": "../www",
"log_dir": "../logs",
"backup": { "dir": "../backups", "every_hours": 24, "keep": 14 },
"pre_annotation": [
{ "url": "http://gpu-server:8090", "token_file": "preannotate.token" }
],
"auth": {
"local_login": true,
"default_role": "annotator",
"ldap": { "enabled": false },
"oidc": { "enabled": false }
}
}
Keys
| Key | Meaning |
|---|---|
|
Listen address (default |
|
The address users open, for example |
|
|
|
Certificate and private key (PEM) for HTTPS. Without them the server uses a self-signed certificate. See HTTPS. |
|
Optional list: further host names or IP addresses for the self-signed certificate. |
|
The web pages. Default: |
|
Optional: an image folder that becomes the project |
|
Folder for new and imported projects. Default: |
|
Optional list: admins may create projects on existing folders only below these. |
|
Optional list of S3 buckets for projects, see Projects in S3 Buckets. |
|
Optional: one box suggestion service or a list of them, each with |
|
|
|
The database: accounts, sessions, projects, history, notes. Default: |
|
How often the project folders are scanned for changes made outside the web app. Default 60. |
|
Largest image file project admins may add through the browser, in MB. Default 2048. |
|
Folder with your own translation tables of the interface; they win over the tables installed with the app. Default: |
|
How long an edit lock lasts without renewal. Default 60; the browser renews it while the image is open. |
|
Folder for rotating log files. Without it, the log goes to the console only. |
|
|
|
The key of the pseudonyms. Default: |
|
Optional: also send the log to an OpenTelemetry collector (Loki, OpenTelemetry Collector, Grafana Alloy), from version 2.6. See Logging with OpenTelemetry. |
|
Automatic backups: folder (default |
|
Sign-in methods and sessions, see Sign-in Methods. |
|
The licence check: |
Built-in networks
An entry of pre_annotation with "type": "onnx" runs your trained LumiScan networks inside the server, without a box suggestion service and without Python, as the single-PC installation does. It can stand next to services in the list.
"pre_annotation": [
{ "type": "onnx", "networks": "networks", "device": "auto" }
]
| Key | Meaning |
|---|---|
|
Folder with the network folders exported by LumiScan Training ( |
|
Where the networks run. |
|
Which graphics card, when the computer has several: |
|
Processor threads per network; |
|
|
|
Optional: a folder with an ONNX Runtime of your own ( |
The log names the ONNX Runtime and the device of every network at the start, for example network 'line-5-parts' (3 classes, input anyxany) on CUDA (GPU 0). The REST API reports them too: GET /api/preannotate/services gives device per service and per network.
HTTPS
The server speaks HTTPS by default, so passwords and session cookies never travel unencrypted. Users open https://<server>:<port>/, for example https://annotation-pc:8080/. The port speaks either HTTPS or HTTP: an address with http:// gets no answer.
- Self-signed certificate (default)
-
Without
tls_certandtls_key, the server creates a certificate at the first start and keeps it in the foldertlsnext to the configuration (self-signed-cert.pem,self-signed-key.pem). Nothing needs to be set up.-
The certificate names the computer’s host name,
localhost, the computer’s network addresses, the host ofpublic_urland the entries oftls_names. Add totls_namesany further name or IP address users type, for example a DNS alias. -
It is valid for 825 days. The server renews it 30 days before it expires, also while it runs, and when a name from
public_urlortls_namesis missing in it. -
Browsers show a warning such as "Your connection is not private" until they trust the certificate. Compare the SHA-256 fingerprint in the warning’s certificate details with the one the server log shows at the start (
HTTPS: SHA-256 fingerprint …), then continue. To avoid the warning, importself-signed-cert.pemon the clients as a trusted certificate (Windows: Trusted Root Certification Authorities, macOS: Keychain, Always Trust), or use a certificate of your company’s CA. -
Back up the
tlsfolder with the configuration (the automatic backups include it). A new certificate means a new warning on every client.
-
- Your own certificate
-
Set
tls_certandtls_keyto the PEM files of a certificate from your company’s CA or a public CA (the certificate with its intermediate certificates) and its key. The server checks at the start that both belong together and warns 30 days before the certificate expires. Restart the server after replacing the files."tls_cert": "tls/annotation.pem", "tls_key": "tls/annotation.key", - Behind a reverse proxy (nginx, IIS, Apache)
-
The proxy terminates TLS and forwards to the server on the same computer, for example on
127.0.0.1:8080. With"bind": "127.0.0.1"the server stays on plain HTTP by itself ("https": "auto"); otherwise set"https": "off". Setpublic_urlto the address users open. The proxy should send the headerX-Forwarded-Proto: https, so the session cookie is marked secure.server { listen 443 ssl; server_name annotation.example.com; ssl_certificate /etc/ssl/annotation.pem; ssl_certificate_key /etc/ssl/annotation.key; client_max_body_size 64m; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_read_timeout 600s; } }client_max_body_sizemust allow the 8 MB pieces of a project import.
Personal data in the log
The log names users and the addresses of their computers, for example when someone signs in: jdoe logged in (oidc) from 192.168.31.77. From version 2.6 you decide for each log output what happens to such values:
| Setting | In the log |
|---|---|
|
The values as they are: |
|
A pseudonym instead of each value: |
|
A placeholder: |
"log_personal_data": "keep",
"telemetry": { "endpoint": "http://monitoring01:3100/otlp", "personal_data": "pseudonymize" },
-
log_personal_data: the console and the log files. Defaultkeep, as in earlier versions. -
telemetry.personal_data: the records sent with OpenTelemetry. Defaultpseudonymize;omitwhenlog_personal_dataisomit. -
At the start the log says which setting applies, for example
Personal data in the log: keep (console, log file), pseudonymize (OpenTelemetry).- What counts as personal data
-
The names of all accounts of the server (local, LDAP, single sign-on), wherever they appear in a line, as whole words. Names of only 1 or 2 characters are recognised where the line marks them (sign-in and user administration), not elsewhere, so that ordinary words are not replaced.
-
User names typed at a failed sign-in, also when there is no such account (it may be a password typed into the wrong field).
-
The network addresses of the users' computers.
-
E-mail addresses.
Project names, folder and file names, labels and the server’s own addresses stay as they are. Passwords, tokens and image contents never appear in the log.
- The key of the pseudonyms
-
At the first start that needs it, the server creates
log-pseudonym.keynext to the configuration, readable by the service account only;log_pseudonym_key_filenames another file. The key is part of the backups. Keep it as safe as the configuration: whoever has it can check which user a pseudonym stands for. A new key gives every user a new pseudonym. If the key cannot be read or written, the server leaves the values out and says so in the log. - Finding the lines of a user
-
--pseudonymprints the pseudonyms of a user name, an address or an e-mail address; then search the log for it.lumiscan-annotation-server --config annotation-server.json --pseudonym jdoe user: user-3f9a1c2b7d address: addr-6b0d9e2f41 e-mail: email-0c7a5d93e8
Sessions and security
-
Sign-in creates a session cookie (HttpOnly, SameSite=Lax, Secure over HTTPS). A session ends after
auth.session_hourswithout activity (default 12) and afterauth.max_session_daysat the latest (default 7). -
After 5 failed sign-ins an account is blocked for 15 minutes (30 failed attempts per network address).
-
Disabling a user or resetting a password ends their sessions at once.
-
Every change request needs the header
X-Requested-With: lsa, which protects against cross-site requests.