BJOERN 1.0.0-rc.16

BJOERN Server Edition - Administrator handbook

Edition: BJOERN 1.0, Server Edition. State of 05.11.2026. Audience: the IT administrator of the organisation that runs BJOERN (Microsoft 365 administrator, Linux-comfortable, not a developer).

BJOERN reads the sources that you release, on your own server, and lets each person's own AI find and read the items that the mirrored permissions of the source system allow that person. This handbook takes you from the first checklist to day-to-day operation.

Scope of this kit, 1.0.0-rc.9. It reads and serves the SharePoint Online sites and personal OneDrives you release, installed on a dedicated Ubuntu 24.04 server (usually a virtual machine) or in an Ubuntu 24.04 system container, with sign-in through Microsoft Entra ID. Exchange mailboxes are served once the kit's signed feature list names microsoft_mail. The Dropbox Business and Google Workspace connectors arrive as later signed kits (Release status).

New to BJOERN? Start with BJOERN as a librarian: every step in a few simple sentences, right after the picture of the whole flow.

Note - how to read the status marks. Features are described as installed from the current kit. A feature that is built but switched on only after its qualification is marked (available after qualification); a feature that comes with a later version is marked (later version). A connector marked (preview) can be set up, read and mirror rights, but does not serve its content to people yet; its chapter says what is being completed.

Chapters

BJOERN is built around connectors: the core chapters apply to every connector, and each connector has its own chapter.

Part I - Core (applies to every connector)

# Chapter Read it when you want to
1 Overview understand what BJOERN does, how it works step by step and where your data stays
2 Plan your deployment plan the dedicated server, network, TLS, identity provider and roles; run the checklist
3 Install prepare the server, verify and install the kit, run the setup wizard, watch the first read
4 Configure release sources, set schedules, passwords in results, licence, users, connect each AI
5 Operate use the console, watch health, restore from your backup, update, support
6 Security and privacy review the rights mirror, fail-closed behaviour, encryption and audit
7 Troubleshoot go from a symptom to a cause and a fix
17 Run BJOERN in a container install the same kit inside one Ubuntu 24.04 system container with rootful podman, equal to a dedicated server
18 What your backup must cover check that your own backup holds the paths, the database dump and the keys, and restore in the right order

Part II - Connectors

# Chapter Read it when you want to
8 Connectors overview see which connectors exist and their status
9 Microsoft 365 (SharePoint, OneDrive, Exchange) register the apps, grant permissions, release sites and mailboxes
11 Dropbox Business (preview) create the Dropbox app, enter the credential with bjoern-provider, release folders
12 Google Workspace (preview) set up the service account, enter the key with bjoern-provider, release shared drives and mailboxes

Part III - Reference

# Chapter Read it when you want to
10 Reference look up every admin setting, the glossary and the FAQ

Part IV - Optional features

# Chapter Read it when you want to
13 Mail filing let selected people file mails into OneDrive or SharePoint folders through their AI
14 Import kit bring earlier reading results in, so nothing is read twice
15 Compute workers let your own or rented machines help with the first load
16 Licence and usage report licence key, licence checks with iamBJOERN, the optional usage report

The shortest path

  1. Complete the planning checklist.
  2. Request your licence key at get.iambjoern.com with a business e-mail address (the Free key too).
  3. Prepare a dedicated server (usually a virtual machine), or build and start the container.
  4. Install: download and verify the kit, run admin.sh install (it sets up PostgreSQL 19 with pgvector), import your HTTPS certificate with admin.sh tls, open port 443 with admin.sh external, open the wizard under your DNS name and enter the key.
  5. In the wizard connect Microsoft, then start reading and watch the sites open.
  6. Go public: the wizard confirms port 443, then add people and connect an AI; ask the first question.
  7. Check that your backup covers chapter 18 and run one restore test.

Target: under 2 hours for an administrator who has not seen BJOERN before. Questions: support@iambjoern.com.

Conventions

Convention Meaning
monospace commands, file names, setting names, values you type
bjoern.example.com placeholder for your server's public DNS name
<tenant> placeholder for your Microsoft Entra tenant
Note, Tip, Important, Warning callouts: extra information, a shortcut, something that changes the outcome, something that can cause data loss or an outage
(available after qualification) built; the release notes of your kit say when it is switched on
(later version) not part of this version

The kit's README.md lists the kit contents and how to verify it. The in-console handbook (Handbook in the console menu) holds one page per setting.

1 Overview

BJOERN is a knowledge hub that runs on your own server. It reads the sources you release - documents, mails, attachments, scans and images with text, in all languages - into one private index. The AI that each person already uses (Claude, ChatGPT, Copilot or any other client that speaks the Model Context Protocol) asks BJOERN for the passages it needs and answers with sources cited.

Sources come in through connectors. See the connectors overview.

Scope of 1.0.0-rc.9. This kit reads and serves the SharePoint Online sites and personal OneDrives you release, on a dedicated Ubuntu 24.04 server (usually a virtual machine) or in an Ubuntu 24.04 system container (chapter 17), with sign-in through Microsoft Entra ID. Exchange mailboxes are served once the kit's signed feature list names microsoft_mail. The Dropbox Business and Google Workspace connectors come as later signed kits. Details: Release status.

In this chapter

What BJOERN does

Function What it means for your organisation
Reads what you release You release sources through a connector. BJOERN reads each released source completely.
Reads completely Every page of PDF and Office files, scans and photos with text (OCR), archives and mail attachments. BJOERN reads all languages; there is no language setting.
Indexes once A word index (exact numbers, names, phrases) and a meaning index (finds the same topic in other words and languages) are built on your server, on CPU. No graphics card is needed.
Serves each person's own rights A person finds the items their mirrored source permissions allow, within the limits described under Site-wide access policies. If a right cannot be confirmed, the item stays hidden.
Works with any MCP-capable AI People connect their AI once. The AI uses BJOERN's tools to research a topic, list every reference in date order, search, and read documents in full.
Opens a site when it is ready A site opens for its entitled people when its fast read, its rights mirror and its meaning index are complete. Reading of scans and tables continues afterwards.
Stays current Changes are picked up on the configured reading schedule (every 15 minutes by default) during the day; a night run catches up the rest. Deleted in the source means gone from BJOERN.
Reading Reading holds read permissions only, so your sources stay as they are. The rights mirror holds full control on released sites to list who has access (in our tests SharePoint denied every permission read for read and manage; fullcontrol works) and uses it only to read permissions; the grant is technically write-capable, BJOERN's code sends GET requests only. Only the two optional writing features write, through the filing integration's own app and after the person confirms: mail filing and copies of files to a folder (Switch it on, step 6).

All processing happens on your server.

You release sources. BJOERN reads, indexes and mirrors rights locally, then keeps the index current.

The MCP tools

Tool Purpose
gather_context Researches a topic. The AI states what the person needs and a few short search phrases (names, numbers, synonyms, translations). BJOERN finds passages by meaning and by wording, across languages, follows neighbouring sections and tables, and returns dated, located passages with their sources and coverage counts, ranked by word and meaning search together; the AI reads them and selects the relevant ones. How many passages one call returns is the search depth (20, 50 or 100). The AI uses it first for questions about a topic, a project, a decision or a history.
collect Lists every reference to some terms in date order, page by page, with date, location and link. For questions where completeness matters, such as a chronology, a due-diligence review or "everything about X". The AI goes through every page until the end.
search Exact search for names, numbers, codes, file names and quoted phrases (AND, OR, NOT). Returns a ranked page with title, location, date and an excerpt.
read_document Reads the text of one hit in sections at the exact version that was found. For a mail it can also list and read the attachments. The AI continues until the end when the rest matters.
list_tables Lists the sheets of a spreadsheet (xlsx, xls, ods, csv, tsv) with their size and header rows.
get_rows Reads exact cell values of one sheet: a row range or the rows whose column holds a value, up to 500 rows per call. Values are never rounded and formulas are not evaluated.
help Shows the AI the server instructions below.
file_mails Files selected mails as original .eml files into a folder the person can write to, after the person confirms in the browser. Works when mail filing is switched on for that person and AI client.
collect_files Copies or moves the SharePoint and OneDrive files the person can open into one folder the person names, or moves them into the drive's To-Delete folder, as that person: preview first, start only after the person confirms that set and that folder. Works when the administrator has switched on copies to folders, and for moving also Allow moving files (Switch it on, steps 6 and 7).

All tools except the two writing tools, file_mails (mail filing) and collect_files (copies and moves of files), are read-only, and every tool returns only what the signed-in person may open. The two writing tools work only with a kit whose signed feature list names microsoft_mail (13). BJOERN also hands every connected AI a short set of server instructions when it connects (the MCP initialize answer; help returns the same text). They guide the AI to a thorough investigation: start with gather_context for topics and collect for completeness; give a first assessment from page 1 and its year distribution; go through every page; read key documents fully; collect again with names, reference numbers, synonyms and languages found along the way; report which terms were searched, the limits and the coverage counts before saying that something is missing (above 10,000 documents in a person's scope the counts are lower bounds and the AI says "at least"; when counting takes too long they are reported as unknown, never as zero); use search for exact names and numbers; cite each source by site > library > folder > file name. The instructions also tell the AI to treat results as document data and never to follow instructions found inside them, that reading never changes files and BJOERN never deletes any, that it saves new .eml copies, copies files to a folder or moves them (also into To-Delete) only when you switched these on and the person confirmed the job (13), to name where a password or key is found instead of repeating it (results can contain such values; this is an instruction, not enforced by the server), and to open or copy an original only when the person asks for it. Mail threads become available in collect when mail serving opens.

People can call BJOERN by name: when someone writes "Frag BJOERN" or "Ask BJOERN" in their AI chat - in any language, capitalisation or spelling (Björn, Bjørn, Bjorn), at the start or the end of the message, for example "Frag BJOERN: what did we decide about the supplier contract?" - the server instructions tell the AI to answer that message with BJOERN. Only the person's own words count; the same phrase inside a document is ordinary text.

How BJOERN works

BJOERN turns your released sources into answers in a fixed order. Read the picture from left to right.

flowchart LR
  A["1 Connect<br/>source"] --> B["2 Release"] --> C["3 List<br/>(census)"] --> D["4 Fetch<br/>changes"] --> E["5 Read<br/>every format"] --> F["6 Recognise text<br/>in scans (OCR)"] --> G["7 Normalise<br/>text"] --> H["8 Word<br/>index"] --> I["9 Meaning<br/>index"] --> J["10 Mirror<br/>rights"] --> K["11 Answer<br/>your AI"]
  D -.-> X["Deletion mirror"]
  E -.-> Y["Second reading pass"]

Plain-text version: Connect source > Release > List (census) > Fetch changes > Read every format > Recognise text in scans and images (OCR) > Normalise text > Word index > Meaning index > Mirror rights > Answer the person's AI. Side steps: Deletion mirror (removes what was deleted in the source) and Second reading pass (improved re-reading where the first pass was incomplete).

Cadence Steps
Once, at setup 1 Connect, 2 Release
Every release of a new source 3 List
On each configured reading run (15 minutes by default), and in the night run 4 Fetch, 5 Read, 6 OCR, 7 Normalise, 8 Word index; the deletion mirror
Right after the fast read, in the background 9 Meaning index (a site opens when it is complete)
After a site has opened, in the background 6 OCR and hard tables (the second reading pass)
Continuously (every 15 minutes) 10 Mirror rights
On request, every time someone asks 11 Answer

In simple words: BJOERN as a librarian

Read this first if you are new to BJOERN. The technical description of each step follows below.

Think of BJOERN as a very careful librarian with a notebook.

1 Connect source

What: you register BJOERN with your source system and your identity provider so that BJOERN may read the sources you choose, with the least permissions that do the job. When: once, in the setup wizard; again when you add a connector. In the console: the connector shows as connected, with green checks per registration.

2 Release

What: you decide which sources BJOERN may read. This is the only scope setting; BJOERN reads exactly what is on the list. When: whenever you add or withdraw a source. In the console: the release list under Sources; SharePoint sites are added automatically once the tenant-wide roles are granted.

3 List (census)

What: BJOERN counts everything in a newly released source, so that the total is known before the work starts and nothing can go missing unnoticed. When: when a source is released, and again as a complete check in the night run. In the console: the inventory of the source - items found, read, waiting, unreadable (with the reason) and unsupported formats - and the number of unexplained items, which is always 0.

4 Fetch changes

What: BJOERN asks the source only for what is new or changed since the last run, not for everything again. When: on each configured reading run (every 15 minutes by default) during the day; large items wait for the night run. In the console: the "fetched" count and the age of the last successful run.

5 Read every format

What: BJOERN opens each file or message on your server and extracts its text - PDFs, Office files, mails with their attachments, archives, tables - in all languages. When: right after fetching, in the same runs. In the console: the "read" count; unsupported formats are named per format.

6 Recognise text in scans and images (OCR)

What: pages and pictures that contain text but no text layer are read by text recognition, so scans become searchable. When: in the second reading pass (follow-up reading), in the background, after a site has opened. In the console: the block Follow-up reading and the "text recognition" count; on a CPU-only server this is usually the longest part of the work, which is why a site does not wait for it.

7 Normalise text

What: extracted text is normalised before indexing, with offsets retained for source locations. When: during processing of every item. The historical "masked" count records delivered renditions.

BJOERN 1.0 delivers what the user's rights allow, including passwords or access keys that appear in documents. The server's instructions tell AI clients to name the file and location where a password is found instead of repeating it (an instruction to the AI client, not enforced by the server). Field names ending in _masked are the delivered text (historical names). Error code mask_failed means delivery could not be completed safely (audit or authority not confirmed); retry when retryable is true.

8 Word index

What: every word is made findable, so exact numbers, names and phrases are found precisely. When: immediately after reading, so new items are findable after the next configured reading run (every 15 minutes by default). In the console: the "indexed" count.

9 Meaning index

What: BJOERN also records what each passage is about, so a question finds the right passage even in different words or another language. Semantic retrieval is built in: the installer sets up PostgreSQL 19 with the pgvector extension on your server, and the vectors are computed there, on CPU. When: right after the fast read, in the background. A site opens for people only when its vectors are complete (How a site opens). In the console: the console shows processed passages and estimated total vectors, tokens and search-data storage, based on listed-file MB or mail counts and default or measured class coefficients. As engineering judgement, not a guarantee, expect roughly ±25% for text-proportional classes after about 5% read, up to a factor of 2 either way for PDF, presentations and images, and a factor of 3–5 while defaults apply, up to 10 for office files and images; source-density differences can exceed these bands. Production-order synthetic totals in the spec reached about −35% to +30% at 5% read and, in some cases, consistently too low early on, not a customer accuracy guarantee. Storage is planning-only; models, backups and WAL are excluded. Vector time awaits a measured GPU rate.

10 Mirror rights

What: BJOERN keeps a copy of who may open what in the source system, so that each person is shown only the items their mirrored permissions allow (limits). If a right cannot be confirmed, the item stays hidden. A site's rights are ready when its mirror is complete. When: continuously, every 15 minutes, on its own schedule and credential, independently of reading. In the console: the state of each site's mirror (Mirror complete, Mirror in progress, Mirror failed) and on Readiness the kit's signed list of qualified features (Security, Rights mirror).

11 Answer the person's AI

What: a person asks their AI; the AI calls BJOERN to search, read a document or gather everything relevant to a task. BJOERN checks the rights, writes the audit entry before delivery, and returns passages with their sources. When: on request, every time someone asks. In the console: the access log (who received which item, never the question) and the number of connected users and clients.

How a site opens

BJOERN opens each released site on its own, in this order:

  1. First fast read. During it nobody receives data from the site. (You may assign people to the BJOERN role earlier; they simply find nothing from this site yet.)
  2. Rights mirror complete and vectors computed for the site.
  3. The site opens for its entitled people. Each answer still requires that person's own current rights.
  4. Second reading pass (follow-up reading) - OCR for scans and images, hard tables - continues in the background afterwards. People find those items as they are read; the site does not wait for it.

An empty answer from a site that has not opened yet means "not yet", never "no document". How to follow the stages per site: Install, step 6.

Side step: Deletion mirror

What: when something is permanently deleted in the source, it is removed from BJOERN too. When: with every fetch of changes, and as a complete check in the night run. A safeguard holds back large unexpected removals until you confirm them. In the console: the deletion count and any "held removals" waiting for your confirmation. See Deletion mirror and held removals.

Side step: Second reading pass

What: the thorough pass: text recognition for scans and images, and hard tables. It also picks up new files that arrive while fetching is under way. When: continuously in the background, after a site's fast read, at the lowest CPU priority: serving and fresh reading always come first and take the cores at once when needed. Its parallel workers are limited by a fixed memory cap, and serving keeps a memory reserve. In the console: the block Follow-up reading on the Overview: deferred units, inflow and outflow per hour and the estimated seconds remaining.

Architecture

flowchart LR
  subgraph SRC["Your source systems"]
    S1["Microsoft 365<br/>(available)"]
    S2["Dropbox, Google Workspace<br/>(preview)"]
    IDP["Identity provider<br/>(Microsoft Entra ID today)"]
  end
  subgraph SRV["Your BJOERN server (Linux, CPU only)"]
    CN["Connectors<br/>(read released sources,<br/>mirror rights)"]
    RD["Reader<br/>(read, OCR, normalise)"]
    IDX[("PostgreSQL 19<br/>catalog, word index, meaning index")]
    WEB["Web service<br/>console + MCP endpoint (HTTPS)"]
    CON["Admin console"]
  end
  S1 --> CN
  S2 -.-> CN
  CN --> RD --> IDX
  CN -->|"rights structure"| IDX
  IDP <-->|"sign-in"| WEB
  WEB --> IDX
  CON --- WEB
  AI["Each person's AI<br/>(Claude, ChatGPT, Copilot, ...)"] -->|"MCP over HTTPS"| WEB
  ADM["Administrator"] --> CON

Building blocks

Block Task
Connector Brings one kind of source in: lists the released sources, fetches new and changed items, mirrors the source's rights. Microsoft 365 is available today.
Reader Reads every format, runs OCR on scanned pages, normalises text, cuts the text into passages.
Index PostgreSQL 19 holds the catalog, the word index and the meaning index.
Rights mirror Mirrors the rights structure of released sources in bulk, on its own schedule and with its own credential. It reads the rights structure only.
Web service Serves the admin console and the MCP endpoint over HTTPS; enforces sign-in, rights at query time and the audit entry before every delivery.
Admin console The place for every setting, the release list, health and operations. No SQL or JSON editing is needed; SSH is needed for the install and updates.

Three paths

  1. Ingest reads only the release list, once per run.
  2. Rights mirror mirrors who may open what, separately and in bulk.
  3. Access checks the mirror inside the query, fail closed, writes the audit entry, then delivers.

Where your data stays

Important. Which AI you connect is your choice. That AI receives the passages its user requests. Check retention, training use and data location with the AI provider before you connect it.

What an administrator is responsible for

Area Task Chapter
Server Provide a dedicated Ubuntu 24.04 server, usually a virtual machine, or a container host (17), with encrypted storage, a DNS name, a TLS certificate and host backups (18) 2
Identity and sources Register BJOERN with your identity provider and connector; assign the roles BJOERN.Admin and BJOERN.User 9
Scope Decide which sources to release 4
People Keep the role assignments current; connect each AI 4
Operations Watch health, keep backups that cover chapter 18, apply updates 5

Release status

This handbook describes BJOERN 1.0 as installed from the current kit, 1.0.0-rc.9. Built features that a later signed kit switches on after their qualification say (available after qualification); features of a later version say (later version).

Area Status
Install with admin.sh on a dedicated Ubuntu 24.04 server, setup wizard, Microsoft sign-in with MFA Available
Install in a system container with podman (17), equal to a dedicated server Available
SharePoint reading, word index, meaning index, rights mirror for SharePoint Available
MCP tools gather_context, collect, search, read_document, list_tables, get_rows, help, file_mails, collect_files and the server instructions Available
Meaning index (PostgreSQL 19 with pgvector, set up by the installer) and site opening Available
Dropbox Business connector, Google Workspace connector (shared drives, mailboxes) Preview, not yet qualified: setup, discovery and connection checks; the console shows "not yet qualified" and offers no source release; content not yet served (11, 12)
Mail filing into OneDrive and SharePoint folders, copies to folders, moving files (also into To-Delete) With a kit whose signed feature list names microsoft_mail (13)
Import kit for earlier results Service of iamBJOERN support (14)
Compute workers for the first load Available, off by default (15)
Licence key for every installation, the Free key included (1,000,000 pages, 5 users) Available
Weekly numbers-only usage report (off until you switch it on) and diagnostic report on your click Available
Signed updates through the kit and admin.sh upgrade, rollback Available
Components list and SBOM download in the console Available (10)
Microsoft 365 mailbox reading and the rights mirror for mail (available after qualification): built; served when the kit's signed feature list names microsoft_mail; the console shows mailbox serving status
Personal OneDrives, every enabled member's read automatically with the tenant-wide permissions (9) Available
Google My Drive, further connectors (later version)

Next: 2 Plan your deployment

2 Plan your deployment

Good planning is most of the work. With server, DNS name, certificate and identity provider ready, installation takes well under two hours.

In this chapter

Before you begin

You need:

Tip. Admin sign-in to the console is protected by your identity provider's multi-factor authentication. What this requires from your licences is described in the connector chapter for your identity provider.

Server requirements and sizing

Reading, OCR and vectors run on CPU; a GPU is not needed.

BJOERN runs in production in either of two equal forms; we recommend one of them:

  1. A dedicated Ubuntu Server 24.04 LTS server, usually a virtual machine (chapter 3). The requirements in the table below are for it.
  2. One Ubuntu 24.04 system container with rootful podman on a Linux host (chapter 17). The container is set up exactly like that server: the same signed kit, installer and updates. Host requirements are in chapter 17, Plan; the sizing guide below applies to the memory the container gets.

In both forms BJOERN has its server or container to itself: it owns port 443 there (and port 80 when you switch on the HTTP redirect), runs the only PostgreSQL (version 19, port 5432, loopback only), manages its own firewall table and sizes its memory limits from the memory it has: the server's RAM, or for a container the host RAM or the container's memory limit, whichever is lower. A dedicated server is a fresh Ubuntu Server 24.04 LTS installation that runs BJOERN and nothing else. A container host may also run other services: chapter 17 gives BJOERN its own memory limit and, when port 443 is taken, another host address or port.

Dedicated server:

Item Requirement
Operating system Ubuntu Server 24.04 LTS, 64-bit (amd64), systemd with cgroup v2. This is the supported platform of BJOERN 1.0.
Python 3.12 (from the Ubuntu repositories; chapter 3, step 1.2)
Database PostgreSQL 19 with the pgvector extension on the same server. The installer sets both up from the signed kit on a fresh Ubuntu 24.04, creates the database, the logins and BJOERN's first records, and keeps PostgreSQL on the loopback interface; you install nothing by hand (chapter 3, step 1.3). A server that runs an earlier release on PostgreSQL 17 moves to PostgreSQL 19 with the update; plan free disk space for one more copy of the database for that move (Updates).
GPU Not needed.
Disk SSD or NVMe. Plan for roughly three times the catalog size (maintenance and backups need free space). If you import a bundle from an earlier system, add about twice the bundle size while the import runs (chapter 14).
Encryption at rest Required for production: encrypted storage under /etc, /var/lib, /opt, /tmp, /var/tmp and swap, set up before the install (chapter 3, step 1.1). Hosting providers usually offer the encrypted option in their install tool; choose it when you install the operating system. After each reboot someone unlocks the disk at the console, so make sure you have console access. (Container: the engine storage is the encrypted volume, unlocked over SSH, chapter 17.)
Time Correct system time (NTP). Certificate checks, sign-in and the audit trail depend on it.

Sizing guide

A BJOERN Server needs at least 32 GiB RAM; with that, reading, text recognition and vectors each run with at least one worker. The installer also requires at least 2 CPUs and 10 GiB free for the code, the data and the database each, and confirms that your configured process limits leave enough memory for these workers. 64 GiB RAM is recommended. The check uses the memory the operating system reports (free -m, total at least 32,768 MiB, otherwise ram_minimum_32gib); in a container with a memory limit it uses that limit when it is lower. Many virtual machines report a little less than their nominal size, so check free -m on a 32 GB machine before you install, or choose the next size up. Smaller companies can choose a server close to the minimum and allow more time for the first load. A sizing table by corpus size (documents and pages) will follow as operating experience grows. Use these planning guidelines in the meantime:

What Rule of thumb
Disk The catalog with word index and vectors takes about 90 KB per file; plan three times that
CPU Reading, text recognition and vectors run on CPU. The installer sizes reading to the cores the server has: reading, text recognition and imports may use all cores, with one foreground reader per core beyond two, bounded by the memory and by at most 20 readers, so more cores help only as far as memory allows. Search and AI clients get a higher CPU weight than reading, so under load the scheduler serves them first; an idle server gives all its cores to reading. The follow-up reading of changed documents yields to the first pass. Search response times under full reading load are not yet confirmed by measurement. The installer applies the sizing again on every update, also after you add cores. The parser CPU limit defaults to auto on a new installation; a number already stored, including on an existing install after an update, stays in force. To use core-derived sizing on an existing install, run sudo ./admin.sh apply --parser-cpu-quota auto (reference)
RAM Minimum 32 GiB; recommended 64 GiB. More memory lets BJOERN compute more vectors in parallel and shortens the first load

Reference point (a measurement, not a sizing recommendation): an installation of about 440,000 files and 2.6 million vector passages ran on 48 vCPU, 31 GiB RAM and 300 GB disk, with a catalog (including word index) of about 36 GB and vectors of about 3 GB. Today's installer requires at least 32 GiB, so plan the next size up for such a corpus. For corpora above roughly 50,000 files, send the expected number of files and the share of scans to support@iambjoern.com before you choose the machine.

BJOERN 1.0 keeps vectors inside PostgreSQL (pgvector), the same engine for every licence tier, and is sized for corpora up to about 20 million pages. Corpora of several million pages already call for the tuned defaults and a generously sized server: send the expected page count to support@iambjoern.com during planning. For larger corpora, contact support@iambjoern.com as well: iamBJOERN provides the scale-out configuration for that size.

What drives the numbers:

Factor Effect
Number of files, mails and attachments Catalog and index size, length of the first pass
Share of scanned pages OCR time (CPU)
Number of simultaneous users RAM and CPU for search
Vector passages Vector time on CPU is the slowest step; it follows the reading and is shown as a count, next to an estimated total of vectors, tokens and search-data GB (default values until measured)

Note. The first pass takes time; how long depends on data volume and server. BJOERN shows one measured estimate in the console. After the first pass only changes are processed, which is small.

The last part of a first reading is CPU work, not download: text recognition of scanned PDFs and unpacking archives with thousands of members. A single such file can take hours. This follow-up reading continues in the background while BJOERN serves, and the console block Follow-up reading shows the time left.

Network and ports

Inbound

Port Use From
443/TCP Admin console and MCP endpoint (HTTPS). admin.sh external --interface <nic> makes BJOERN listen on this port of the chosen interface and opens it in the installer's firewall for that interface only (chapter 3, step 4); TLS ends at BJOERN. It must be open from the start of setup; until setup is complete only the setup pages answer, and --setup-from <IPv4 CIDR> limits it to your admin network. Your users' networks and the AI clients you connect
22/TCP Administration over SSH, key authentication only. The setup wizard runs on port 443 under your DNS name; an SSH tunnel to the loopback listener is only the recovery route (chapter 3). Your admin network only
80/TCP Optional, off by default. With the console setting HTTP redirect and ACME listener on, after setup: HTTP 301 to the installation's configured HTTPS origin, preserving path and query, and GET/HEAD ACME HTTP-01 challenges served from /var/lib/bjoern/acme-webroot, on all IPv4 interfaces. Only when switched on: users and ACME validators; allow it in the provider firewall for issuance and renewals

BJOERN's own services (PostgreSQL, internal broker) listen on loopback and are not reachable from the network. Do not publish them. Port 8443 is used only during setup, on the loopback address; after admin.sh external it is closed. The console setting HTTP redirect and ACME listener (install.tls.http_redirect_enabled) switches the port-80 companion bjoern-edge-http.service on when you apply it with sudo ./admin.sh apply. The console exists only after setup, so the companion is available for renewals, not for the first certificate. By default it is off and BJOERN listens on no HTTP port. Then arrange HTTP redirects and ACME validation at your own edge. HTTPS responses carry Strict-Transport-Security: max-age=31536000; hsts_include_subdomains=true (console setting install.tls.hsts_include_subdomains, HSTS for subdomains) adds includeSubDomains (default off). BJOERN never adds preload. The port-80 answers carry no HSTS header; browsers learn it from the first HTTPS answer.

Company proxy or load balancer

TLS ends at BJOERN, on the server, with the certificate you import with admin.sh tls. The one supported topology with a company proxy or load balancer in front is TCP pass-through of port 443 (layer 4, routed by SNI if the proxy serves several names): the proxy forwards the encrypted connection unchanged to port 443 of the BJOERN server. In this topology:

Example for a TCP proxy:

frontend tls_in
    mode tcp
    bind :443
    timeout client 1h
    tcp-request inspect-delay 5s
    tcp-request content accept if { req_ssl_hello_type 1 }
    use_backend bjoern if { req_ssl_sni -i bjoern.example.com }

backend bjoern
    mode tcp
    timeout server 1h
    server hub 192.0.2.10:443

The long timeouts keep AI connections that stream answers open. End-to-end check from a network outside the proxy: openssl s_client -connect bjoern.example.com:443 -servername bjoern.example.com </dev/null | openssl x509 -noout -fingerprint -sha256 prints the same fingerprint as sudo openssl x509 -in /etc/bjoern/tls/listener.crt -noout -fingerprint -sha256 on the BJOERN server, and the console sign-in page opens under https://bjoern.example.com/console.

Outbound

BJOERN connects outward to the source systems, to the identity provider and to get.iambjoern.com. It runs and checks its licence key offline as well, and keeps working with its last verified state when get.iambjoern.com is unreachable. Every connection BJOERN starts on its own, with its default:

Connection to get.iambjoern.com Default Where you change it
Licence activation (/api/activate): when the installation's binding changes and every 30 days On Part of the licence; no switch
Signed revocation list (/api/revoked) and latest-release notice (/api/latest): weekly, retried after 1 hour and 24 hours On Part of the licence; no switch
Error reports (/api/error-report): fixed component and error codes, the time cut to the hour, at most hourly On Licence > Usage and diagnostics (chapter 16)
Usage report (/api/usage): counts only, weekly Off The setup wizard or Licence > Usage and diagnostics
Diagnostic report (/api/support-report) Only when an administrator previews and sends it -
Update download (the kit named in the signed notice): a security update automatically in the 02:00–05:00 window, any other update when you click Install update Security updates on Install security updates automatically (chapter 5)

Further destinations:

Destination Use
Your identity provider Sign-in and token requests
The source systems of your connectors Reading content and mirroring rights. The host names are listed in each connector chapter: Microsoft 365, Dropbox Business (preview), Google Workspace (preview).
Time endpoint, default www.cloudflare.com Independent time: an HTTPS HEAD request on port 443 that reads the Date header, from the provider service, and for Google sign-in installations from the web service too. Google sign-in installations can set their own endpoint (chapter 12). Without a reading the Google sign-in web service does not start and the provider service retries every 30 seconds.
Ubuntu package repositories, only while you prepare the server apt-get in step 1.2 (HTTP/HTTPS to the repositories your Ubuntu is configured with, or your own mirror). For the container image the build also pulls its base image, by default docker.io/library/ubuntu:24.04; --build-arg BASE=<your registry or mirror image> replaces it. Operating-system updates after the install follow your own Ubuntu update policy.

Note. Reading downloads each changed item once. The first pass can move a lot of data; there is no bandwidth cap by default. Plan the first pass accordingly if your link is metered.

TLS certificate

The console and the MCP endpoint need a publicly trusted certificate for the DNS name of your server.

  1. Choose the name under your own domain; we recommend bjoern.<your domain>, for example bjoern.example.com.

  2. Create an A record that points to the server, or to the proxy when one is in front (Company proxy or load balancer). The installed public listeners use IPv4; publish an AAAA record only if your own edge provides IPv6 service too.

  3. Obtain the first certificate for that name before the install (certificate and private key, PEM), in one of these ways:

    • From your certificate authority's own process.
    • With certbot and DNS-01 validation (a TXT record in your DNS zone).
    • With sudo certbot certonly --standalone -d bjoern.example.com on the server, after sudo apt-get install -y certbot. On the dedicated server port 80 is free, because BJOERN listens on no HTTP port by default; allow inbound IPv4 TCP port 80 for the validation.

    For renewals, certbot can use BJOERN's ACME webroot instead: after setup switch on HTTP redirect and ACME listener (http_redirect_enabled=true; default off, and install/repair never turns it on), apply it and renew with certbot certonly --webroot -w /var/lib/bjoern/acme-webroot (Rotate a certificate).

  4. You install the certificate and key on the server with admin.sh tls (chapter 3). The console shows the expiry date and raises an alert 30, 14 and 7 days before. Renewal is the same command, which a certbot deploy hook can run (Rotate a certificate).

Important. AI providers connect from the internet and require a certificate that chains to a public root. A private or self-signed certificate does not work for them.

Identity provider and connectors

BJOERN uses your organisation's identity provider for sign-in to the console and the MCP endpoint. Microsoft Entra ID is the identity provider supported today. The identity provider decides who may sign in (through the app roles BJOERN.Admin and BJOERN.User); it does not decide what BJOERN reads - that is the release list.

Part Where it is described
Registering BJOERN with the identity provider (sign-in app, redirect URIs, roles) Connector chapter: Microsoft 365, app A1
Registering the connector with the source (apps, permissions, per-source grants) Connector chapter: Microsoft 365, apps and permissions

The connector chapter also has the least-privilege permission tables and a note on what each permission is for.

Important. Certificates, not client secrets, authenticate BJOERN to the identity provider and the source systems wherever the provider supports it. Private keys are generated on the BJOERN server and never leave it.

Roles and licensing

Role Purpose
BJOERN.Admin People who may sign in to the console and change settings
BJOERN.User People who may connect an AI to BJOERN

Assign people to the roles directly, or assign a Microsoft Entra group to a role. Group assignment needs Entra ID P1 for each member; direct assignment does not. Every installation needs a licence key, the Free one too: request it at https://get.iambjoern.com/ before you start, with your name, company and a business e-mail address (the key arrives by e-mail). The Free key covers up to 1,000,000 pages and 5 users (Licence). A page counts when text was recognised on it.

Planning checklist

Print this list and tick it before you start the installation.

Server

Network

Identity and sources

People and decisions

Next: 3 Install

3 Install

This chapter is the one installation procedure for BJOERN 1.0 on Ubuntu Server 24.04. You start with the download page, end with a first search from your AI, and use only this handbook and the kit. Questions at any step: support@iambjoern.com.

The order is: prepare the server - download and verify the kit - install - open the setup wizard - connect Microsoft - start reading - watch the first read - add people - connect each AI.

Moving reading results from an earlier BJOERN system into a new installation is a service of iamBJOERN support (chapter 14); a new installation needs no import.

Time estimate: about 30 minutes for the server and the installer, and about 60 minutes for the wizard, when the planning checklist is complete.

In this chapter

What you need

Note. The installer needs no tenant, hostname, certificate or user. It can run for any length of time without any traffic to your identity provider or sources.

Step 1: Prepare the server

Start from a fresh Ubuntu Server 24.04 LTS on the dedicated server (chapter 2). Everything BJOERN needs from the operating system is in this step. The installer creates its service accounts, folders, systemd units, firewall rules and PostgreSQL 19 with its local database; it does not install operating-system packages. You do that here.

1.1 Encrypted storage

BJOERN keeps the index, the extracted text and the keys it uses for Microsoft on the server's disks. Put these paths on encrypted storage: /etc, /var/lib (this includes PostgreSQL and BJOERN), /opt, /tmp, /var/tmp and swap. Two ways work:

The installer does not set encryption up and does not check it, so verify it yourself before you go on:

lsblk -o NAME,TYPE,FSTYPE,MOUNTPOINTS
findmnt -T /var/lib
findmnt -T /opt
swapon --show

Every disk line that carries these mount points must sit under a crypt device. If one does not, encrypt it first: converting an existing data volume in place is not part of this procedure, so for a server that is already installed without encryption the clean way is a fresh operating-system install with the encrypted option. Do not release real sources before this check passes.

1.2 Operating-system packages

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y --no-install-recommends python3.12 python3.12-venv \
  systemd systemd-sysv nftables openssl ca-certificates curl iproute2 passwd \
  libpq5 libgomp1 libglib2.0-0t64 libreoffice-core libreoffice-writer \
  libreoffice-calc libreoffice-impress fonts-dejavu-core cryptsetup libarchive13t64 acl
sudo systemctl enable --now systemd-tmpfiles-clean.timer

The list covers the PostgreSQL client library, the text-recognition libraries, the headless Office converter and the RAR/7z unpacking library (libarchive) that the reader uses. BJOERN downloads no further packages or models while it runs.

1.3 PostgreSQL 19

Nothing to do here. The installer sets up PostgreSQL 19 with the pgvector extension itself, from the signed packages in the kit, on a fresh Ubuntu 24.04. It creates the empty bjoern database with its own login and the runtime logins, keeps PostgreSQL on the loopback interface and creates BJOERN's first records. pgvector holds the meaning index, so semantic retrieval needs no separate database or service.

PostgreSQL 19 from the kit is the only PostgreSQL on the server: start from the fresh Ubuntu 24.04 of step 1 and install no other database server. The installer refuses to adopt a database that already exists. The kit only adds packages: it leaves the operating system's own packages as they are. If the kit's packages need newer operating-system packages than the server has, the installer stops before it changes anything, with base_package_version_conflict; run sudo apt-get update && sudo apt-get upgrade -y, then start the install again. If the server has unfinished package work (sudo dpkg --audit lists something), it stops with host_packages_unhealthy: finish it with sudo apt-get -f install first. After the install you can check the cluster:

pg_lsclusters

Expected: 19 main 5432 online.

1.4 Network

Step 2: Download and verify the kit

2.1 Download

Open the iamBJOERN download page, https://get.iambjoern.com/, and download four files into one folder on the server (for example ~/bjoern-download):

File Purpose
bjoern-install-<version>.tar The installation kit
SHA256SUMS Checksum of the kit
SHA256SUMS.sig Signature over the checksum file
release-public.pem The public key (PEM) that verifies the signature

A kit carries a signed validity date. The installer refuses a kit past it (release_expired); a system that is already running is not affected. The download page always offers the current kit, so download it on the day you start. Once installed, the console tells you about newer kits: see Updates and rollback.

2.2 Trust the signing key

Do not trust a key only because it came with the download. Compare it with the values printed in this handbook. The download page delivers the handbook as well, so if your policy requires a second channel, ask support@iambjoern.com to confirm the fingerprint by e-mail. The key ID names the release line (pilot) and the date the key was made. This kit is signed with the key below; its fingerprint is the one to trust:

Value Signing key
Key ID bjoern-pilot-2026-10-26
Algorithm Ed25519
SHA-256 of the DER public key 4f0b00faebef84b00b0366d6d144e5619c9e2ad8a84ebaef6763433cd2ac61b5

The public key itself:

-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAq53FBbkfY/9huvVonjCQ/JFnrDZsVZuLB/JCqR07G/M=
-----END PUBLIC KEY-----

You can save this block as release-public.pem and use it instead of the downloaded file of the same name. Check it:

cd ~/bjoern-download
openssl pkey -pubin -in release-public.pem -outform DER | sha256sum

Expected output starts with 4f0b00faebef84b00b0366d6d144e5619c9e2ad8a84ebaef6763433cd2ac61b5. Stop if it differs and write to support@iambjoern.com.

2.3 Verify the kit

test "$(head -n 1 SHA256SUMS)" = '# bjoern-runtime-kit-sha256-v1' && echo header-ok
openssl pkeyutl -verify -pubin -inkey release-public.pem -rawin -in SHA256SUMS -sigfile SHA256SUMS.sig
sha256sum --check SHA256SUMS

Expected: header-ok, then Signature Verified Successfully, then bjoern-install-<version>.tar: OK. Stop on any other result.

Step 3: Install

Extract the kit into a new private folder, give the installer the trusted key, and install:

cd ~/bjoern-download
mkdir -m 700 kit
tar --extract --file bjoern-install-<version>.tar --directory kit --no-same-owner
cd kit
sudo ./admin.sh trust ~/bjoern-download/release-public.pem \
  --key-id bjoern-pilot-2026-10-26 \
  --fingerprint 4f0b00faebef84b00b0366d6d144e5619c9e2ad8a84ebaef6763433cd2ac61b5
sudo ./admin.sh install --loopback --table-backlog-dir /var/lib/bjoern/parser/tables

What the options mean:

Option Meaning
--loopback BJOERN listens on the server's loopback address only, port 8443, until you open port 443 in step 4. Nothing is open to the network before that.
--table-backlog-dir Folder for table copies; choose a path on the encrypted volume. Details: reference.

The installer checks the server (at least 2 CPUs, 32 GiB RAM and 10 GiB free on each of the code, data and database locations), sets up PostgreSQL 19 with pgvector and the local database, installs the release, generates a local certificate, starts the four BJOERN services and prints two lines of JSON: a database check and the result. It ends like this (shortened):

{"status": "ok", "databases": 1}
{"actions": [...], "command": "install", "error": null, ..., "setup_code": "shown below",
 "setup_link": null, "setup_url": null, "status": "ok",
 "tls_fingerprint_sha256": "AB:CD:...", "version": "1.0.0-rc.16"}

The version shown is the version of the kit you received. The release manifest /opt/bjoern/current/bjoern-release.json also records the build's full Git commit as source_revision; the installer checks that it matches the SBOM in the kit. The same manifest holds the version, the signed expiry date and the schema contract (schema.head, the database revision this release migrates to, and schema.rollback_floor, the oldest code revision that still runs on it). Read them, as a check that the tarball name, the installed version and the manifest agree, with sudo python3.12 -c 'import json; m=json.load(open("/opt/bjoern/current/bjoern-release.json")); print(m["version"], m["expires_utc"], m["schema"])'. The handbook publishes no fixed schema numbers: the signed manifest of your kit is the authority.

The code is shown once and is not written to logs or command history. It works until it is used, at most 24 hours (10 wrong attempts lock it). On a first install setup_link is still null because BJOERN does not know your host name yet; the normal way is to get the setup link in step 4 with sudo ./admin.sh setup-code. You can also keep this setup_code and type it there.

After the JSON lines the installer prints a short completion card: the console address and the next commands. In a terminal the code itself is printed last, on its own line under Setup code (private ...); the JSON line then says "shown below", so you can share the JSON for support without the code. Type the code yourself; never paste it into a chat or ticket. (When the output is piped, the JSON keeps the code for scripts.) setup_url is the console address on your host name once admin.sh tls has imported it; the sign-in returns there.

BJOERN is installed.
Console: after `sudo ./admin.sh tls` and `sudo ./admin.sh external` (handbook chapter 3, steps 3 and 4) open https://<hostname>/console/login
Next commands:
  Status     sudo ./admin.sh status   (in the kit folder)
  Logs       sudo journalctl -u 'bjoern-*' --since today   (anywhere on the server)
  Update     sudo ./admin.sh upgrade   (in the folder of the new kit)
  Uninstall  sudo ./admin.sh uninstall --dry-run   (in the kit folder; preview first)
Handbook: chapter 5 (Operate).

The console shows the same commands later under Updates > Updates and operations (Operate).

Check that everything runs:

sudo ./admin.sh status

Expected: "installed": true, "current": "<version>", "pending_switch": false, and under "setup" the remaining seconds of your code.

Important. If the code expires, you lose no wizard progress. Issue a new one on the server at any time before promotion (step 5.6): sudo ./admin.sh setup-code. It prints a fresh setup_code and, once the host name is imported, the setup_link https://<hostname>/console/setup#code=<code>; it invalidates the previous code. Codes cannot be issued remotely and not after promotion.

Import the HTTPS certificate

Still in the kit folder, import the certificate for your DNS name. The installer made a local certificate for the loopback address only; the wizard (step 5.1) expects your public certificate to be installed already:

sudo ./admin.sh tls --hostname bjoern.example.com --cert /root/fullchain.pem --key /root/privkey.pem

The command checks that the name is in the certificate, the chain leads to a public root, the certificate has not expired and the key fits; it keeps the pair in a protected folder (/etc/bjoern/tls), restarts the web service once and prints tls_fingerprint_sha256 of this certificate. The hostname you give here is the one BJOERN uses for its addresses; use the same name in the wizard. Run the command before you open the wizard. If the web service restarts during setup (this command, a repair or a reboot):

Step 4: Open the setup wizard

You run the wizard directly under your DNS name, in an ordinary browser, with your own certificate. No SSH tunnel, no hosts-file entry and no fingerprint comparison.

Before you start: the certificate was imported (Import the HTTPS certificate); the DNS A record of your name points to the server's public IPv4 address, or to the proxy's with a company proxy in front (check from outside: nslookup bjoern.example.com; on Ubuntu from package bind9-dnsutils); your provider's firewall or security group allows inbound TCP 443.

  1. Find the network interface that carries the server's address: ip -br -4 addr (for example ens18).

  2. On the server, in the kit folder, run:

    sudo ./admin.sh external --interface ens18
    

    BJOERN now serves HTTPS directly on the IPv4 address of that interface, port 443, with your certificate; TLS ends at BJOERN and no port forward is needed. The installer's firewall table (bjoern_listener) accepts 443 only on that interface and drops ports 443 and 8443 on every other interface except loopback. The command prints "status": "ok" and setup_url https://bjoern.example.com/console/login. It can be repeated safely. IPv6 is not served: do not publish an AAAA record.

    Until setup is complete, port 443 answers only the sign-in, setup-code and setup pages; everything else (the Overview, the MCP endpoint, OAuth) answers 404. Anyone who reaches the port sees the setup-code form. The 80-bit code cannot be guessed, but ten wrong attempts lock it (then run sudo ./admin.sh setup-code). On a server with a public address, limit 443 to your admin network until setup is complete: sudo ./admin.sh external --interface ens18 --setup-from 203.0.113.0/24. The first sudo ./admin.sh apply after setup removes that limit. With a company proxy in front, every connection arrives from the proxy's address: limit 443 to your admin network at the proxy, and give --setup-from the address the proxy connects from (for example 198.51.100.7/32).

  3. Get your setup link: sudo ./admin.sh setup-code. It prints the link last, on its own line under Setup link (private ...), for example https://bjoern.example.com/console/setup#code=<code> (and invalidates the install code). Open that link in your browser on your own admin computer. Send the link only to the administrator who runs the setup: it works once, and whoever opens it first gets the setup. A chat, ticket, screen share or recording that showed it has disclosed it; then run sudo ./admin.sh setup-code again for a new link. The browser shows your certificate without a warning; if it warns, stop: the name points to another server or the certificate does not fit (Troubleshoot).

Expected screen: the page removes the code from the address bar and the browser history, then uses it once by itself, and you land in the wizard: Step 1 of 9. The code after # leaves your browser only in that one sign-in request to this server, over HTTPS; loading the page, its styles and its script never send it. If the page stops before the wizard (for example with JavaScript turned off), the link stays in the address bar until the code is used or expires: close the tab, delete the history entry and enter the code by hand as below. Without the link: open https://bjoern.example.com/console/login, enter the code in the field Setup code and choose Open setup. Each Save and continue opens the next step directly with a short "Step N saved." line. Only the browser in which you entered the code, and the administrator who first signs in from it in step 5.6, can continue the setup.

Message Meaning and fix
certificate_required No certificate imported. Run admin.sh tls first (Import the HTTPS certificate).
certificate_invalid The imported certificate does not fit the hostname of the installation. Import a pair for exactly that name.
certificate_expired The imported certificate has expired. Import a current pair.
setup_from_invalid --setup-from is not an IPv4 network such as 203.0.113.0/24.
external_interface_unavailable The interface name is wrong, has no IPv4 address or is the loopback. Check ip -br -4 addr.
health_failed The services are not healthy; BJOERN stops the web service instead of exposing it. Fix the cause (sudo ./admin.sh status) and run the command again.

If the sign-in page says Setup is unavailable, the code expired or was locked: run sudo ./admin.sh setup-code and enter the new code. If DNS is not live yet, see Recovery: setup through an SSH tunnel.

Step 5: Run the wizard

The wizard shows its progress and remembers every finished step. You can close the browser and continue later in the same browser within 24 hours of opening the setup link (restarts, admin.sh apply and admin.sh upgrade keep the setup session), or afterwards with a new link (sudo ./admin.sh setup-code); a used code or link cannot be used again.

5.0 Licence Terms

Before step 1 the console shows the BJOERN Server Licence Terms in full. Enter your name and business e-mail, choose who accepts under Accepted by (Myself, or My AI assistant, on my explicit instruction, after I read the full terms with the assistant's name), tick the box and select I accept. BJOERN keeps the acceptance on your server: terms version, a checksum of the text, the sentence you accepted, name, e-mail, choice and time. The page asks once per installation; Download the licence terms keeps a copy.

5.1 Hostname and HTTPS (step 1)

  1. Enter the Console hostname, the name you gave to admin.sh tls, for example bjoern.example.com, and the Organisation name (up to 100 characters). The console header shows the organisation name so that everyone sees whose installation it is; it stays on your server and is not part of the licence. You can change it later under Settings > Network & certificate.
  2. The page confirms the certificate that you installed with admin.sh tls; there is nothing to upload in the wizard. It checks again that the name is in the certificate, the chain leads to a public root and the certificate has not expired.

The name matters: Microsoft sends the admin's browser back to https://bjoern.example.com/console/callback after sign-in. The certificate expiry date appears on the console Overview with an alert 30, 14 and 7 days before. How to renew: Rotate a certificate.

5.2 Microsoft sign-in during setup

Microsoft's sign-in (steps 5.4 and 5.6) returns your browser to https://bjoern.example.com/..., the address you are already using. There is nothing to set up for it.

Sign-in and each setup screen use a focused layout. Use Tab and Shift+Tab to move between controls, Enter or Space to activate them, and Escape to close an explanation. Before setup finishes, Overview shows the saved checkpoints, a progress ring and the next action. Its rail stays visible, with Setup needed dots on the relevant sections. The separate licence checkpoint is included; the last step, Go public, checks the server command you already ran in step 4.

5.3 Enter your licence key (step 2)

The wizard page Licence comes before the Microsoft step and cannot be skipped: without a valid key the setup cannot finish. It also holds a link to the request page, https://get.iambjoern.com/free-key.

  1. Paste the licence key you received by e-mail into Licence key. The Free key is a licence key like any other.
  2. Save and check key saves the key and continues to Microsoft, where the line Licence key checked and saved. confirms it. BJOERN checks the signature on your server, with no connection to iamBJOERN. A damaged or unrecognized key is refused. The weekly usage report is not part of setup: it stays off until you switch it on under Users & licence > Usage and diagnostics. The licence page then shows the tier, page (or document) limit and user limit.

The key is bound to your Microsoft tenant when you save the Microsoft setup. One key serves one tenant; entering the same key for a second tenant is refused. To change to a larger tier later, enter the new key on the console licence page: it takes effect at once and no data is migrated.

5.4 Connect Microsoft and choose sites (steps 3 and 4)

The wizard page Connect to Microsoft offers two equal ways to register the three apps; choose either: Run the BJOERN script (one PowerShell script creates the apps, uploads the certificates and prints a result line you paste into Script result) or Register by hand (the app manifests and each app's public certificate). Use each console value's top-right Copy icon to copy plain text. Both end in the same connection form and Test connection; see chapter 9, Step 2. With the script, items 2 and 4 below are done for you, and in item 5 the tenant ID, the three application IDs and the hidden-membership choice are filled in from the result line.

  1. In Microsoft Entra, create the three apps (sign-in, reading, rights mirror) as described in chapter 9, Set up. Then create the MFA policy for the enterprise app BJOERN sign-in (Sign-in and MFA) and set it On before any BJOERN administrator signs in. The sign-in app needs both roles BJOERN.Admin and BJOERN.User; never use default access.
  2. Register all three redirect URIs the page shows for the sign-in app, as platform Web: https://bjoern.example.com/console/callback, https://bjoern.example.com/oidc/callback and https://bjoern.example.com/console/microsoft/callback.
  3. Run the tenant and site checks of What BJOERN mirrors, then grant admin consent for the permissions of the required-grants table. With them BJOERN reads all SharePoint sites, including subsites and sites created later; there is no site to choose. The OneDrive of every enabled member is read automatically too (chapter 9).
  4. Upload each app's public certificate (from the wizard) in Entra under Certificates & secrets. The private keys were generated on the server and stay there.
  5. Enter the Directory (tenant) ID and the Application (client) ID of each of the three apps. MFA needs no field: a Conditional Access policy requires MFA for the enterprise app BJOERN sign-in; Security Defaults alone is not enough (chapter 9).
  6. Choose Test connection. The wizard checks the three apps, their certificates and their consent, and recognises the tenant-wide roles. Resolve any message it shows (each names the app and the cause) and test again.
  7. When the test passes, choose Save and continue. This saves the Microsoft setup; step 4 confirms the connection.

Note. A whole site is read with all its document libraries. After the admin sign-in (step 6) BJOERN finds every site and subsite within 15 minutes and reads it, and finds new sites every 15 minutes.

5.5 Bind groups (step 5)

Group IDs are optional. Leave them empty when you assign people directly to the roles. If you assign groups to the roles, enter the Entra group object IDs.

5.6 Sign in as the admin and promote (step 6)

This is the real admin sign-in, not a test: the account you use becomes the first BJOERN administrator. In the browser in which you entered the setup code, choose Sign in with Microsoft on this step. Sign in with an account that holds the role BJOERN.Admin; your Microsoft MFA applies. You return to the same step, which shows "Signed in as admin successfully. Press Save and continue."; Save and continue is available only after that. The first administrator who signs in from that browser is the one who finishes the setup: another browser or another administrator gets setup_session_required. When you save this step the installation is promoted: the setup code is erased, all setup sessions end and the audit trail records it. From now on only Microsoft sign-in with MFA opens the console; there is no setup-code bypass. If you lose admin access in Microsoft, recovery needs a Microsoft administrator or the support route (support@iambjoern.com).

5.7 Answer the rights-policy question (step 7)

The wizard asks: "Does your Microsoft 365 tenant use Information Barriers or Restricted Access Control for SharePoint sites?" BJOERN asks because it cannot recognise every licence plan (Copilot plans include Restricted Access Control, E5 plans include Information Barriers). Answer from the checks of Site-wide access policies.

5.8 Release the sites (step 8) and go public (step 9)

Step 8 is described in Step 6 of this chapter. Step 9, Go public, makes BJOERN reachable on port 443 for your people and for the AI products. You already did this with admin.sh external in step 4; since promotion (5.6) the port serves everything.

  1. If you used --setup-from, run sudo ./admin.sh apply on the server now: it removes the limit.
  2. On the wizard's step 9 choose Check again. The wizard connects to your name on port 443 by itself (one request, at most 5 seconds); when this installation answers there with a valid certificate it shows Setup complete. If the check fails, the wizard says so and offers Finish setup and open Overview - public access unverified; the failed result is not hidden. Also test from another computer: https://bjoern.example.com/.well-known/oauth-protected-resource/mcp returns a short JSON document. The address AI products use is https://bjoern.example.com/mcp (no port).

Note. Going public is always the server command of step 4; the wizard only checks the result. Firewalls in front of the server (provider, load balancer) must allow 443 to it, and the server must reach its own name on port 443 for the wizard's check. Behind a router without NAT hairpin the check fails although your people can connect: test from another computer, then finish unverified.

Step 6: Release the sites and watch the first read

You are signed in as the admin and the wizard shows Release SharePoint sites. Each site BJOERN found shows "All sites: read automatically"; BJOERN mirrors the permission lists Microsoft gives for them (What BJOERN mirrors, checked in step 5.4).

  1. Choose Start ingest of released sites. It completes the setup; it cannot be skipped.

How a site opens. BJOERN opens each site by itself, in this order:

  1. First fast read. BJOERN takes the text that is directly available in every file. During this time nobody receives data from the site.
  2. Rights mirror and vectors. The site's rights mirror becomes complete and the meaning index (vectors) of the site is computed.
  3. The site opens for the people who are entitled to it. Each answer still requires that person's own current rights.
  4. Second reading pass (follow-up reading). Text recognition for scans and images, and hard tables, continue in the background afterwards. The site does not wait for it; people find those items as they are read.

A site whose rights mirror is incomplete or failed stays closed. This is the normal fail-closed behaviour, not a second test: the rights system is qualified by iamBJOERN in its lab for every release, and you run no rights tests yourself (Security, Rights mirror). Each release kit carries a signed list of its qualified features in its manifest; each BJOERN service reads the list from the installed release it runs from. Readiness shows the list. BJOERN serves Microsoft sites, subsites and OneDrives only when the list names microsoft_files, which every release kit does. When the installed release's manifest cannot be read or was changed, nothing is served and Readiness shows the reason code (for example features_manifest_invalid); never edit files below /opt/bjoern, and contact iamBJOERN support with the reason code.

The licence-plan gate. BJOERN also checks your tenant's licence plans. When a plan can enable Information Barriers or SharePoint Restricted Access Control (for example Microsoft 365 Copilot plans), or is not yet reviewed, and you answered Yes, or I am not sure in step 7, every site shows Mirror failed (on Overview: Action needed with a link to the setting) with the reason "Serving waits: a licence plan in this tenant can enable Information Barriers or SharePoint Restricted Access Control, or is not yet reviewed". Then, once the checks show the "absent" result everywhere, open Settings > Site-wide access policies (/console/settings?group=rights_policy) and switch on No site-wide access policies. The sites then open as their mirror completes; no restart is needed. Tenants whose plans are all reviewed see no gate; the checks of step 5.4 apply to them as well. You may assign people to the role BJOERN.User before a site has opened; they find nothing from that site until it opens.

Watch the progress. Open Overview and Sources (they refresh when you reload). The console shows, from one maintained snapshot:

Figure Meaning
Reading estimate one estimate "about X with the current resources"; it shows "measuring" for the first minute
Items found, read, waiting, unreadable (with the reason) and unsupported; unexplained items are always 0
Vectors passages of the meaning index done of total; they follow the fast read
Rights mirror scopes mirrored of scopes, rights pending, and for each site Mirror complete, Mirror in progress or Mirror failed
Qualified features the features iamBJOERN qualified in its lab for this kit, from the signed kit itself (microsoft_files, and for example microsoft_mail). A feature not listed is not served. A customer kit always lists microsoft_files; an empty list shows a warning and means a development kit, which a customer installation refuses (release_lab_kit_refused): write to support@iambjoern.com. A warning with a reason code (for example features_manifest_unsafe) means the installed kit's list cannot be trusted and nothing is served; write to support@iambjoern.com. BJOERN still opens a site only when its own rights mirror is complete
Follow-up reading deferred units, inflow, outflow and the estimated time remaining; it does not hold anything back

Progress per site on the command line. On the server, as root, one command shows for each released site which stages are done and which are still pending (fast_read, rights_mirror, vectors) and whether the site is open. It reads cached counts only, does not touch the documents and is safe to repeat. It runs as a short-lived systemd service with the same user and the same credentials as the vector service, so no password leaves its protected files:

sudo systemd-run --quiet --pipe --wait --collect --unit=bjoern-vectors-status \
  -p User=bjoern-vectors -p Group=bjoern-reading \
  -p LoadCredential=app.json:/etc/bjoern/app.json \
  -p LoadCredential=catalog.json:/etc/bjoern/credentials/catalog.json \
  -p LoadCredential=mask-policy.json:/etc/bjoern/install/mask-policy.json \
  /opt/bjoern/current/venv/bin/python -I -B -m bjoern.retrieval \
  --config /run/credentials/bjoern-vectors-status.service/app.json --status

mask-policy.json is the install identity file (historical name); the command reads the installation's identity from it.

The answer is one line of JSON with a sites list. A site with "opened": true is serving its entitled people; the pending list of a closed site names what it still waits for. A site that has not reported yet is shown with all stages pending.

The first fast read is done when the estimate reports complete (nothing waiting) and unexplained items are 0. A site is open when its pending list is empty and "opened" is true.

Important. Invite people when the sites you care about have opened. Before that, a search returns nothing from them and looks like a fault.

Step 7: Add people and connect their AI

  1. In Entra assign each person to the role BJOERN.User (chapter 9). Your licence key sets the number of people (the Free key: 5); see Licence.
  2. Register each AI product and connect it: chapter 4, Connect each user's AI.
  3. Ask the first question in the AI: for example "Search BJOERN for <a word from a released document>".

Verify the installation

Check How Expected
Installer status sudo ./admin.sh status (in the kit folder) "installed": true, no pending switch
Services systemctl is-active bjoern-edge bjoern-connector bjoern-parser bjoern-controller four lines active
HTTPS open https://bjoern.example.com/console valid certificate, no warning
Admin sign-in sign in with a BJOERN.Admin account the console opens; an account without a role is stopped by Microsoft
No stray ports from another host with nmap installed (Ubuntu: sudo apt-get install -y nmap): nmap -p 1-65535 bjoern.example.com only 443 (and 22 from the admin network); 8443 is closed
Database private same scan no 5432
Licence the console licence page (/console/licence) your tier (Free or a paid tier), the limits, pages and users used
Sites the --status command in step 6 every released site shows "opened": true

Uninstall

sudo ./admin.sh uninstall --dry-run
sudo ./admin.sh uninstall

Uninstall stops BJOERN's services and removes the code. It keeps your data and configuration. Removing the data needs sudo ./admin.sh uninstall --purge-data --confirm-install-id <id>; the install ID is in the output of sudo ./admin.sh status. Review the dry run first. Purging removes files and configuration only, not the PostgreSQL database; install again on a new server, not on this one (Decommission).

Decommission an installation

Uninstall removes only BJOERN's code and services. To retire an installation completely, also decide and record:

  1. Data: uninstall --purge-data (above) removes BJOERN's files, data folders and configuration under /etc/bjoern and /var/lib/bjoern. It does not remove the PostgreSQL database bjoern or its database login (and so not the content stored in it), and no shipped command does. To retire the installation completely, wipe or destroy the server (or at least its PostgreSQL storage); do not reinstall on that server. Do this last, after the next items.
  2. Backups: your own backups of this server still contain the data that you purge (Deletion mirror). Keep them for the retention you need, or delete them under your own policy (chapter 18). If you used the built-in backup of release 1.0.0-rc.12 or older, the same applies to its local repository (/var/lib/bjoern-backup), its copies, the SharePoint backup site content, the operational key and the offline recovery key.
  3. Provider side: in Microsoft Entra delete or disable the sign-in, reading and rights-mirror apps, and the backup app if you used the built-in backup of release 1.0.0-rc.12 or older; remove the tenant-wide roles of A2 and A3, and per-site grants left from an older release (chapter 9); remove BJOERN.Admin/BJOERN.User assignments; revoke AI-client connections in the console before you stop the web service.
  4. Copies you made: the certificate and key files and the kit directory; with the built-in backup of release 1.0.0-rc.12 or older also /root/backup-app and downloaded recovery files.
  5. Container installation only: on the host remove what run.sh created: stop bjoern-container, delete /etc/systemd/system/bjoern-container.service and /usr/local/sbin/bjoern-container-run, run sudo systemctl daemon-reload, then sudo podman rm bjoern and sudo podman rmi localhost/bjoern-host:24.04. Do this only after the data of the container is purged or copied; its storage lies on the encrypted volume (chapter 17).

Recovery: setup through an SSH tunnel

Use this only when DNS for your name is not live yet or port 443 cannot be opened during setup; do not run admin.sh external then. The certificate for your name is still required: the wizard's step 1 checks it.

This route is for the dedicated-server installation. In the container installation the 8443 listener lies on the container's own loopback, the host does not publish it and the container has no SSH server, so the tunnel cannot reach it: have DNS and port 443 ready before you open the wizard there.

  1. On your workstation: ssh -N -L 8443:127.0.0.1:8443 <admin-user>@<server-address>, then open https://127.0.0.1:8443/console/login. The browser warns because the certificate names your DNS name: compare the certificate's SHA-256 fingerprint with the tls_fingerprint_sha256 that admin.sh tls printed and continue only when they match. Enter the setup code.
  2. Microsoft's sign-in returns to https://bjoern.example.com/...: stop the tunnel, add 127.0.0.1 bjoern.example.com to your hosts file, and run sudo ssh -i <path-to-your-key> -N -L 443:127.0.0.1:8443 <admin-user>@<server-address> (Windows: the same without sudo, in an administrator PowerShell). Continue at https://bjoern.example.com/console/setup.
  3. After the wizard, run admin.sh external as in step 4, then remove the hosts line and stop the tunnel.

Next: 4 Configure

Mailbox release in setup accepts pasted addresses, CSV and XLSX columns. Test connection checks every address before Save and continue. Under Sources, Check addresses shows accepted and refused addresses before Release. Import from Exchange group pre-fills members of one remembered group; the administrator releases the addresses. Discovery flags new members for release and former members as left the group.

4 Configure

All configuration happens in the admin console. Every setting keeps its current value, a revision number and its apply status (Setting records), and every setting has an explanation next to it (the "i" icon) and an entry in the settings reference. Confidential AI client secrets appear once after registration or rotation; use their top-right Copy icon then.

In this chapter

Release sources

BJOERN reads only what you release. The release list is the single scope setting. What is on the list is read completely. There is no second list and there are no content filters.

Aspect Behaviour
Granularity A source as the connector defines it. For Microsoft 365, every SharePoint site is released automatically as a whole, with every document library it holds, once the tenant-wide roles are granted.
Completeness A released source is read completely: every item, the current version of each file, and every attachment.
Languages BJOERN reads all languages. No language setting exists.
Order of work Release a source, the next run lists it, reading follows. Removing a source from the list hides its content at once; see Deletion mirror.
Sources outside the list The release list is binding: BJOERN calls only listed sources, even where the connector's permissions reach further.

Tip. Start with the sources the AI should know first. Add more at any time.

Items that cannot be read (for example protected files without a usable password) stay listed and counted as "unreadable" with a reason; formats BJOERN does not read are counted per format as "unsupported".

Release a source

SharePoint sites need no release of their own: once the tenant-wide roles are granted (chapter 9, Step 3), BJOERN finds every site and subsite after the admin sign-in and every 15 minutes afterwards and reads each whole site with every document library. In the setup wizard, Start ingest of released sites completes the setup (chapter 3, step 6). Keep an eye on Overview or Sources > Released sources: Fast read, Rights mirror, Meaning index (vectors), then Open. A site opens only after fast read, a complete current rights mirror and vector computation. A missing grant or failed mirror keeps it closed with a reason. See chapter 3, step 6 for what "done" means.

Expected result: the site shows as Released, items are found, read and indexed, and the number of unexplained items is always 0.

Note. If a grant for a site is missing, the site shows Waiting for selected grant and nothing is read.

The connector chapter has the details for your source: Microsoft 365 - release sources (sites, mailboxes). Connectors overview: chapter 8.

Schedules

Every schedule is a setting: timezone, run interval, and the daily window. Open Settings and the schedule you want. Change reading for documents and for mail is set separately under Reading > Schedules; both start with the ingest schedule (5 to 15 minutes, default 15) and accept presets or a custom interval of 60 seconds or more, or daily.

Run Default Range What it does
Reading (documents and mail, set separately) every 15 minutes 60 seconds or more, or daily (ingest schedule: 5 to 15 minutes) Fetches changes from Microsoft, reads new and changed items, updates the word index, deletion mirror
Rights mirror and people and groups (Microsoft 365) every 15 minutes (900 seconds after a run finishes) fixed, no setting Refreshes the mirror of who may open what, and people and group membership. Retries and mailbox renewal can run sooner; throttling can delay it
Discovery every 15 minutes 5 to 60 minutes Finds new content
Night run (queued large items, complete listing, deletion reconciliation) daily, window 00:30 to 06:00 once a day Complete checks and maintenance

Note. The rights mirror and people and groups refresh every 15 minutes, and evidence stays current for 30 minutes. The console shows this as information on Reading > Schedules; there is nothing to set. Values an earlier version stored for these two schedules are ignored.

The timezone defaults to UTC; set your own so that the night window falls in your night. One run at a time; a lock prevents overlap. During the first pass, day-to-day work has priority: the first pass pauses by itself when live reading slows down or memory gets short, and resumes when things recover.

Passwords in results

BJOERN 1.0 delivers what the user's rights allow, including passwords or access keys that appear in documents. The server's instructions tell AI clients to name the file and location where a password is found instead of repeating it. That is an instruction to the AI client; the server does not enforce it. There is nothing to configure.

Password-protected file support comes with a later version; see Reading.

Licence

Every installation needs a licence key, the Free key too. You request the Free key at https://get.iambjoern.com/ with your name, company and business e-mail address; it arrives by e-mail and you enter it in the setup wizard. The Free key allows up to 1,000,000 pages and 5 users and has no expiry. A paid key sets your tier by documents or pages and by users. To upgrade, replace the key on the console licence page: it takes effect at once and nothing is migrated. Details are in Operate, Licence; write to support@iambjoern.com for a paid key.

The weekly counts-only report is not part of setup and stays off until you switch it on; change the switch under Users & licence > Usage and diagnostics (Usage report and diagnostics).

The Users & licence > Licence & seats page shows the effective tier, page and seat usage against limits, expiry, grace deadline and whether search/MCP and processing are available. Paid expiry warnings appear at 30, 14 and 7 days. Activation with iamBJOERN and the weekly revocation-list and latest-release checks are described in Operate, Licence. During grace or after serving stops, a licence banner appears across the signed-in console. It refreshes on navigation, with up to five seconds of shared cache; a deadline or licence change forces a new check. Use Replace licence key to paste or upload a key. Assigned seats lists references; enter the references under Release seats by hand to release them. Seat idle days controls automatic release. The groups configured in Setup appear on the same page.

Usage and diagnostics shows the last report exactly as sent, with time and delivery result. Diagnostic delivery requires Preview diagnostic report, followed by Confirm and send this diagnostic report. The confirmation sends those exact previewed bytes.

Users and groups

Access is controlled in your identity provider only, through the app roles of the sign-in app:

Assign people directly to the roles, or assign an Entra group to a role (group assignment needs Entra ID P1 for each member). Never use "default access": it does not carry a role, and BJOERN refuses the sign-in.

Add a person

Add people when the sites they need have opened (chapter 3, step 6). The steps are in Operate, Add users and connect their AI. The Free key includes 5 people; a sixth person is not activated until you replace the key with a larger tier, and existing people keep working.

Offboard a person

  1. Revoke the person's AI connections first; this takes effect at once. Open AI clients > Clients; on each client card the person is connected to, choose Revoke access next to the person. The next request of that AI is refused and its sign-in cannot be renewed.
  2. Disable the account in your identity provider and revoke its sessions. BJOERN's rights mirror ends the person's search and reading in the first mirror run that receives the disabled state from the identity provider. Two separate numbers apply, and neither is counted from the moment you disable the account:
    • Mirror interval: the normal scheduled wait is 900 seconds after a run finishes. Retries and mailbox renewal can run sooner; throttling can delay the next run. When the identity provider itself takes longer to report the change, the person ends with the first run after that.
    • Evidence age: BJOERN serves nothing on rights evidence that it observed more than 30 minutes ago; the age is counted from the start of the mirror run that read it.
  3. Remove the role assignment (or the group membership). For Microsoft 365 this blocks every new sign-in to BJOERN; an AI connection that already exists ends only through steps 1 and 2. For Google Workspace, revoking the BJOERN role in the console holds the person at once, revokes their BJOERN sign-ins and ends their console sessions (Google Workspace).

Offboarding an administrator (Microsoft 365). BJOERN does not ask Microsoft whether an account is still enabled on each console request. An administrator's open console session lasts up to its session lifetime (60 minutes by default) and can still save changes while its last MFA sign-in is within the admin sign-in freshness (15 minutes by default). After that, a change asks for a new Microsoft sign-in, which a disabled account cannot complete. Disable the account and revoke its Microsoft sessions as early as possible, and review the console's settings and AI clients afterwards.

Changes of rights in the source systems are reflected after the next rights mirror run plus the source's own propagation. Details per source: Microsoft 365.

AI clients

Open AI clients > Clients. Each card shows its approval state, provider evidence, redirect hosts, connected people, active sign-ins and withdrawals. Register an AI client opens the registration section on that page. Every registered client offers search + read, including clients registered before this console update. People still consent to the requested access, and every tool checks their current Microsoft rights. There is no client Actions selector or scopes field.

Confidential client secrets appear once after registration or rotation. Copy the value then; reloading the client list does not reveal it. Connected people opens the per-client list and Revoke access ends one person's connection. The card also retains approval, amendment, revocation, allowance, withdrawal and Allow again actions where applicable.

Downloading original files is not available in this release, so the console has no Original delivery page. The browser-delivery switch that copies to folders need is under AI clients > Mail filing (13). Search and read use the delivered text under each person's current rights.

Connect each user's AI through MCP

BJOERN offers one MCP endpoint over HTTPS with sign-in through your identity provider:

https://bjoern.example.com/mcp

The connection uses standard OAuth with PKCE. You register each AI product once in the console (AI clients > Clients > Register an AI client), then each person chooses Connect in their AI. The complete steps for Claude, ChatGPT and other clients, including the exact return addresses, are in Operate, Connect Claude and ChatGPT. For Microsoft Copilot see Connect Microsoft Copilot.

BJOERN offers nine tools to the AI: gather_context, collect, search, read_document, list_tables, get_rows, help, file_mails and collect_files (what each tool does). Which tool the AI calls is the AI's choice; each call returns only what the signed-in person may open. When an AI connects, BJOERN also gives it the server instructions described there. The tools and instructions work as delivered. The two writing tools file_mails and collect_files work only with a kit whose signed feature list names microsoft_mail (13); file_mails works once you set up and switch on mail filing (sudo ./admin.sh mail-filing, then AI clients > Mail filing), and the instructions tell every AI that BJOERN saves new .eml copies only then. The one MCP setting is the request size (mcp.settings.max_request_bytes, default 16,384 bytes, 1,024 to 1,048,576).

A person's connection lasts 30 days at most and ends after 7 days without use (settings "family max days" and "family idle days"), after a change of access, or when you revoke it. The access token itself lives 60 minutes. The person chooses Connect again.

Important. The AI keeps what it received. Excerpts in a chat, project or memory stay with the AI provider under its rules. Tell people to follow your rules for sharing AI chats.

Access log

BJOERN records every delivery of content: time, person (identity-provider object id), item (opaque reference), kind (hit excerpt, passage, full text, original) and client. This log is always on.

Setting Default Effect
Access audit retention 90 days (1 to 36,500) How long entries are kept.

The log records who received which item, when and how; the search question, titles and excerpts are not part of it. It is append-only and hash-chained; every export includes the daily chain head, so you hold the anchors. See Export the access log.

Next: 5 Operate

Console settings

Use Width at the top of the left rail to switch between a wide rail (names beside the icons) and a narrow one (short names under the icons). The browser remembers your choice. The rail starts wide when no preference is available. Use Search or jump to… (Cmd/Ctrl+K), type a setting's title and choose it to open its group at that setting. The information button beside it opens its explanation.

Use the Copy icon at the top right of a code, ID, command, secret or error detail to copy its plain text. Multiline commands keep their line breaks. If copying is unavailable, select the displayed value and copy it with your browser. Pasted console values, worker enrolment files and admin.sh prompt answers are cleaned before use: terminal escapes and control characters are removed, and surrounding whitespace is trimmed. Names and search text keep Unicode format characters; identifiers and codes discard them. Lists keep their entries separate. Licence uploads keep their exact signed bytes. The log records only the number of characters removed, when any were removed.

Open Settings in the console (/console/settings) to see the first available group for your admin session. Groups follow the console's stable settings order; only configured groups appear in the navigation. Select a group to view and change its settings.

Open Settings > All settings to see every registered group, including sign-in and sessions. Choose a group from the links above the settings. Console sessions opens first; each group is a separate local GET, so every page stays bounded. Each setting shows its effective value, desired value, revision and Applied, Pending or Failed state. The information button opens a side sheet with all five explanations and a local handbook link. Saving uses a fresh MFA sign-in and the displayed revision; a failed apply keeps the effective value. Network & certificate renews the HTTPS certificate through the existing installation workflow.

Groups without saved values show the value BJOERN uses (its default) as Applied, revision 0. The Installation group shows Use additional compute for the first load (install.compute.mode), HTTP redirect and ACME listener (install.tls.http_redirect_enabled) and HSTS for subdomains (install.tls.hsts_include_subdomains) on every installation. They read Not configured until the installer moves its own settings record into the database at the end of the first install or of the update to this release; no reinstall is needed. The installer sets all other installation values, among them the process limits (install.resources.*), from the server's size (reference). Set the parser CPU quota on the server with sudo ./admin.sh apply --parser-cpu-quota auto for all cores, or sudo ./admin.sh apply --parser-cpu-quota 300 for a 300% limit (three CPUs). Installation settings stay Pending until the installer applies them. Apply them on the server with sudo ./admin.sh apply from any kit folder of your installation. The installer works from the installed release, which it authenticates with the installed release trust, so a kit past its download expiry works as well. It renders the services from the saved settings, restarts the changed ones and marks the setting Applied. sudo ./admin.sh apply --dry-run shows the plan first. An update with admin.sh upgrade applies saved settings too.

Once the tenant-wide roles of the required-grants table are granted in Entra, BJOERN reads all sites, including subsites and future sites, automatically: it finds new sites every 15 minutes and releases them. Microsoft's permissions decide who sees what. The OneDrive of every enabled member is read automatically too; a disabled or removed account's OneDrive is no longer read or served (chapter 9). Removing a mailbox is a separate fresh-MFA action. Existing indexing cursors are preserved.

Mailbox releases use one address field, including paste, CSV and XLSX import. Check addresses shows each accepted or refused address before Release. Import from Exchange group remembers one group and pre-fills its members; new members await an administrator Release click. The permission tables are in chapter 9.

5 Operate

BJOERN is designed to run without daily attention. Small faults are repaired by the product itself; you are told about the rest. This chapter covers the console, adding users and connecting their AI, monitoring, backup and restore, updates, deletions, support and the licence.

In this chapter

The console

An error page names the cause and offers one next step: a sign-in button, a server command, a button opening the page you need, or Contact support with the installation ID. Follow that action to continue. Error pages show fixed explanations and the installation ID; document contents, credentials and submitted values stay out of them. See Troubleshoot.

Theme, density and keyboard preferences stay in this browser for your console account. The theme also uses a console-scoped cookie so the server can render your choice on reload. If browser policy refuses storage, the controls still work for the current page.

Open https://<your-host>/console and sign in with Microsoft (an account with the app role BJOERN.Admin). The console is the interface for routine work; the server commands in this chapter are for installation, updates and a restore.

Page Address What you do there
Overview /console See the setup progress, the number of released sites, the follow-up reading numbers (block Follow-up reading) and the HTTPS certificate expiry
Sources /console/sources See the sites, whether the site grants are effective, and release a site
AI clients /console/clients Add, approve, rotate and revoke AI apps; see who is connected; revoke one person
Settings /console/settings Schedules, session lengths, approval rules and the other settings; every setting has an "i" explanation
Licence /console/licence See your tier, limits and usage; replace the key to upgrade; see the last usage report and send a diagnostic report on your click
Protection and recovery /console/protection See a paused scope with its reason and retry time, and resume it with Recheck and resume
Renew HTTPS certificate /console/certificate Confirm the server certificate you renewed with admin.sh tls
Support /console/support Invite iamBJOERN support (numbers only)
About · Components /console/about/components See the installed components with version and licence; download the SBOM (reference)
Manage connections /console/providers (from Sources) Preview; not yet qualified for production. Set up, discover and check connections for Dropbox and Google Workspace; source release requires a qualified build (chapter 11, 12)
Mail filing /console/mail-filing Switch mail filing on, choose people and AI clients (chapter 13)
Compute workers /console/compute Link, resume and remove compute workers (chapter 15)
Handbook /console/handbook Setting explanations inside the console

One administrator role exists: BJOERN.Admin. Every change is versioned and shows its effective state: the console reports whether a setting is saved and applied (Applied, Pending, Failed) - a saved value alone is not proof that it is active. A sign-in must be recent for changes (default: MFA within the last 15 minutes); the console asks you to sign in again when it is older. A console session lasts 60 minutes by default (5 to 480 minutes in Settings).

Note. The inventory for each type is always 100 percent: every object is counted as read, pending, unreadable (with reason) or unsupported. The number of unexplained objects must be 0.

Add users and connect their AI

When to add users

Add users when the sites they need have opened. A site opens by itself when its fast read, its rights mirror and its meaning index (vectors) are complete; the follow-up reading for scans, images and hard tables continues in the background afterwards and holds nothing back (How a site opens). You may assign people earlier; they simply find nothing from a site until it opens.

Resource use follows the installation's progress: text, vectors, site opening, then background enrichment. During the first initial load, before any site has ever opened, BJOERN reads text and then computes vectors with up to 75 % of the server's RAM, within the shared memory area the installer sets aside for reading, vectors and imports (server RAM minus the database, the operating system and the fixed services). User access begins with the first site opening. From the first site opening onwards, vectors use a 40 % RAM limit and the follow-up reading (OCR) has a 40 % RAM limit while users work. These shares stay in place when you add or re-release a site later. Release the sites of the first load together: the faster first-load vector speed ends when the first site opens.

While any released site still has files waiting for the fast read, the fast read gets the server's compute and vectors are computed by a single worker. A site without read progress for 60 minutes releases that compute only with a stage observation newer than 60 minutes; renewed progress returns the compute to the fast read. Missing or stale stage observations keep vectors at one worker. Otherwise vector computation uses the full worker count within the current memory limit. Sites open as their vectors finish. The worker count is max(0, min(64, max(1, (cores - 4) // 2), (memory_mib - 1024) // 4608)), with memory_mib equal to 75 % of host RAM before the first site opening and 40 % thereafter, and never above the vector service's own memory limit. If that limit cannot fit one worker, no shard starts and the reading console and overview site card show vector_memory_insufficient (insufficient memory for vector computation). Each worker uses two threads, embeds at most 16 chunks per batch and has a 4608 MiB memory limit, set for the pinned fp32 embedding model. The follow-up reading waits until at least one site has ever opened and no unopened released site has pending vectors, then runs in the background; opened sites' later publications and republications do not hold its admission.

Users who connect too early meet empty answers and assume BJOERN is broken. Until a site has opened BJOERN serves nothing from it; an empty answer then means "not yet", never "no document".

How to see that it is done

Check these things, in this order:

  1. Overview shows "Released sites" with the number of sites you released.
  2. Per site: the console shows each site's rights mirror (Mirror complete) and the vector count. The Meaning index tile also shows the estimated total (vectors, tokens, GB) with its basis: "default values" or "measured on A of B items", "early estimate" below half read, "listed items only; inventory incomplete" while listing runs, and files without a listed size estimated per item. The GB figure covers search data only, not models, backups or WAL. The command in Install, step 6 shows, for every site, the stages that are still pending and whether it has opened.
  3. Test yourself - the decisive check. Connect your own AI as the first user (steps below) and ask for a document you know is in a released site. A hit proves that this site has opened. No hit after the first mirror cycle (15 minutes after the first read) means: check the tenant-wide roles and Troubleshoot.

Add a person

  1. In the Entra admin center open Enterprise applications > BJOERN sign-in > Users and groups > Add user/group.
  2. Select the person and the role BJOERN.User and assign. (With Entra ID P1 you may assign a group.)
  3. Check the licence: the Free key includes 5 users. A seat is taken when a person's AI app first signs in, your own test connection included.
  4. Tell the person to connect their AI (below).

In Setup 1 the person needs no Entra ID P1. They find the items their mirrored Microsoft 365 permissions allow (Site-wide access policies).

Connect Claude and ChatGPT

BJOERN speaks the standard remote MCP protocol with OAuth. Your MCP address is:

https://<your-host>/mcp

Claude and ChatGPT connect from the vendors' cloud, so this address must be reachable from the internet on your public HTTPS port with a publicly trusted certificate (Network and ports). The AI product reads the sign-in endpoints itself from https://<your-host>/.well-known/oauth-protected-resource/mcp.

What BJOERN supports

Item Value
Sign-in flow OAuth authorization code with PKCE (S256)
Scopes search (find) and read (retrieve content)
Tools offered to the AI gather_context, collect, search, read_document, list_tables, get_rows, help, file_mails, collect_files (what each tool does); the two writing tools file_mails and collect_files only with a kit whose signed feature list names microsoft_mail
Return address (redirect URI) https only, exact match; http://localhost and http://127.0.0.1 only for local apps that run on the person's own computer
AI app identity Registered by you in the console, or announced by the app through a client ID metadata document (needs your approval by default)
Not offered Dynamic client registration (the app cannot register itself blindly)

This works with every AI product that lets you enter a client ID and secret.

  1. In the console open AI clients > Clients and choose Register an AI client.

  2. Fill in:

    Field Claude ChatGPT
    Display label Claude ChatGPT
    Application type web web
    Client type confidential confidential
    Authentication method client_secret_post client_secret_post
    Exact redirect URIs https://claude.ai/api/mcp/auth_callback https://chatgpt.com/connector_platform_oauth_redirect
    Known template (optional) leave empty leave empty

    There is no scopes field: every registered client offers search and read.

    The redirect addresses are the callback addresses published by the two vendors at the time of writing. The address must match exactly; if the AI product shows another callback address while you connect (or the connection fails with a redirect error), register that exact address as well (several, separated by spaces).

  3. Choose Register. The console shows the secret once: use its top-right Copy icon and paste it into your password manager. The client ID appears in the list AI apps as "Client ID: ...".

  4. If the AI product reports invalid_client at the token step, register the app again with the other method (client_secret_basic): the method must be exactly the one the product uses.

Option B: let the AI app announce itself

If the AI product offers no client ID and secret fields, it identifies itself by a web address (a "client ID metadata document"). The first connection attempt then appears in the console under AI clients > Waiting for approval with its name, redirect host and expiry (7 days). Check the redirect host, then choose Approve. This follows the setting "Admin approval for new AI clients" (default: required). Switching "Client ID metadata documents" off accepts only apps you register yourself. The console lists the hosts your firewall must allow for fetching these descriptions.

Connect Claude

Plans: custom connectors are available on Claude Free (one custom connector), Pro, Max, Ultra, Team and Enterprise. On Team and Enterprise an administrator adds the connector once for the organisation; each member then connects. Menu names change between releases; follow the connector help of your plan.

  1. Claude (web or desktop) > Customize > Connectors > + Add > Add custom connector (Pro and Max; Team and Enterprise: Organization settings > Connectors as administrator).
  2. Name: BJOERN. URL: https://<your-host>/mcp.
  3. Open Advanced settings and enter the client ID and the client secret from Option A. (With Option B leave them empty.)
  4. Save. Each person then chooses Connect on the BJOERN connector.

Connect ChatGPT

Plans: custom MCP connectors are available in ChatGPT's developer mode on Plus, Pro, Business, Enterprise and Edu workspaces. In Business, Enterprise and Edu a workspace administrator enables developer mode and connectors and decides who may use them. Menu names change; follow the connector help of your plan.

  1. ChatGPT > Settings > Apps & Connectors > Advanced settings > Developer mode on, then Create.
  2. Name: BJOERN. MCP server URL: https://<your-host>/mcp. Authentication: OAuth.
  3. If the form asks for an OAuth client ID and secret, enter the values from Option A. If it asks for nothing, use Option B and approve the app in the console.
  4. Create the connector, then choose Connect.

What each person does

  1. In Claude or ChatGPT open the BJOERN connector and choose Connect.
  2. Sign in with Microsoft (including the MFA prompt).
  3. On the Allow access page check the app name and choose Allow access. (With the setting "Admin allows access for all users" an admin can approve an app once for everybody; people then skip this page.)
  4. Ask the first question, for example: "Search BJOERN for the latest framework agreement".

A person's connection stays valid for 30 days at most and ends after 7 days without use (both adjustable in Settings); the AI then asks to connect again. Each answer contains only what that person may open in Microsoft 365.

Verify and revoke

Monitoring and self-healing

What BJOERN does by itself:

Situation Behaviour
A run fails on one item The item is counted as unreadable with a reason and goes to the follow-up reading; the run continues
Single documents of a source fail at the provider (sign-in, access, unavailable) Only those documents wait for their own retry; the source pauses only when more than 3 of its last 50 document reads and more than 10 % of them failed (source_failure_count, source_failure_percent). Listing failures and throttling with a retry time pause the source directly
The provider service is down, unreachable or throttling (server error, no connection, too many requests) The affected documents keep all their retries. After a server error or a lost connection they wait at least one cool-off (cooloff_seconds, default 15 minutes; a longer provider retry time wins). Google and Dropbox documents wait a fixed 15 minutes in this release; the setting does not apply to them yet. A throttled document waits the retry time the provider asks for. A failing listing pauses its source: Microsoft 365 sources for the same cool-off, Google and Dropbox sources until the provider's retry time. Neither ever counts toward stopping a source; the source reads on by itself once the provider answers, and other sources keep running
Live reading slows down or memory is short Admission pauses for a cool-off (default 15 minutes) and resumes by itself; a repeated trip (default 3 within 6 hours) pauses the scope until you resume it. For a source, only failed sign-in or consent and repeated other source faults count as such trips; provider service outages never do
A service stops systemd restarts it (Restart=on-failure)
Older documents still need vectors The vectors service checks the newest 512 documents first and walks the rest in steps of 2,048; at one million tenant lexical_document rows (including inactive ones) a full sweep takes up to 489 idle runs (about 130 minutes at the 15-second cadence allowing up to 1 second per idle probe, plus service overhead), with each database statement targeted below 1 second even with cold buffers
A source or identity provider returns "too many requests" or a server error The step backs off and retries later; rights stay fail closed meanwhile
An interrupted update The installer rolls back automatically and reports the failure; see Updates

Programs, not people, do the monitoring: schedulers, retries and restarts are local programs. Logs contain counts and codes only (read them with journalctl -u bjoern-edge, -u bjoern-connector, -u bjoern-controller, -u bjoern-parser).

Maintenance runs as five dedicated system users: bjoern-vectors, bjoern-import, bjoern-licence, bjoern-lifecycle and bjoern-lexical (both compaction services). The kit's bjoern-firewall.service loads their PostgreSQL-only output policy, using this installation's PostgreSQL port. Stopping or restarting nftables also stops or restarts the BJOERN firewall unit, the edge and running maintenance workers (fails closed). Every worker verifies that policy when it starts. Updates stop old workers and import instances before switching their identities and resume timers with the verified policy. Import's recomputable cache is /var/cache/bjoern-import-static (mode 0700); the identity switch removes the old dynamic cache after all old import instances stop.

A missing or changed policy makes maintenance timers skip without a failed unit; see systemctl status bjoern-licence.service (ExecCondition) and journalctl -u bjoern-licence.service for the skipped activation.

What you watch

Where What to look at
Console Overview Setup progress, released sites, the initial read per step (below), follow-up reading numbers, HTTPS certificate expiry (alert within 30, 14 and 7 days)
Console Protection and recovery A paused or stopped scope: reason, retry time, what it requires. Transient problems, including provider service outages of any length, pause and resume by themselves; a scope that stopped after repeated trips waits for you (for a source: repeated sign-in or consent failures or other repeated source faults). To release a stopped source, choose Recheck and resume (fresh sign-in with MFA required); the console records the request and the connector rechecks the prerequisites at its next cycle, resuming the source only if they pass. Retry held items gives up to 64 held items one more chance, including items whose automatic retries are used up (source or reader temporarily unavailable, throttled, interrupted, deadline, profile or classification retry); items that cannot be read for a permanent reason (encrypted, unsupported, deterministic failure) are never retried, and each item gets this extra chance once. Recent recovery requests shows each request as Pending until the connector applies it, then Applied with a counts-only receipt (resumed, requeued, still held by reason, or the refusal code); a second click while a request is pending adds nothing
Server systemctl --failed shows failed services; sudo ./admin.sh status shows the installed version
Backup The last result of your own backup system (chapter 18)

Initial read on the Overview. The top card says whether the initial read is running, complete or paused, with one line for library files and one for mails (messages listed in the released mailboxes, and how many mailboxes are read). Each i opens the explanation of its label.

Label Meaning
Total Files and mails finished (read or settled) of all listed. The time left is the longest of the steps that run side by side; "at least" while the listing still grows or a step has no measured pace yet. Vectorization joins once reading is complete; until then the line says "without vectorization"
Library files, Mails, OCR, Search index, Vectorization One bar per step: done of total, percent, the pace per hour, the state (running, waiting, paused, complete), the time of the counts and the time left. The pace counts only minutes in which the step finished items; a step that stands still shows 0/h and "waiting · about T at the measured pace"
Mails read, Attachments read, OCR queue Mails read of all expected, mails with attachments read, and library documents and mails with images still waiting for text recognition
Machine (side bar) CPU use, cores and load, memory used and available (a lower container limit counts and is named), the data disk under /var/lib/bjoern

Important. Monitoring on the same host cannot see that the whole server is down. Add an external monitor on a host you control: an HTTPS request every minute to https://<your-host>/.well-known/oauth-protected-resource/mcp that expects HTTP 200.

Back up and restore

Your own backup system protects BJOERN: a VM snapshot, or a file backup plus a PostgreSQL dump. Chapter 18, What your backup must cover lists the paths, the database dump, the keys, a consistent capture, retention and the restore test.

A restore follows this order (chapter 18, Restore, in order):

  1. Restore the server with every BJOERN unit except bjoern-firewall.service stopped, on a host that answers to the same DNS name. The original server stays off for good.
  2. Before the first start, in the kit folder: sudo ./admin.sh restored --apply.
  3. Then sudo ./admin.sh apply.
  4. Approve your AI clients again and add each compute worker again; people sign in again. Rights are re-read before anything is served.

Updates and rollback

Open Licence > Usage and diagnostics > Updates (/console/licence/updates). When the verified notice says New version available, Install update queues that exact version. The button requires an administrator's fresh MFA sign-in. The page reads the local cache; opening it performs no network request.

Security updates install automatically by default, during 02:00–05:00 server local time. The release publisher signs the security flag together with the version and kit hash. The Install security updates automatically switch on the same page controls this setting. The page shows the pending security version, its next nightly window and the last automatic install result. Each security version gets one automatic attempt; after a failure the admin can review the fixed error code and use Install update. Ordinary releases wait for this click.

The server queues one local request containing the verified version and kit hash. A local root service re-verifies the cached notice with the installed trust keys, pulls the kit from get.iambjoern.com through the pinned HTTPS transport, checks its hash and signature, and runs the installed upgrade command. Status progresses through queued, downloading, verifying, upgrading and done or failed. Existing upgrade health checks and rollback protect the installed release.

Automatic update and your backup. When the automatic update migrates the database, it first takes the database snapshot of Apply an update, step 6. Schedule a backup that stops BJOERN outside 02:00–05:00, so that it does not meet an update. To have a verified recovery point of your own before every update, switch Install security updates automatically off and update by hand as below.

Manual updates remain available with sudo ./admin.sh upgrade, using the signed kit on the server. Updates are signed. The installer verifies signature, version order and expiry before it changes anything.

The console page Updates > Updates and operations lists the everyday server commands under Server commands, the same list the installer prints at the end of the first install:

Task Command (as root on the server)
Status sudo ./admin.sh status (in the kit folder)
Logs sudo journalctl -u 'bjoern-*' --since today
Update sudo ./admin.sh upgrade (in the folder of the new kit; steps below)
Uninstall sudo ./admin.sh uninstall --dry-run (preview first; Uninstall)

Apply an update

Upgrade matrix for release 1.0.0-rc.16. The same rule is in ./admin.sh help.

Installed release Route to rc.16
1.0.0-rc.6, rc.7, rc.8, rc.9, rc.10, rc.11, rc.12, rc.13, rc.13.1, rc.14 or rc.15 update in place with sudo ./admin.sh upgrade, using the steps below (on a server that still runs PostgreSQL 17 it first moves the database to PostgreSQL 19, see below)
1.0.0-rc.5 or older no in-place update: admin.sh upgrade is refused with upgrade_base_unsupported and changes nothing; set the installation up again on a new server

The console's own update offer (Updates) follows the signed update notice; admin.sh upgrade works as well. On a new server, install with the rc.16 kit (Install); BJOERN rebuilds the word index, the stored texts and the vectors by reading the sources again. Do not reinstall on the same server after admin.sh uninstall --purge-data: it removes BJOERN's files and configuration but not its PostgreSQL database and database login, and the installer then refuses with database_prepare_failed. This handbook gives no procedure that removes them safely, so a new server is the supported route: BJOERN reads your sources again, and you register AI clients and settings anew.

Read-only console role from rc.16. To offer the role BJOERN.Viewer (Users and groups) on a Microsoft Entra installation set up before rc.16, download the Entra script from the console again and run it once more after the update. It adds the role to the sign-in app; the existing roles keep their IDs and assignments.

An update to rc.16 is refused with backup_recovery_active while a restore started with the built-in backup of release 1.0.0-rc.12 or older is unfinished; finish that restore with the kit that started it, then update.

PostgreSQL 19 from release 1.0.0-rc.11

From rc.11 on BJOERN runs on PostgreSQL 19, with the same pgvector 0.8.7. On a server that still runs PostgreSQL 17, the same sudo ./admin.sh upgrade first moves the database to PostgreSQL 19 and then updates BJOERN:

Reserved unit names. Every unit file in /etc/systemd/system whose name starts with bjoern (.service, .timer, .socket, .slice, .path) belongs to BJOERN. An update, a rollback and admin.sh apply stop, disable and remove each such unit the active release does not ship. Do not create your own units with that prefix; name them differently.

  1. Read the release notes ("What's new"). They are a small file inside the kit, bjoern_release/notes/<version>.md under the extracted runtime folder, and the console Overview shows them once after the update. Read them before you apply the update. Check the SBOM in the kit if your policy requires it.
  2. Verify and extract the new kit exactly like the first install (Install, step 2): check the signature with your trusted public key and sha256sum --check SHA256SUMS, then extract into a new private directory.
  3. If the new kit is signed with a new key, add it first: sudo ./admin.sh trust <new-public.pem> --key-id <id> --fingerprint <sha256> (the key, ID and fingerprint are published in the handbook for each release line and can be confirmed by support@iambjoern.com by e-mail; keep the old key while rollback needs it).
  4. Optional dry run: sudo ./admin.sh upgrade --dry-run shows the plan and changes nothing.
  5. Take a fresh recovery point with your own backup system and check that it completed: a verified backup of your own, for example a VM snapshot of all encrypted volumes taken with BJOERN stopped (chapter 18). Keep the kit of the installed release beside it. Restoring this recovery point returns the server to exactly that moment, with the release it ran then: restore the snapshot and start, without a restored step (chapter 18, Restore, in order, case A). Any older backup needs restored --apply before its first start (case B there). From rc.12 or older with the built-in backup, the update removes its timers: confirm your own scheduled backup (chapter 18) before you upgrade. The update also takes its own database snapshot before it migrates, but this handbook gives no customer procedure to restore from that one.
  6. Apply: sudo ./admin.sh upgrade. Run it inside tmux or screen, so that a dropped SSH connection does not interrupt it (install one first if it is missing, for example sudo apt-get install -y tmux; the container image of chapter 17 does not include either). BJOERN installs the new release beside the old one, snapshots the database, migrates and switches. The new release then applies its own services, database logins and folders, and only after that runs the health check: every service must stay running for 20 seconds without a restart. If applying or the health check fails, the previous release is started again. While it migrates, reading, imports and indexing pause. The run may take up to one hour (--deadline-seconds N changes this); the database snapshot before the migration has its own limit of four hours (--snapshot-seconds N) and does not count against the hour, for example sudo ./admin.sh upgrade --deadline-seconds 7200 --snapshot-seconds 28800 for a large database. The command prints one JSON line with the outcome: "status": "ok" (the new release is applied and healthy, exit code 0), "rolled_back" (applying or the health check failed and the previous release is active again, exit code 2; actions names the cause, for example activation_failed:<code>) or "failed" with an error code (exit code 1).
  7. Check: sudo ./admin.sh status shows current (the new version), previous and "writers_paused": false.

If the update was interrupted or failed. A closed terminal, Ctrl-C or a stop signal ends the update cleanly: the services of the installed release start again and the command reports "interrupted_by_signal". After a power loss or a killed process status shows "writers_paused": true; run sudo ./admin.sh apply to start the services again. When the migration had already changed the database in a way the installed release cannot work with, BJOERN does not start the reading and indexing services of the old release; the result lists writers_held:<reason> and status keeps "writers_paused": true. Then run the same sudo ./admin.sh upgrade again once the cause is fixed (it completes the migration), or restore your recovery point of step 5 and start it, without a restored step (chapter 18, Restore, in order, case A).

Each kit carries a signed expiry date. A new install or update with a kit past that date is refused (release_expired); the running system is not affected. How you learn about a new kit: the download page (https://get.iambjoern.com/) always offers the current kit, and support@iambjoern.com tells you on request which kit is current. The console also shows New version available once the weekly latest-release check sees a newer kit, and alerts 30, 14 and 7 days before the installed kit's expiry date. Look at the download page before every install or update.

Roll back

Back to the previous release (code only; database, configuration and data stay):

sudo ./admin.sh rollback              # one step back
sudo ./admin.sh rollback --to <version>   # a specific retained release

BJOERN keeps the three latest releases (setting "Release copies to retain", 2 to 10). A rollback is refused when the database schema of the newer release is not compatible with the older code; then restore your backup taken before the update (chapter 18, Restore, in order). A rollback runs the same health check as an update (20 seconds without a restart). Rolling back to a release from before the embedding-model switch of rc.6 is not possible.

feature_released_rollback_refused names each adapter and its released-source count: withdraw Microsoft sources through the Microsoft source wizard under Sources (/console/sources); for other adapters, under Sources > Manage connections, use Remove source to withdraw their rights and publications, then rerun the rollback or recovery command.

A rollback can change the set of services: it removes the bjoern* units the active release does not ship (Reserved unit names).

Important. Rolling back the program never restores access rights that were withdrawn and never restores deleted content. A downgrade that its migration cannot reverse is refused with a reason.

Licence, licence checks and the usage report are in chapter 16.

Mail subjects after an update

When the release notes ask for it, list every mailbox once more so that mail subjects become searchable. Stop both reading services, bjoern-connector.service and bjoern-nachlese-connector.service (the follow-up reading service that continues after the fast first pass; nachlese is its fixed unit name), run sudo ./admin.sh mail-subjects (counts only), then sudo ./admin.sh mail-subjects --apply --expected <n>, where <n> is the count the first command printed, and start both services again. Unchanged messages are not downloaded again, and reading never waits for the pass: a mailbox that cannot be listed counts as subject_pass_incomplete and is retried in the next cycle. --disarm ends the pass.

Deletion mirror and held removals

What is permanently deleted in a source system, or withdrawn from the release list, passes three stages:

Stage When
1. Hidden from every search Files and documents: after the source's next list of changes (normally within 15 minutes; at the latest after the night run). Mail (available after qualification): within 24 hours after permanent deletion. A source removed in Sources: at once
2. Eligible for purge, then purged: stored text, index entries and vectors The Purge after (days) hold (lifecycle.settings.purge_hold_days, default 30, 0 to 3,650) decides when a removal becomes eligible. The nightly run at 02:30 UTC (bjoern-lifecycle.timer) then works through the eligible removals within a time limit: what does not fit is deferred and reported as a backlog, and the next run resumes. Stored content that another owner or a pin still refers to is kept until that reference is gone
3. Word index compacted A later compaction run (nightly at 02:30 UTC, bjoern-lexical-compact.timer) removes the index entries of purged content

Until stages 2 and 3 are complete the data stays on this server's disk, hidden. A smaller hold, or 0, makes removals eligible at the next nightly run; it does not promise that the bytes are gone then (backlog, shared content and the compaction run still apply) (Purge after (days)).

The exact timings per source are in the connector chapter (Microsoft 365). A deletion log (counts only) is kept.

Held removals protect you from a faulty listing or a mistaken change. If a listing is missing more than max(50, 5 percent) of a library or folder, the rows are hidden at once, but retired only after a per-item check on the next complete night listing. If a whole library is reported as not found by the source system, its rows are hidden and held; they return when the library is listed again, and the installer ships no administrator command to confirm such a removal. This is different from Remove in Sources: that is a permanent administrative withdrawal, the console names the source and asks you to confirm, and this server never releases the same site or mailbox again. Remove is available for mailboxes, and for sites only until the tenant-wide roles are granted (Sites.Selected); with those roles BJOERN reads every site and the console refuses to remove one (source_mode_conflict) (Microsoft 365, Deletion timing). To pause reading for a while, stop the reading service (Emergency stop); it pauses all sources. A site's per-site grant in Microsoft 365 does not limit access while A2 and A3 hold their tenant-wide roles; to end their access in Microsoft 365, disable A2 and A3 under Entra ID > Enterprise applications.

Rows that have no source identity (for example an imported base stock) are never erased automatically.

Warning. Backups taken before a purge still contain the erased data. Delete them within 7 days after you verified the purge (this is the product recommendation; your own policy may be stricter).

Export the access log

The access log (Access log) is always recorded. To export it:

  1. Sign in to the console with fresh Microsoft MFA.
  2. Open Settings > Audit log (/console/export).
  3. Enter From (UTC, ISO 8601) and Until (UTC, exclusive) (the end must not be in the future) and choose Confirm.

The download contains the audit events of that range as one JSON record per line. The last line is a completion marker (audit_export_complete with the number of rows); a file without it is incomplete, so export again. Every export request is itself recorded before the first row is sent.

Rotate a certificate

Sign in with fresh Microsoft MFA before uploading a certificate or private key. If the console asks you to sign in again, authenticate first and select the files again; uploads are not retained for replay after authentication. The same rule applies to authenticated setup uploads.

Certificate When How
Server (HTTPS) Before expiry; the console warns 30, 14 and 7 days ahead One command on the server, for every certificate source: sudo ./admin.sh tls --hostname <name> --cert <fullchain.pem> --key <privkey.pem> (see below)
App certificates (sign-in, reading, rights mirror) Valid 365 days; rotate at least 30 days before expiry Microsoft 365: Certificates

Renew the server certificate. The command checks the new pair (same name, public chain, not expired, key fits), keeps it in a protected folder, restarts the web service once (a short interruption; people sign in again) and prints the new tls_fingerprint_sha256. It works the same for a first import and for every renewal.

For certbot HTTP-01 renewals, switch the port-80 companion on: in Settings set HTTP redirect and ACME listener (install.tls.http_redirect_enabled, default off; in a settings file http_redirect_enabled=true) to on and run sudo ./admin.sh apply on the server. Point the DNS name at this server and allow inbound IPv4 TCP port 80 in the provider firewall. In the container installation the engine must also publish port 80, and run.sh does that only when it creates the container (BJOERN_HTTP=1); running it again leaves an existing container unchanged, so decide before the first run.sh, or use DNS-01 validation instead. The bjoern-edge-http.service serves only GET/HEAD challenge tokens from the installation-owned webroot; all other HTTP requests redirect to the configured HTTPS origin. Request the certificate once through that webroot, without stopping BJOERN; certbot renew then reuses the webroot. certbot is not part of BJOERN or of the container image: install it where you issue certificates (sudo apt-get install -y certbot), or issue and renew on another machine and copy the pair over:

sudo certbot certonly --webroot -w /var/lib/bjoern/acme-webroot -d bjoern.example.com
sudo ./admin.sh tls --hostname bjoern.example.com \
  --cert /etc/letsencrypt/live/bjoern.example.com/fullchain.pem \
  --key /etc/letsencrypt/live/bjoern.example.com/privkey.pem

The first certificate, before setup, comes from your certificate authority, DNS-01 or certbot certonly --standalone (TLS certificate). If you link compute workers, add --reuse-key to the certbot command: a renewal with a new key stops every worker until you link it again.

Keep port 80 reachable for renewals. Challenge names must be 1–128 letters, digits, _ or -; missing files, traversal, symlinks and directory listings return 404. BJOERN reads the webroot but cannot write it; certbot runs as root to publish challenges. With http_redirect_enabled off (the default), use another validation route, for example DNS-01.

With certbot, make deployment automatic with a deploy hook, a script /etc/letsencrypt/renewal-hooks/deploy/bjoern.sh (mode 0755) that certbot runs as root after each renewal:

#!/bin/sh
exec /opt/bjoern/current/venv/bin/python -I -B -m bjoern.install tls --hostname bjoern.example.com \
  --cert "$RENEWED_LINEAGE/fullchain.pem" --key "$RENEWED_LINEAGE/privkey.pem"

BJOERN has no ACME client of its own. After each renewal sign in to the console, open Renew HTTPS certificate (/console/certificate) and choose Confirm certificate: this records the new expiry date, so the Overview stops warning. Check that the hook works with sudo certbot renew --dry-run, and put the certificate's expiry in your calendar: the alerts 30, 14 and 7 days ahead are your safety net.

An AI client secret is rotated in AI clients > Rotate secret.

Support invitation

iamBJOERN has no standing access to your server or data. Support happens only when you ask for it and invite us.

  1. Open Support in the console and choose Invite.
  2. Choose the duration (1 to 1,440 minutes; default 60). You receive a one-time code to hand to support.
  3. Support redeems the code and sees numbers only (counts, versions, progress) until it expires; you can replace the code at any time, which revokes the old one.

There is no mandatory VPN, tunnel or remote account. Write to support@iambjoern.com.

Support access

Support access lets iamBJOERN support work in the admin console of this installation without an administrator's identity. It is off by default and only you switch it on: on Support > Support access (with a fresh MFA sign-in) or on the server with sudo ./admin.sh support on; sudo ./admin.sh support status shows the state.

Switch it on when support asks for it and off again afterwards. A diagnostic report goes to iamBJOERN support only when you send it under Reporting > Send diagnostic report to iamBJOERN support, after its preview shows you the exact JSON (counts, versions and recent error codes) and its destination (Usage report and diagnostics).

Emergency stop

Action Effect
Stop the web service: sudo systemctl stop bjoern-edge All user and console access ends at once. Reading can continue or be stopped separately (bjoern-connector)
Remove people's role assignments, or disable A1's enterprise application in Entra No one can sign in
AI clients > Revoke (or Revoke all) That AI app can no longer connect
Remove this site under Sources (only before the tenant-wide roles are granted; with them the console refuses, source_mode_conflict) BJOERN stops reading and serving that site; the removal is permanent (Deletion timing)
Disable A2 and A3 under Entra ID > Enterprise applications The apps can no longer obtain new tokens for any site or mailbox in Microsoft 365 (an issued token expires within about an hour); reading stops for all sources

Routine tasks

Frequency Task
Daily Glance at the console Overview and Protection and recovery
Weekly Check your backup system's last result; unexplained count is 0
Monthly Review who holds BJOERN.User and BJOERN.Admin; look at the download page for a new kit, read its release notes and update; restore test
Quarterly Review the released sites
Yearly Rotate app certificates; renew the server certificate; check the licence and its expiry

Next: 6 Security and privacy

Console updates and help

The console shows updates and offers the local Install update button (Updates and rollback).

Updates > Updates and operations shows the installed version, the locally stored verified version notice (New version available or that this version is current), the installed release notes and the Server commands list. The notice has an observation time; opening this page performs no network request. The Operations log shows the recent automatic recovery events from the maintained snapshot, not an invented history of successful commands.

Every console page has ? for the matching section of this installed local handbook. It works offline. Online version is an ordinary link to the matching major/minor public handbook at https://get.iambjoern.com/handbook/1.0/; following it is your choice. The kit also contains the standalone docs/BJOERN-Admin-Handbook.html, built from these sources and stamped per release.

Support diagnostics

The console header names this installation: your organisation name, Installation with the first 8 characters of the installation ID, the server's host name and the version, for example Example Ltd · Installation 3f9a2c1e · hub01 · BJOERN Server 1.0.3. Its Copy button copies the short ID, the full installation ID and the version as one line for a support request; it holds no organisation or host name. Change the organisation name under Settings > Network & certificate.

Support > Diagnostics downloads the existing counts-only JSON report locally. No document content, names, settings or tunnel is included. The administrator decides whether to share it. Support invitations stay temporary numeric Viewer capabilities; creation, replacement, revocation and export retain fresh MFA and revision checks. The invitation code is shown only once.

LibreOffice render protection (render_poisoned)

On the 1.0 Linux server, LibreOffice converts legacy Office formats to OOXML. BJOERN blocks the same contents after a render runs out of memory, exceeds its render window, is killed unexpectedly, or leaves an in-progress marker after a worker crash. Moving, renaming, copying, re-reading, restarting or running the follow-up reading does not clear a block. Changed contents have a different identity.

One render runs per host across both services and both lanes. Waiting for that host lock is admission time: a caller with insufficient time left gets a retryable failure, without a marker or document block. A timeout blocks contents only after a full window (the smaller of 600 seconds and the time limit at entry, including cleanup); a window shortened by admission is retryable without a block. Both admission and short-window failures keep retrying automatically while the source is released. A planned SIGTERM stop kills the render group before removing its own in-progress marker. An abrupt kill or power loss can still leave a block.

Blocked documents are published as text only, using recoverable cached text. Binary XLS/PPT and formats without a direct text reader can have an empty, incomplete rendition. Their status is partial and their reason is render_poisoned. The Recovery page shows each blocked hash with oom, timeout or killed. Its counter counts documents, including identical contents at multiple locations; it is hidden at zero. The normal Retry held items action does not clear render blocks.

To find the document names and source links, run this read-only item-list query on the server. The console has no item-list page with a reason filter. Open a psql session as the connector's database login (role bjoern_release; its login is in the root-only file /etc/bjoern/credentials/release.json):

sudo python3.12 -c 'import json, os; c = json.load(open("/etc/bjoern/credentials/release.json")); os.execvpe("psql", ["psql", "-h", c["host"], "-p", str(c["port"]), "-d", c["dbname"], "-U", c["user"]], {**os.environ, "PGPASSWORD": c["password"]})'

Then run:

SET ROLE bjoern_release;
SELECT i.work_key,
       coalesce(i.payload->'acquired'->>'name', i.payload->>'name') AS name,
       coalesce(i.payload->'acquired'->>'web_url', i.payload->>'web_url') AS source_url,
       i.publication_ref
FROM bjoern.ingest_item i
JOIN bjoern.source_release r USING (tenant_ref, source_ref, incarnation)
WHERE i.is_current AND r.state = 'released' AND i.reason = 'render_poisoned'
ORDER BY i.work_key;

After investigating, choose Clear render block on the Recovery card. Recent MFA is required. The connector applies the request on its next cycle: it clears the hash block and requeues current matching documents in that request, using their retained reader baselines. The receipt includes render_cleared and requeued. The requeue and receipt commit together; a one-shot revision flag prevents duplicate work on replay. A successful fresh render clears the item reason and the previous follow-up reading poison counts. Another render failure blocks the contents again; a stale clear cannot clear a newer failure.

Both lanes use the same render state. Keep parser state and connector reader baselines in backups; missing baselines prevent the clear request from identifying matching item rows. Each clear reads all retained reader baselines, including their text, so large retained collections can make this admin action take longer.

There is exactly one durable marker write per render, fully synced before launch. Completion deletes/updates do not fsync. A rare power loss can therefore restore an old in-progress row and falsely block a successfully rendered file; an administrator can clear it with the same action. A planned restart needs no routine clear.

The update worker installs only a signed release newer than the installed version. It also keeps the highest accepted released_at in root-owned install state and refuses an older signed notice, even if the console cache is replaced.

6 Security and privacy

This chapter explains how BJOERN protects your data and what you can verify yourself. It describes facts and design; it does not replace your own review.

In this chapter

Principles

  1. Read only what the administrator releases.
  2. Each person finds the items their mirrored source permissions allow - BJOERN inherits rights, never grants or extends them. The Microsoft 365 limits are described under Site-wide access policies.
  3. Fail closed. If a right cannot be confirmed, the item is hidden.
  4. Reading. The reading app A2 has no write permission to your sources. The rights mirror app A3 holds full control on each released site and OneDrive to list who has access (in our tests on a Microsoft 365 tenant, SharePoint answered every permission read for read and manage with "access denied"; fullcontrol works); BJOERN uses it only to read permissions and sends no change with it; the grant is technically write-capable, BJOERN's code sends GET requests only (chapter 9, App A3). Only the two optional writing features write, with the filing integration's own app: mail filing and copies of files to a folder (collect_files). Each writes only the files and folders a person confirms, and in mail filing Undo moves an unchanged automatically filed file into To-Delete; BJOERN deletes no file.
  5. Local. Content is processed on your server only.
  6. No content in logs.

Rights mirror

BJOERN mirrors the rights structure of released sources in bulk, on its own schedule, with its own app registration (A3, which holds full control on released sites and uses it only to read rights; the grant is technically write-capable, BJOERN's code sends GET requests only). When a person asks, BJOERN checks the mirror inside the query: only items that the person may open are candidates, then the audit entry is written, and only then is the content delivered.

Rule Detail
Granularity Per person, per item, per version of the item
Changes of rights Reach BJOERN in the first mirror run after the source system reports them (the normal scheduled wait is 900 seconds after a run finishes; retries and mailbox renewal can run sooner; throttling can delay the next run)
Person leaves Revoking the person's AI connection in the console ends access at once; do this first. A disabled account ends search and reading in the first mirror run that receives the disabled state from the identity provider. Separately, rights evidence is never served once BJOERN observed it more than 30 minutes ago. Removing the Microsoft app role blocks new sign-ins only; revoking a Google Workspace role also ends that person's BJOERN sign-ins and console sessions at once. Sequence: Offboard a person
Current version only A file that changed and has not been re-read yet is hidden until it has
First mirror A site's rights are ready when its mirror is complete. Until then nothing from that site is served; an incomplete or failed mirror keeps the site closed
Qualification iamBJOERN qualifies the rights system for every release in its own lab with test accounts: grant, revoke, move, nested groups and outages. The result ships as the kit's signed feature list; Overview > Readiness shows it as Qualified features of this release, and every customer kit names microsoft_files there, so a released site serves once its rights mirror is complete and current. A warning instead of the list means the kit's list is empty or cannot be trusted; then nothing is served, and Readiness names the reason (Install, step 6). You run no rights tests at your installation
Per-connector rules How each source's rights are mirrored is described in the connector chapter, see Microsoft 365
Mirror older than 30 minutes Treated as unknown: the affected items are hidden
BJOERN does not judge content Within a released source everything is read; the source system's rights decide who finds what

Note. The source system confirms rights at the time of the check. A person whose right is withdrawn a moment before a response is delivered may still receive that response. The mirror cycle keeps this window small.

Fail closed

The following all result in "hidden":

Reading continues in these cases; only serving pauses for the affected items.

Sign-in and sessions

Encryption and secrets

BJOERN delivers what the user's rights allow. Field names ending in _masked are the delivered text (historical names). Error code mask_failed means delivery could not be completed safely (audit or authority not confirmed); retry when retryable is true.

Item Protection
Data in transit HTTPS with your certificate; internal services talk over loopback and local sockets
Data at rest Encrypted storage covering /etc, /var/lib (including PostgreSQL and BJOERN), /opt, /tmp, /var/tmp and swap, provided by you before installation (Install)
App registrations Certificates only, no client secrets. The private keys are generated in the server's vault (/etc/bjoern/credentials, root-only) and never leave it; the web process cannot read them
Passwords found in content BJOERN 1.0 delivers what the user's rights allow, including passwords or access keys in documents. AI clients are instructed to name the file and location instead of repeating them; the server does not enforce this.
Backups Your own backup system; keep your backups encrypted and access-restricted (chapter 18)
Secret folder Root-only (mode 0700); never in configuration files

PostgreSQL accepts connections from the server itself only, with separate roles for sign-in, catalog, console, release, parser, mirror and migration.

Logging and audit

What never leaves the server

What does leave: responses to the AI clients that your people connected, rights checks and reading requests to the source systems and identity provider, files a person confirms through mail filing, and, only if you link compute workers, the text passages (documents and mail) those machines compute vectors for. These passages are unmasked document text (BJOERN 1.0 masks nothing) and can contain personal data and secrets such as passwords. A worker on rented compute is a processor of that data: put a data-processing agreement with the provider in place before you link it. Towards iamBJOERN, exactly these can leave:

None of them contains names, contents, file names, paths or search questions, and BJOERN keeps working when iamBJOERN is unreachable (Usage report and diagnostics).

Vendor access by design

Your administrators hold server access. BJOERN's vendor channel consists of signed updates pulled into the server and content-free error reports sent out. The installed product runs under local service identities owned by your installation; host administration stays with you. Support sees what you open for it: numbers only while a time-limited support invitation you created is valid, and the complete BJOERN admin console on the server's own address 127.0.0.1:8454 while you have switched on Support access (off by default; nothing changes in Entra or Microsoft 365). Your admin's click applies an ordinary update. Signed security releases use the automatic 02:00–05:00 server local time window, controlled by the switch on the Updates page.

Automatic error reports are on by default, independently of the optional usage report. Each JSON object contains schema 1, the product version, a UTC time rounded down to the hour and up to 50 entries of fixed component, fixed error code and count. Counters describe observations of fixed-code alarms. The builder checks the closed field and value lists before storing or sending a report. The receiver applies the same contract and keeps a bounded table.

Usage and diagnostics > View sent error reports (/console/licence/error-reports) shows the last 50 sent attempts, with their exact JSON bytes, time and delivery result. Opening the page reads local state. The Automatic content-free error reports switch stops recording for transmission and sending when set to Off. The receiver retains reports without IP addresses.

Hardening the host

Do this before you open the public port:

Supply chain

Releases are built from an allow-list, include a software bill of materials (CycloneDX, in the kit as runtime/sbom.cdx.json) with licences and versions, and are signed with Ed25519. You verify the signature with a public key whose fingerprint you compare with the value printed in the handbook (and, if you wish, confirm with support by e-mail), before anything runs. No component under GPL, AGPL or SSPL ships. Models are bundled; nothing is downloaded at run time. Updates verify signature, version order and expiry.

Trust boundary of the installed release. admin.sh apply and the setup steps google and mail-filing run the release that is already installed under /opt/bjoern with root rights. They check the signature of its release metadata (version, schema, entry points); they do not hash the installed program files again before running them. The installed tree is root-owned and written only by the installer, and that is what keeps it trustworthy: keep /opt/bjoern, /etc/bjoern and the systemd units writable by root only, give no other account root or write access to them, and use a fresh, verified kit (admin.sh upgrade) whenever you suspect the host was changed.

Contact

Questions, support and the licence: support@iambjoern.com. Report a security issue to support@iambjoern.com with the subject "Security": do not include customer data.

Next: 7 Troubleshoot

7 Troubleshoot

Find your symptom, check the likely cause, apply the fix. If a fix does not work, invite support (Support invitation) or write to support@iambjoern.com.

Note. Problems that depend on the source system or the identity provider - registrations, permissions, grants, MFA policy - are in the connector chapter: Troubleshoot Microsoft 365.

Tip. Start with the console Overview and Protection and recovery pages, and on the server with sudo ./admin.sh status and systemctl --failed. The services are bjoern-edge, bjoern-connector, bjoern-controller and bjoern-parser; read their messages with journalctl -u bjoern-edge (and so on). The messages contain codes and counts only.

In this chapter

Console error pages

Each console error page names the cause and offers one next-step button or command.

Cause shown Next step
Sign-in ended (401), or this account needs administrator permission (403) Sign in with the account that holds BJOERN.Admin
Microsoft sign-in did not include MFA proof Open Microsoft Entra and require MFA for BJOERN sign-in with a Conditional Access policy (chapter 9)
Setup session ended Run sudo ./admin.sh setup-code on the server for a new setup code
Mail filing has not been configured Run sudo ./admin.sh mail-filing on the server
Page could not be found (404) Open the console with the button provided
Operation unavailable for this account or no longer recorded Open operations, or filing history for a filing operation
Request changed (409) Open the page provided and review its current state
Filing plan expired or unavailable for this account Open a new filing plan from the filing inbox
Internal error (500), or a service needs support Choose Contact support; the message includes the installation ID

Error pages contain fixed explanations. Credentials, submitted values and document contents stay private.

Installation and setup

Symptom Likely cause Fix
The signature check of the kit fails, or the key fingerprint differs from the published one Wrong or damaged download, or a key that does not match the values in this handbook Stop. Do not run anything from the kit. Download it once more from https://get.iambjoern.com/ and compare the public key's SHA-256 fingerprint with the value in chapter 3; if the check fails a second time, write to support@iambjoern.com, who also confirm the fingerprint by e-mail
root_required admin.sh was started without sudo Run it with sudo ./admin.sh ...
already_installed_use_upgrade BJOERN is already installed Use sudo ./admin.sh upgrade for a newer kit (Updates); sudo ./admin.sh apply repairs and applies saved Installation settings
installed_runtime_required You ran a command other than install/trust before the first install, or from the wrong directory Run the first trust and install from the extracted kit directory
settings_store_missing The Installation settings were moved into the database, but the database has no such record any more (for example a database restored from before that move) Change nothing by hand; contact support@iambjoern.com. The installer applies nothing until the record is back
settings_cas_conflict, settings_store_corrupt The installer found Installation settings in the database that differ from its own record, or its own record is damaged; it stopped without changing anything Run the same command once more; if the code stays, contact support@iambjoern.com
settings_store_unavailable The installer could not read or write the Installation settings in the database Check that PostgreSQL runs (pg_lsclusters), then run the command again
The installer refuses a signed kit and mentions trust The public key was not provisioned Run sudo ./admin.sh trust <public.pem> --key-id <id> --fingerprint <sha256> with the key ID and fingerprint printed in chapter 3
Installer reports too little capacity Below minimum CPU, RAM or disk Resize the server; see sizing
database_operation_failed The PostgreSQL 19 cluster that the installer sets up is not running, or a bjoern database already existed pg_lsclusters shows the cluster. On a first install start it with sudo pg_ctlcluster 19 main restart; use a server on which no bjoern database exists yet. If /var/lib/bjoern/install/pg-move.json exists (an interrupted move to PostgreSQL 19), start no cluster yourself: run sudo ./admin.sh upgrade again
admin.sh upgrade says postgresql_target_cluster_exists The move to PostgreSQL 19 found a PostgreSQL 19 cluster main, for example the incomplete copy of an interrupted move; BJOERN never removes a cluster PostgreSQL 17 still serves BJOERN. Check that cluster with pg_lsclusters; once you are sure it holds nothing you need, remove it with sudo pg_dropcluster --stop 19 main and run sudo ./admin.sh upgrade again
admin.sh upgrade says postgresql_createcluster_file_exists A file /etc/postgresql-common/createcluster.d/bjoern-pg-move.conf exists that BJOERN did not write; BJOERN leaves it as it is PostgreSQL 17 still serves BJOERN. Move that file elsewhere if you no longer need it, run sudo ./admin.sh upgrade again, then put it back
admin.sh upgrade says bjoern_services_start_failed The move finished or was rolled back, but a paused BJOERN service did not start again Run sudo ./admin.sh upgrade again: it starts the paused services first; systemctl --failed names the one that fails
admin.sh upgrade says postgresql_space_insufficient The file system of /var/lib/postgresql has less free space than the database size plus 10 % that the copy needs, or a failed copy left it almost full (a low-space indication; /var/log/postgresql names the actual cause) Before the copy nothing was changed: free disk space and run sudo ./admin.sh upgrade again. After a failed copy PostgreSQL 17 serves BJOERN again, unchanged. Check with pg_lsclusters whether an incomplete PostgreSQL 19 cluster main remains (stopped, on port 5433); if it does, remove it with sudo pg_dropcluster --stop 19 main (this frees its space). Free more disk space and run sudo ./admin.sh upgrade again
admin.sh upgrade says postgresql_old_cluster_running A rerun of an interrupted move found PostgreSQL 19 on port 5432 and could not stop PostgreSQL 17 (for example both started after a reboot) PostgreSQL 19 retains port 5432 (it may be down until the rerun completes). Stop the old cluster with sudo pg_ctlcluster 17 main stop and run sudo ./admin.sh upgrade again; /var/log/postgresql says why it did not stop
admin.sh upgrade says postgresql_upgrade_failed, postgresql_vector_update_failed or postgresql_analyze_failed The move to PostgreSQL 19 did not finish, for example too little free disk space for the copy On the first run the installed release runs on PostgreSQL 17 again; on a rerun that found PostgreSQL 19 on port 5432 it keeps PostgreSQL 19 (pg_lsclusters; then keep the 19 cluster). Free disk space (PostgreSQL 19) and run sudo ./admin.sh upgrade again; /var/log/postgresql holds PostgreSQL's own messages
admin.sh upgrade says postgresql_restore_failed The move did not finish and PostgreSQL 17 could not be started again on port 5432 Contact support@iambjoern.com before you change anything; both clusters are still on disk (pg_lsclusters)
BJOERN does not start after a reboot The encrypted storage is still locked, so PostgreSQL and BJOERN wait Dedicated server: unlock the storage at the server console (KVM or rescue console at your host); BJOERN starts after the mount. Container installation: unlock and mount the volume over SSH, then start bjoern-container yourself (After every reboot)
admin.sh external says certificate_required No certificate imported Import it first: sudo ./admin.sh tls --hostname <name> --cert <fullchain.pem> --key <privkey.pem>, then run external again (chapter 3, step 4)
admin.sh external says certificate_invalid or certificate_expired The imported certificate is for another name than the installation's hostname, or has expired Import a current pair for exactly that name with admin.sh tls, then run external again
admin.sh tls says tls_hostname_invalid The --hostname value is not a valid DNS name, or the certificate does not name it Use the certificate's exact DNS name, or a certificate issued for that name
admin.sh tls says tls_chain_invalid The file holds only the leaf certificate, the chain is incomplete or out of order, or it does not lead to a trusted root Use the full chain file (for example fullchain.pem), leaf first
admin.sh tls says tls_expired A certificate in the chain is expired or not yet valid Import a current pair; check the server time (timedatectl)
admin.sh tls says tls_key_mismatch The key file does not belong to the certificate Use the private key issued together with this certificate
admin.sh tls says tls_upload_invalid A file is empty, too large, not PEM, or the key has a passphrase Use the PEM files of the certificate and a key without passphrase
An import says binding The bundle names another installation or tenant Stop; send installation_ref and tenant_ref to the bundle producer for a new bundle (chapter 14)
A compute worker stops with pin_mismatch The server's HTTPS key changed Choose Link worker again for each worker (chapter 15)
The setup page cannot be reached at https://<your-host>/console/login, or another server answers The DNS A record is missing, still cached, or points elsewhere; or admin.sh external was not run; or a firewall in front blocks 443 From outside the server check the record with nslookup <your-host> (or dig); wait for the record's TTL after a change; check that admin.sh external printed "status": "ok" and that your provider allows 443. Do not continue through a certificate warning. Until DNS works use Recovery: setup through an SSH tunnel
The browser warns about the certificate on the setup page The name points to another server, or the certificate does not fit the name Stop. Fix DNS (row above) or import the right pair with admin.sh tls. Only in the SSH-tunnel recovery route is a warning expected; compare the fingerprint there as described
The sign-in page says Setup is unavailable The setup code expired (24 hours), was locked after 10 wrong attempts, or the setup state cannot be read Issue a new code on the server: sudo ./admin.sh setup-code, reload the page and enter it
The page says setup_session_required Before setup is complete, only the browser in which the code was entered, and the first administrator who signed in from it, may continue; or that setup session ended (24 hours) Continue in that browser with that administrator. Otherwise issue a new code with sudo ./admin.sh setup-code, enter it, then choose Sign in with Microsoft on the wizard's admin sign-in step in the same browser
The page says setup_listener_required The setup page is only served to the setup listener's clients: loopback, the LAN subnet, or (after admin.sh external) anyone while a setup code is open Use the address of step 4; if the code expired, issue a new one with sudo ./admin.sh setup-code
The page says https_required The address was opened with http:// Use https://
Setup code is refused Code expired (24 hours) or locked after 10 failed attempts Issue a new code on the server: sudo ./admin.sh setup-code (run in the kit directory; it invalidates the earlier code); enter it within 24 hours
Setup code cannot be issued again The installation is already promoted Sign in with Microsoft as a member of the app role BJOERN.Admin
The page says wizard_order_invalid Steps were opened out of order Continue with the step the wizard shows next: Hostname and HTTPS, Licence, Microsoft apps, Microsoft access, Groups, Admin sign-in, Rights policy, Release SharePoint sites, Go public
The licence step refuses the key The key is damaged (a character lost in copying), was not issued by iamBJOERN, or is already bound to another Microsoft tenant Paste the key again from the e-mail; request the Free key again at https://get.iambjoern.com/free-key with the same address (you get the same key; free-mail addresses are refused); for a key bound to another tenant write to support@iambjoern.com
The wizard cannot be finished No valid licence key has been entered Complete the Licence step (Install, step 5.3)
The wizard says setup_installer_required The installed release cannot perform this setup step Update to the current kit (Updates); if it persists write to support@iambjoern.com
The wizard's Go public step still shows the command after you ran it The wizard's own check did not reach this installation at https://<your-host> on port 443 (or another server answered for the name) If the name works from another computer, the router has no NAT hairpin: choose Finish setup and open Overview - public access unverified. Otherwise check that the command printed "status": "ok", that the DNS A record points to the server and that your provider's firewall allows 443, then choose Check again (chapter 3, step 5.8); the command's errors are explained in chapter 3, step 4
Browser warns about the certificate after the host name was set Certificate does not match the name, is incomplete or self-signed Install the full chain for the exact DNS name with sudo ./admin.sh tls --hostname <name> --cert <fullchain.pem> --key <privkey.pem>
microsoft_vault_unavailable The private setup directory is locked or missing Check that the storage is unlocked and that /etc/bjoern/credentials exists; rerun the step

Sign-in

Symptom Likely cause Fix
Admin sign-in works but a user cannot connect their AI The user has no app role, or the licence seat limit is reached Assign BJOERN.User (Add a person); see Licence
"App role required" The sign-in token has no BJOERN.User/BJOERN.Admin role Create both roles on app A1 and assign them; "default access" does not work
"MFA policy required" No MFA proof in the token See Microsoft 365 troubleshooting: a Conditional Access policy must require MFA for BJOERN sign-in and cover the person
Sign-in is refused for everyone Registration, certificate or role problem with the identity provider See the connector chapter; run the wizard's connection test again if setup is open
"Sign in again" on a console change The last MFA is older than the freshness window (15 minutes by default) Sign in with Microsoft again, then repeat the change
Console session ends often Session lifetime is 60 minutes by default Expected; adjust Settings > Console session lifetime if needed
Too many failed attempts Sign-in rate limit per address or installation Wait a minute and try again

Reading and sources

Symptom Likely cause Fix
Nothing is read after release Tenant-wide roles missing ("Waiting for selected grant"), or the first listing is not complete Check Sources; grant the tenant-wide roles; wait for the next run (15 minutes)
Items "unsupported" Format BJOERN does not read (for example some CAD or video formats) They stay listed and counted per format
First pass is very slow CPU-bound OCR; large data volume The follow-up reading runs in the background at low priority and does not block users; more CPU shortens it
A scope is paused A protection tripped (for example repeated failures or memory pressure) Open Protection and recovery, read the reason, then choose Recheck and resume
"Held removals" A listing missed a large share of a library, or a source disappeared Check the source in Microsoft 365; restore the source or leave the hold to the next verified night listing; see held removals
Disk almost full Catalog and index growth, backups on the same disk Extend the disk; keep backups on your backup volume (chapter 18)
A site line shows Paused The rights mirror stopped this site (or the whole tenant) after a check failed Fix the named cause, then Release stop under Rights mirror stops (/console/controller)
A site line shows Error Its rights mirror failed, or vectors failed three times Read the message under Released sources; for vectors: sudo ./admin.sh vector-retry --site <source_ref> --apply
A site line shows read gaps Reading could not finish some items Open Failed items and retry on that line; choose Retry this or Retry all (the connector applies it at its next cycle)
"The rights mirror has not taken up this released site yet" The rights service has not loaded the new release Wait one cycle (15 minutes); if it stays: systemctl status bjoern-controller
"did not finish in time twice (rights_time_limit_reached)" The site's rights refresh is longer than one tick Release stop under Rights mirror stops (/console/controller)
"A released subsite waits for its parent site" The parent site is not released Release the parent under Add a site (/console/sources/add)
vector_memory_insufficient Too little RAM for vector computation Add RAM (sizing), then sudo ./admin.sh vector-retry --apply
"Reading has stalled" or "No reading workers are running" The reading service stopped or hangs systemctl status bjoern-connector
An Overview service dot is amber Database: the status read did not answer; Reading: no report within the last minute Database: pg_lsclusters; Reading: systemctl status bjoern-connector. Rights and vectors publish no heartbeat; their dot says so and each site line shows their state
Memory brake acting now on Live reading Memory pressure or a kernel kill of a reading process No action needed: reading speeds up again when memory is calm; the only setting is the on/off switch

Search and results

Symptom Likely cause Fix
Nobody gets results right after the first read The site has not opened yet: its rights mirror or its vectors are not complete Run the --status command (Install, step 6) and read the pending list of the site; wait one mirror cycle (15 minutes); check the grants of A2 and A3
Nobody gets results later Rights mirror stale (older than 30 minutes), A3 lost access or its certificate expired, or audit unavailable (audit_unavailable) Check A3's permissions and certificate; check that PostgreSQL is healthy and bjoern-controller is running
One person sees fewer results than expected They cannot open those items in Microsoft 365, or the mirror is not updated yet Check their access in Microsoft 365; wait one mirror cycle
A new file is not found Not read yet (next configured reading run, 15 minutes by default; large files and hard scans wait for the follow-up reading) Wait for the next run
Exact numbers or names are missed Word index not updated yet Same as above
A deleted file still appears Not permanently deleted (recycle bin), or the change list has not run yet Delete it permanently in Microsoft 365; wait for the next run
A password appears in clear text BJOERN 1.0 delivers what the user's rights allow, including passwords in documents; the AI client is only instructed to name the location instead of repeating the value Nothing to repair; restrict the document's rights if the password must not be read (Passwords in results)

AI connection

Symptom Likely cause Fix
AI says "reconnect" Connection unused for 7 days or older than 30 days, role removed, or the person's connection was revoked The person chooses Connect again
Connector setup fails with invalid_client Wrong client ID or secret, the secret was rotated, or the authentication method differs Check ID and secret; register again with the other method (client_secret_post or client_secret_basic)
Redirect error when connecting The AI product's callback address is not registered exactly Register the exact address the product shows (https, no wildcard) in AI clients
The AI product cannot find BJOERN's sign-in The MCP address is wrong or not reachable The address is https://<your-host>/mcp; open https://<your-host>/.well-known/oauth-protected-resource/mcp from the internet: it must answer with JSON
The connection waits for approval The AI app announced itself and awaits you Approve it under AI clients > Waiting for approval
The app lists no tools or returns "insufficient scope" BJOERN has no scopes field or action selector: every registered client offers search + read, and this server issues no scope error itself. The AI product most likely holds a connection from an older registration or a revoked one Check the client's state under AI clients > Clients (approved, not revoked), then have the person remove the connection in the AI product and choose Connect again
A person cannot connect: seat limit The licence allows no further users See Licence; release idle seats or request a larger key
Long requests end early AI client timeout is shorter than the tool run BJOERN returns a partial result with a continuation; ask the AI to continue

Mail filing and file operations

Symptom Likely cause Fix
Filing needs its scratch directory after an upgrade The saved edge scratch path or its directory needs repair Run sudo ./admin.sh apply from the installed kit. It repairs the edge scratch setting in the saved configuration and existing runtime snapshot, and creates the edge-owned directory with mode 0700 (Mail filing setup)
Scratch files remain after an interrupted filing request The web service stopped during a MIME transfer Restart bjoern-edge; its startup removes filing-* files directly in its scratch directory before serving filing requests. journalctl -u bjoern-edge reports the count as mail_filing_scratch_removed
A resumed operation reports changed or missing items A mail's source folder or changeKey, or a file's folder or version, changed since the plan Review the per-item outcomes and counts. Mail reports reconfirm_required or mail_unavailable; file copies and moves report version_changed or source_unavailable. Unchanged items continue. Prepare and confirm a fresh plan for the current items
A resumed copy reports reconfirm_required Its older plan needs a source-folder and eTag baseline Prepare a fresh copy preview and start it; the new plan records those checks

Operations

Symptom Likely cause Fix
admin.sh upgrade says backup_recovery_active A restore started with the built-in backup of release 1.0.0-rc.12 or older is unfinished. The new release refuses while it applies itself, after the switch, before any recovery protection is retired; the update then ends like any failed apply: rolled_back (the previous release is active again) or, if that rollback fails too, failed Finish that restore with the kit that started it, then run sudo ./admin.sh upgrade again (Restore codes)
admin.sh restored --apply says restored_units_active, restored_schema_unsupported or restored_tenant_mismatch A BJOERN unit still runs, the restored database comes from a release this kit cannot prepare, or the restored database and configuration come from different installations Restore codes; the command changed nothing
journalctl -u bjoern-edge shows edge_bind_failed and the web service restarts every few seconds The web service cannot listen on its address and port: the address is no longer on the server (an interface lost or changed its IPv4 address) or another program holds the port ss -ltnp names a program on the port; stop it or move it. If the address changed (a new DHCP lease, a renamed interface), run sudo ./admin.sh apply; it renders the current address. In a container BJOERN listens on all container addresses and this does not happen after a restart (chapter 17)
journalctl -u bjoern-edge shows edge_lifespan_failed The web service's application did not complete its own startup Run sudo ./admin.sh status; restart it once with sudo systemctl restart bjoern-edge. If the code stays, send the journal lines (they hold no content) to support@iambjoern.com
journalctl -u bjoern-parser shows parser_unavailable: QualificationError: conversion_containment_unavailable leaf=... errno=... root_controllers=... The reader service could not set up the memory and process limits for its document converters: systemd did not delegate them, or the parent cgroup does not offer the memory and pids controllers (in a container: the container's cgroup) leaf names the service's cgroup (it should end in /workers), errno the refusal and root_controllers the controllers the service's cgroup offers (memory and pids must be listed). In a container check that it runs with --cgroupns=private as run.sh creates it and run bjoern-qualify-sandbox; otherwise send the line to support@iambjoern.com
rolled_back after an update The health check of the new release failed The previous release is active again; read the error, check sudo ./admin.sh status, then retry with the correct kit
Update refused Signature, version order or expiry check failed, a downgrade, or an incompatible state Read the reason; obtain the correct signed kit; the kit's signed expiry date may have passed
Certificate alert Expiry close Rotate the certificate
New users cannot connect Seat limit reached Licence; replace the key with a larger tier
The last usage report shows a failed delivery No internet access or the receiver is not reachable No action needed: BJOERN keeps working and tries again; see Usage report

Next: 8 Connectors overview

8 Connectors overview

BJOERN is built around connectors. A connector brings one kind of source into BJOERN: it reads the sources you release, mirrors who may open what in that source, and (where it is also your identity provider) signs people in. The core of BJOERN - index, search, MCP, console, audit - is the same for every connector.

In this chapter

Available connectors

Connector Reads Status Chapter
Microsoft 365 SharePoint Online sites (available); Exchange Online mailboxes (available after qualification); personal OneDrives (available) Available for SharePoint and OneDrive 9
Dropbox Business Team folders, shared folders, member folders Preview 11
Google Workspace Shared drives, Gmail mailboxes; My Drive (later version) Preview 12
Atlassian (Jira + Confluence) Projects, spaces, comments and attachments Preview 13
File shares - (later version) -

Dropbox Business and Google Workspace are set up with the server command bjoern-provider and released in the console under Sources > Manage connections. Both are previews in release 1.0: not yet qualified for production. Setup, discovery and connection checks are available. The console shows both as "not yet qualified" and offers no Release source action; source release requires a qualified build. Content serving also requires completion of identity mapping. Separately, Google Workspace needs its daily licence job (housekeeping). Previews remain previews until qualified. Each chapter starts with the details.

Note. "Later version" is a direction, not a commitment to a date or a scope. A connector appears in this handbook with its own chapter when it is available.

What every connector provides

The qualified connector (Microsoft 365) provides all of the following. A preview connector provides them only after it is qualified, and serving content also requires completed identity mapping.

Capability Meaning
Release list You release sources; the connector reads exactly those
Complete reading Every item in a released source, with attachments, in all languages (BJOERN reads all languages)
Rights mirror The source's own access rights are mirrored; each person finds the items those mirrored rights allow
Fail closed A right that cannot be confirmed means the item is hidden
Deletion mirror What is permanently deleted in the source is removed from BJOERN
Reading The connector's code sends no change to the source. Where reading permissions needs a broader grant (Microsoft 365: full control for the rights mirror app A3 on each released site), the connector uses it only to read; the grant is technically write-capable, BJOERN's code sends GET requests only
Least privilege The connector asks the source for the narrowest permissions that do the job

Identity provider

BJOERN uses your organisation's identity provider for sign-in to the console and the MCP endpoint. Microsoft Entra ID is the identity provider of the setup wizard; its setup is part of the Microsoft 365 connector. An installation for Google Workspace signs in with Google instead; you set it up with one server command, sudo ./admin.sh google (chapter 12, step 1).

Chapter template

Each connector chapter has the same structure so that you can compare connectors:

  1. What it reads
  2. Prerequisites
  3. Permissions and why (least privilege)
  4. Set up, step by step
  5. Release sources
  6. How rights are mirrored
  7. Limits
  8. Settings
  9. Alerts and troubleshooting

Next: 9 Connector: Microsoft 365

9 Connector: Microsoft 365 (SharePoint, OneDrive, Exchange)

The Microsoft 365 connector reads all SharePoint sites once you grant its tenant-wide roles, mirrors who may open what, and - because Microsoft Entra ID is the identity provider supported today - signs people in. It is the only connector available today. Every step in this chapter is specific to Microsoft 365; the generic procedures are in chapters 2 to 7.

In this chapter

What it reads

Source Read Status
SharePoint Online sites Every document library, folder, file and the current version of each file of each released site Available
Exchange Online user mailboxes Every message in the mailbox's folder tree (from the top of the mailbox; search folders and Recoverable Items are not read) with every attachment; visible to the mailbox owner (available after qualification) - reading and rights mirror are built; serving mail to users starts with a kit whose release notes name mail as qualified
Exchange Online shared mailboxes The connection test accepts user mailboxes only (later version)
Exchange Online online archives (In-Place Archive) Not read in 1.0: no archive item or attachment is fetched or served. Read once Microsoft offers a supported read path (later version)
OneDrive Every folder and file of each personal OneDrive (with the tenant-wide permissions: every enabled member's, automatically); visible to its owner, to the people it is shared with and to its site collection admins (secondary owners Microsoft may add) Available
Calendar, contacts, tasks, Teams, group and room mailboxes, public folders - (later version)

Scope of 1.0.0-rc.16. This kit serves all SharePoint Online sites, including subsites, and the personal OneDrive of every enabled member. Mail is served when the kit's signed feature list names microsoft_mail (Readiness shows the list); the console shows mailbox serving status, and the mailbox steps apply then (Release status).

BJOERN reads all languages. Ingestion and the permission mirror only read: A2 reads content with a read grant. A3 holds full control on each released site and OneDrive and uses it only to read permissions (Why full control for A3); neither app ever sends a change to Microsoft 365. The optional copies, moves and To-Delete of chapter 13 use the separate filing app with the person's own delegated rights, only after the person confirms each job; nothing is deleted.

Prerequisites

Sign-in and MFA

BJOERN signs people in with Microsoft and requires multi-factor authentication (MFA) for everyone who connects an AI and for console admins - console and AI connections alike.

What MFA is, in one sentence: a second proof at sign-in, for example a code in the Microsoft Authenticator app, on top of the password. Microsoft records that proof in the signed sign-in token (amr contains mfa), and BJOERN checks it there. There is one proof only; BJOERN has no setting for it.

Create the MFA policy

Create the policy after the three apps are registered (Step 2), because it targets BJOERN sign-in, and set it On before the first BJOERN admin sign-in. In the Entra admin center, Protection > Conditional Access > Policies > New policy:

  1. Name, for example, "BJOERN MFA".
  2. Users: include the BJOERN admin and user groups (or the people who hold BJOERN.Admin or BJOERN.User).
  3. Target resources: Cloud apps > Select apps > the enterprise application BJOERN sign-in.
  4. Grant: Require multifactor authentication. Set the policy On and save.

This needs Entra ID P1 (included in Microsoft 365 Business Premium, E3 and E5).

Security Defaults alone is not enough. With Microsoft Security Defaults, ordinary users are asked for MFA only "when necessary" (by risk or device), not at every sign-in. A person whose sign-in token has no amr claim containing mfa is refused by BJOERN with "MFA policy required", unpredictably from one sign-in to the next. This also applies to a BJOERN.Admin who holds no Entra admin role.

Each person who signs in needs a registered MFA method (for example Microsoft Authenticator) and membership in a group the policy targets. An installation upgraded from 1.0.0-rc.8 that used the authentication context c1 keeps working once the policy above is in place; the stored context value is ignored, and a policy on c1 can be deleted.

Rules

Network access

Outbound from the BJOERN server:

Destination Use
login.microsoftonline.com Microsoft Entra sign-in and token requests
graph.microsoft.com Reading SharePoint data, rights, people and groups; mailbox classification and mail reading
<tenant>.sharepoint.com Reading files and SharePoint permissions

Apps, permissions and why

BJOERN uses three app registrations in your tenant. All are single-tenant ("Accounts in this organizational directory only"). All use certificates instead of client secrets. The installer generates one key pair per app in the server's protected vault (certificate valid 365 days). The private key never leaves the server; you download the public certificate in the wizard and upload it to the app. Each app has the narrowest permission Microsoft accepts for its task.

App Purpose Reads content?
A1 BJOERN sign-in Signs administrators into the console and users into the MCP endpoint (identity provider role) No
A2 BJOERN reading Reads all SharePoint sites and the released mailboxes Yes
A3 BJOERN rights mirror Reads who may open what (rights structure) No

The three apps must be three different registrations; the wizard refuses the same application ID twice.

App A1 - BJOERN sign-in

Setting Value
Redirect URIs (platform Web) Three: https://<your-host>/console/callback, https://<your-host>/oidc/callback and https://<your-host>/console/microsoft/callback
Public client flows Off
API permissions As in the required-grants table below.
Token configuration Optional ID-token claims auth_time and amr
App roles BJOERN.Admin (display name "BJOERN admin"), BJOERN.User (display name "BJOERN user") and BJOERN.Viewer (display name "BJOERN viewer", description "May view the BJOERN admin console (read only)"); member type User for all three
Certificate The sign-in public certificate from the wizard (Certificates & secrets > Certificates)
Enterprise application "Assignment required" = Yes. Assign admins to BJOERN.Admin, people who only view the console to BJOERN.Viewer and everybody else to BJOERN.User (people directly, or groups with P1). Never use "default access".

Only people with a role can sign in.

App A2 - BJOERN reading

A2 reads the content of every SharePoint site, including subsites, with Sites.Read.All, and the mailboxes an administrator released. It only reads; it never changes anything in Microsoft 365.

App A3 - BJOERN rights mirror

A3 reads site permissions, group membership, directory users and licence assignments. For mail, it confirms each primary address is a user mailbox inside the chosen Exchange scope. Its transports support permission reads through GET requests only.

Why full control: A3 mirrors the rights. SharePoint returns the permission list of a site, library, folder or file only to an app that holds full control of that site; with read or manage it refuses the request. With these lists BJOERN mirrors who may open what, so every person finds only what they may open in Microsoft 365 and a removed permission stops access at the next rights tick. A3 uses full control for exactly this and sends read requests only; it never changes, moves or deletes anything. Copies, moves and To-Delete run through the separate filing app with the person's own delegated rights (chapter 13).

Required grants

The console, the app manifests and the generated Entra script use exactly these rows. Once the application permissions are granted, BJOERN reads all SharePoint sites, including subsites and sites created later, automatically: it finds new sites every 15 minutes. Microsoft's permissions decide who finds what (What BJOERN mirrors). Before you grant them, run the tenant and site checks there. The three apps have distinct certificates and application IDs.

Application API Required grant Use What BJOERN does with it
BJOERN sign-in Graph openid Delegated Signs people in
BJOERN sign-in Graph profile Delegated Carries the person's object ID into the sign-in token
BJOERN reading Graph Sites.Read.All Application; admin consent Reads the files of every site
BJOERN rights mirror Graph User.Read.All Application; admin consent Reads users, to mirror who may open what and to resolve mailbox addresses
BJOERN rights mirror Graph GroupMember.Read.All Application; admin consent Reads group memberships for the rights mirror
BJOERN rights mirror Graph LicenseAssignment.Read.All Application; admin consent Reads the licence-plan inventory for Site-wide access policies
BJOERN rights mirror Graph Sites.Read.All Application; admin consent Finds sites and reads sharing links
BJOERN rights mirror SharePoint Sites.FullControl.All Application; admin consent Reads the permission lists (Why full control)
BJOERN reading Exchange RBAC Application Mail.Read Admin-released addresses; chosen management scope Reads released mailboxes
BJOERN rights mirror Exchange RBAC Application MailboxSettings.Read Same mailbox scope Confirms that an address is a user mailbox

Upgrade from rc.9 or rc.10: to read all sites, grant Graph Sites.Read.All on A2 and A3 and SharePoint Sites.FullControl.All on A3. Existing Sites.Selected grants may stay. A3 needs no Graph Sites.FullControl.All. Keep the directory, licensing and Exchange permissions in the table. Within 15 minutes BJOERN reads all sites; existing releases and indexing cursors stay. The connection test names each role it does not expect; wait for fresh tokens and test again after changing consent. With selected sites, each site's readiness reports missing grants and only granted sites can be read.

If you select hidden-membership groups, add Graph application Member.Read.Hidden to the rights mirror; it becomes required for that configuration. Mail roles apply when releasing mailboxes. The rights mirror uses certificate credentials and GET-only transports to read permissions. Per-user rights checks at search remain the access gate.

Set up

The setup wizard (chapter 3, part B) shows the exact names and values, offers the downloads used below, and tests the result. The steps below follow the wizard's screens.

Step 1: Prepare people and groups

People may be assigned to the app roles directly or through groups. The MFA policy targets these groups:

Group Purpose
BJOERN admins People who sign in to the console (app role BJOERN.Admin).
BJOERN users People who connect an AI (app role BJOERN.User).

The two group object IDs in the wizard step "Groups" are optional and used for direct-assignment checks only.

Step 2: Register the three apps - choose your way

The wizard step Microsoft apps offers two ways of equal standing: Run the BJOERN script or Register by hand. Choose either; you can switch at any time. Both create the same three apps with the same permissions and end in the same connection form and Test connection (Step 4). Roles are the same for both ways (see Prerequisites): Application Administrator or Cloud Application Administrator creates the apps; admin consent for the Microsoft Graph application permissions of A2 and A3 needs Privileged Role Administrator or Global Administrator.

Way 1: BJOERN script

The console generates bjoern-entra.ps1 for this server. It contains only public data: this installation's ID, the server name, the three public certificates and the exact permissions above. It never creates a client secret, and it never reads or writes Conditional Access (create the MFA policy by hand, see Create the MFA policy).

  1. Choose Download script (or Download script with hidden-membership groups if you need Member.Read.Hidden). If you copy the file to another machine, compare its SHA-256 with the value the console shows (Get-FileHash ./bjoern-entra.ps1).

  2. Run it in PowerShell 7.4 or later on Windows, macOS or Linux, or in Azure Cloud Shell. Windows PowerShell 5.1 is not supported; the script refuses to start there. It needs the module Microsoft.Graph.Authentication (Install-Module Microsoft.Graph.Authentication -Scope CurrentUser; preinstalled in Cloud Shell).

    ./bjoern-entra.ps1 -TenantId <tenant-id>
    

    Sign in as the Microsoft admin. The script applies its changes without asking; add -WhatIf first to only see what it would do, or -Confirm to be asked before each change. Optional: -AdminGroupId <group-id> assigns BJOERN.Admin only to that group (Entra ID P1), with no direct assignment to the signed-in person. Console administrators must be members of that group. Add -UseDeviceCode when no browser can open on this machine (SSH session, Azure Cloud Shell): the script shows a code that you enter at the Microsoft sign-in page on another device. The session is kept in this PowerShell process only and is closed at the end.

  3. Without -AdminGroupId, the script assigns the signed-in person to BJOERN.Admin on BJOERN sign-in, with one Graph assignment call, and prints their sign-in name and object ID. A repeat run prints already assigned; no change. If Graph refuses the assignment (HTTP 403), the script stops with guidance: rerun as an Application Administrator, Cloud Application Administrator or Global Administrator (or another role allowed to assign app roles), with AppRoleAssignment.ReadWrite.All approved at Graph sign-in. It resumes from the saved apps. A refused read names User.Read for the signed-in profile or the Graph read permissions for app-role assignments. The script prints one line starting with BJOERN-ENTRA-1:. Paste it into Script result and choose Fill in and test. The console fills in the tenant ID, the three application IDs and the hidden-membership choice and runs Test connection. The line carries IDs and certificate fingerprints only, no secret.

  4. If your role could not grant admin consent, the script says so, prints an admin consent link for each app and the line says consent: pending. A Privileged Role Administrator or Global Administrator opens the links (the console shows them too when the test reports missing consent), then you test again.

Running the script again is safe: it finds its apps by this installation's ID, changes only what differs and prints the same line. If it stops, it names the step; fix the cause and run it again. It never changes an app it did not create, even with the same name, unless you adopt that app explicitly (below).

Certificate rotation is not part of the script; it stays the manual procedure in Certificates.

Way 2: by hand

The page lists, for each app, the exact name, redirect URIs and permissions. Use each top-right Copy icon for plain text. It also offers Download app manifest (three files) and Download public certificate (three files).

  1. In the Entra admin center open Entra ID > App registrations > New registration.
  2. Create "BJOERN sign-in", "BJOERN reading" and "BJOERN rights mirror", each with "Accounts in this organizational directory only". Remove the default User.Read permission.
  3. Fast way: open the app's Manifest and merge the matching downloaded manifest file into it. The file holds only the properties BJOERN sets: displayName, signInAudience and requiredResourceAccess for all three apps, plus web.redirectUris, optionalClaims and appRoles for the sign-in app. It holds no id or appId. Replace each of these properties in the editor with the value from the file, keep every other property as it is, including id and appId, and choose Save. Manual way: enter the values from the tables above.
  4. For A2 and A3 add the API permissions exactly as listed. Choose Grant admin consent for <tenant> on all three apps (as Privileged Role Administrator or Global Administrator, see Prerequisites).
  5. For each app open Certificates & secrets > Certificates > Upload certificate and upload the matching downloaded public certificate (bjoern-signin.cer to A1, bjoern-reading.cer to A2, bjoern-mirror.cer to A3).
  6. Copy the Directory (tenant) ID and the three Application (client) IDs from each app's Overview page.

To remove apps registered by hand, delete them in Entra ID > App registrations.

Step 3: Grant the tenant-wide roles

Run the tenant and site checks of What BJOERN mirrors first. Then grant admin consent for the application permissions of the required-grants table (the script does this when your role allows it, Step 2). No per-site grant is needed. Test connection recognises the granted roles; after the admin sign-in BJOERN finds every site and subsite and reads it, and it finds new sites every 15 minutes.

Follow Fast read > Rights mirror > Meaning index (vectors) > Open on Overview or Released sources. A failed mirror keeps the site closed.

Step 4: Enter the IDs and test

In the wizard step Microsoft apps enter the Directory (tenant) ID and the three application IDs (the script result fills them in), and tick the hidden-membership box if it applies. Choose Test connection.

Expected result: the page reports "Certificate, Graph consent/permissions and selected-site access verified. Continue with groups and the Microsoft admin sign-in test." (with mailboxes entered: "... selected-site access and mailboxes verified."). The test checks the certificates and compares A2's Graph token permissions and A3's Graph and SharePoint token permissions with the exact set listed above. It reports, for example, a missing consent, an extra permission, a rejected certificate or a clock difference between your server and Microsoft. Fix the named item and test again; testing is repeatable and changes nothing in Microsoft 365. For each entered mailbox it also uses A3 to resolve the primary address and confirm userPurpose = user through Graph. A refusal blocks saving; the displayed mailbox number identifies the entry to correct. A metadata-only A2 request also checks effective mail-reading access. Use the Exchange commands below to inspect the assignments. The test uses Graph and SharePoint tokens; Exchange role configuration stays an admin task. Save and continue stores the tested configuration. The wizard then continues with the groups, the admin sign-in (which also proves the MFA setup), the rights-policy question and the start of reading.

Before the admin sign-in, the account you sign in with needs:

A refused sign-in keeps your setup session: the step names the reason and offers Try again. Only when the setup session itself has ended (page "Setup session ended") run sudo ./admin.sh setup-code on the server for a new code.

Certificates

Each app certificate is valid for 365 days from setup. Network & certificate shows the expiry date of each of the three app certificates. From 30 days before an app certificate expires, the Overview shows a standing notice "Microsoft app certificate ... expires in ... days" until you renew it. Renew at least 30 days before expiry: when the sign-in certificate expires, nobody can sign in, not even to the console; when the reading or mirror certificate expires, reading or the rights mirror stops and results are withheld.

To renew, rotate the app as below. The console cannot rotate a certificate; it needs root on the server and an Entra admin for the upload.

To rotate one app (signin, reading or mirror), as root on the BJOERN server:

  1. Create the new key and print its public certificate: sudo /opt/bjoern/current/venv/bin/python -I -B -m bjoern.console.microsoft_helper --rotate reading > reading-new.cer
  2. Upload reading-new.cer to the app registration (Certificates & secrets). Keep the old certificate for now.
  3. Switch BJOERN to the new key: sudo /opt/bjoern/current/venv/bin/python -I -B -m bjoern.console.microsoft_helper --activate reading, then restart the matching service: signin - bjoern-edge, reading - bjoern-connector, mirror - bjoern-controller (sudo systemctl restart bjoern-connector).
  4. Check that reading, sign-in or the rights mirror works, then remove the old certificate from the app.

BJOERN keeps the previous key file on the server so that you can switch back.

Release sources in Microsoft 365

The tenant-wide site roles and your mailbox releases define what BJOERN reads. The generic rules are in Release sources.

Release a SharePoint site

With the tenant-wide roles granted (Step 3), there is nothing to choose: BJOERN finds every site and subsite after the admin sign-in and every 15 minutes afterwards, and reads each one with all its document libraries and folders. Sources lists each site with "All sites: read automatically".

  1. During setup, the step Release SharePoint sites ends with Start ingest of released sites, which completes the setup.
  2. Watch the Overview: the released-site count rises, and the follow-up reading block shows the remaining work (Add users explains when the first read is done).

Libraries whose drafts every reader can see are read as usual. A library with content approval, or with drafts that only editors or approvers can see, stays closed in this release, published files included: BJOERN serves a file only when it can prove who may read it, and SharePoint's draft rules are not part of the permissions it mirrors. Files with an encrypting sensitivity label stay unavailable until a supported rights check exists; they are listed and counted as "unreadable" with a reason.

Personal OneDrives

A OneDrive is a personal site: before you release one, run the site rows of Check your tenant for it and leave it unreleased whenever the absence of a listed control cannot be established.

With the tenant-wide permissions of the required-grants table, BJOERN reads the OneDrive of every enabled member of your organisation automatically; there is no per-person step and no grant script. Every 15 minutes, together with site discovery, BJOERN:

A person who has not opened OneDrive yet has no OneDrive; BJOERN counts them and checks again on the next runs. When an account is disabled or removed in Microsoft Entra, BJOERN stops reading and serving that OneDrive at the next run; once the account is enabled again, the OneDrive is read again. Each file is served only to the people Microsoft gives access to it. Sources > Personal OneDrives shows counts only: OneDrives found and read, people without a OneDrive, people still to check, and OneDrives stopped because the account was disabled or removed. Add a site refuses OneDrive addresses (<tenant>-my.sharepoint.com).

Until the tenant-wide permissions are granted (the installation still reads only the sites released under Add a site), you release the OneDrive of each person one by one; once the tenant-wide permissions are granted, BJOERN switches to the automatic reading above by itself:

  1. Open Sources and choose Personal OneDrives. The list shows the active people of your tenant, 100 per page; Find people shows only those whose name or sign-in name starts with what you type.
  2. Choose Release OneDrive on each person's row (you confirm with MFA). The row shows Waiting for grant.
  3. The section shows how many OneDrives wait and the grant script for exactly those OneDrives. Copy it into a file bjoern-onedrive-grant.ps1 and run it in PowerShell 7.4 or Azure Cloud Shell, signed in as Global Administrator (or Application Administrator plus Privileged Role Administrator): ./bjoern-onedrive-grant.ps1 (add -UseDeviceCode in Cloud Shell). The script creates a temporary app that may grant site access, gives A2 the read and A3 the fullcontrol grant on each listed OneDrive (as for a site, A3 uses it only to read permissions), and deletes the temporary app at the end, also after an error or Ctrl+C, without asking you to sign in again. It prints counts and, if it stops, a step code only, and is safe to run again. Signing in records lasting admin consent for Microsoft Graph PowerShell with Application.ReadWrite.All and AppRoleAssignment.ReadWrite.All. To remove it afterwards: Microsoft Entra admin center > Enterprise applications > Microsoft Graph Command Line Tools > Permissions, review and revoke. If the script prints that it could not delete the temporary app, delete it by hand: Microsoft Entra admin center > App registrations > All applications > BJOERN grant (temporary) > Delete, then Deleted applications > BJOERN grant (temporary) > Delete permanently.
  4. Back in the console choose Check grants. Each OneDrive whose grant works is released and reading starts. One check handles up to 20 OneDrives and takes the next waiting ones each time; choose it again for more.
  5. A person whose OneDrive does not exist yet shows Waiting for the OneDrive to be created. After the person has opened OneDrive once, choose Check grants; the grant script then includes that OneDrive. Run it and choose Check grants again.

For a person who joins later, release their OneDrive the same way. To stop reading a OneDrive choose Withdraw this OneDrive on its row; this works like removing a site and is permanent on this server. BJOERN then stops reading and serving it. The row then shows Withdrawn, cannot be released again and has no switch: a withdrawn OneDrive cannot be released a second time on this server. Withdraw leaves the Microsoft grants of A2 and A3 on that OneDrive in place. To remove them in Microsoft 365, use PowerShell 7 with the Microsoft.Graph.Sites module, signed in as a site collection admin of that OneDrive with Connect-MgGraph -Scopes Sites.FullControl.All: $id = (Get-MgSite -SiteId '<tenant>-my.sharepoint.com:/personal/<name>').Id, then Get-MgSitePermission -SiteId $id lists the grants, and Remove-MgSitePermission -SiteId $id -PermissionId <ID> removes each of the two whose application is A2 or A3. Keep the required grants for the chosen mode when cleaning up the temporary OneDrive grant app.

Mailboxes

(available after qualification) Reading and rights mirroring of Exchange Online mailboxes are built; serving mail to users starts with a kit whose release notes name mail as qualified. Release mailboxes from that kit on; the admin steps are these:

Under Sources, type or paste primary addresses in the mailbox field. Newlines, commas, semicolons and pasted Excel columns separate addresses. You can also import CSV or XLSX columns. Choose Check addresses: every address shows released on save or refused with a reason (not a user mailbox, outside the Exchange scope, or unknown). Review the results and choose Release. The same input is available in setup; Test connection checks it before Save and continue.

Import from Exchange group asks for a name or email address, lists matching mail-enabled groups, and remembers the one you pick for this installation. Members pre-fill the address field. Review and release those addresses. Every 15 minutes discovery checks the group again: N new mailboxes in the group, not released offers Check addresses, followed by an explicit Release; previous members show left the group. Members are the group's direct members with a mail address (nested groups are not expanded). Membership supplies candidates; each mailbox enters BJOERN through an explicit administrator release. Previously indexed mail stays until you remove the mailbox under Sources. A Microsoft management scope stops reads for mailboxes that leave that scope.

You can extend the list later with the same field and remove a released mailbox through its separate fresh-MFA Remove form. The chosen Exchange management scope is an optional Microsoft-side limit. To use a group-based scope, follow these steps:

  1. Connect to Exchange Online PowerShell with Connect-ExchangeOnline. Create a mail-enabled security group "BJOERN released mailboxes" and add each user mailbox you intend to release as a direct member. For a new group, run the first command once; repeat the second for each intended user mailbox:

    New-DistributionGroup -Name "BJOERN released mailboxes" -Type Security
    Add-DistributionGroupMember -Identity "BJOERN released mailboxes" -Member <primary mailbox address>
    

    Read the group's distinguished name with Get-DistributionGroup -Identity "BJOERN released mailboxes" | Select-Object DistinguishedName.

  2. Create the management scope, replacing the group distinguished name with that value: New-ManagementScope -Name "BJOERN released mailboxes" -RecipientRestrictionFilter "MemberOfGroup -eq '<group distinguished name>'"

  3. In Entra > Enterprise applications, open A2 and A3 and copy each Object ID. Use the enterprise application's object ID for -ObjectId; the application (client) ID is used for -AppId. Register both in Exchange:

    New-ServicePrincipal -AppId <A2 application id> -ObjectId <A2 enterprise application object id> -DisplayName "BJOERN reading"
    New-ServicePrincipal -AppId <A3 application id> -ObjectId <A3 enterprise application object id> -DisplayName "BJOERN rights mirror"
    
  4. Assign one application role to each app, using the same management scope:

    New-ManagementRoleAssignment -App <A2 application id> -Role "Application Mail.Read" -CustomResourceScope "BJOERN released mailboxes"
    New-ManagementRoleAssignment -App <A3 application id> -Role "Application MailboxSettings.Read" -CustomResourceScope "BJOERN released mailboxes"
    
  5. Check both apps against one group member and one mailbox outside the group:

    Test-ServicePrincipalAuthorization -Identity <A2 application id> -Resource <released primary mailbox address>
    Test-ServicePrincipalAuthorization -Identity <A3 application id> -Resource <released primary mailbox address>
    Test-ServicePrincipalAuthorization -Identity <A2 application id> -Resource <unreleased mailbox address>
    Test-ServicePrincipalAuthorization -Identity <A3 application id> -Resource <unreleased mailbox address>
    

    Expect InScope = True for the released mailbox's assigned role and False for the unreleased mailbox. Inspect Get-ManagementRoleAssignment -RoleAssignee <A2 enterprise application object id> and the same command for A3: A2 has Application Mail.Read, A3 has Application MailboxSettings.Read, both with the custom resource scope above. The authorization test checks Exchange assignments only. Review Entra's API permissions and admin-consent grants as well: broad Entra mail grants add access outside an Exchange scope.

  6. Allow up to two hours for Exchange's application cache to apply the assignments, then enter each user mailbox's primary SMTP address in the wizard step Microsoft apps, field Mailboxes (primary SMTP address, one per line), and choose Test connection. After setup, add further mailboxes through Sources > Add a mailbox and release or remove them in the source list, like sites. BJOERN reads the whole mailbox folder tree; there is no folder selection. An alias or a differing sign-in name is accepted only when it is also the primary address. BJOERN resolves exactly one matching directory account and checks GET /users/{id}/mailboxSettings/userPurpose with A3. A successful result is user.

Only when you upgrade from an earlier release candidate (a new installation skips this paragraph): remove A3's previous Exchange.ManageAsApp API permission and its admin-consent grant, and retire its old View-Only Recipients role-group membership. Keep the listed Graph/SharePoint grants. Use Exchange RBAC for mail and retain the Entra grants of the required-grants table. This keeps Entra Mail.Read and MailboxSettings.Read outside the app registrations. Microsoft describes these independent grants in Exchange RBAC for Applications.

If A3's role or group scope is missing, the console shows "Mailbox ... is refused and not saved: only a user mailbox, released by its primary address and in the mirror's MailboxSettings.Read scope, can be read." The same message covers unresolved addresses and other mailbox types; confirm the address, group membership and A3 role, then test again. Shared, room, equipment and other non-user mailboxes stay outside this release. The test establishes classification access; mail serving still waits for the qualified release and current rights evidence.

How rights are mirrored

BJOERN mirrors the Microsoft 365 rights structure in bulk with app A3 and enforces each released source's eligibility at query time (see Rights mirror). SharePoint follows the person's Microsoft 365 permissions; user mailboxes use owner-only eligibility. Specific to Microsoft 365:

Source Found by
SharePoint file people granted access by the current mirrored site, library, folder and file permissions, sharing links, SharePoint groups and Entra groups (nested), checked per item and per version; see Site-wide access policies
User mailbox (available after qualification) its owner
Shared mailbox (later version) The current connection test accepts user mailboxes only
Attachments inherit the message's eligibility

Mail eligibility is owner-only. A3 resolves the released primary address to a directory object ID, checks its mailbox type and uses directory account and licence evidence. Each mirror round checks that identity again; mail reading uses the pinned object ID. Address reassignment or conversion to another mailbox type pauses the mailbox. Delegate, SendAs and FullAccess permissions add no mail eligibility in this release.

The normal scheduled wait is 900 seconds after a run finishes. Retries and mailbox renewal can run sooner; throttling can delay the next run (see the note in Schedules). A site's rights are ready when its mirror is complete; until then, and until its fast read and vectors are complete (How a site opens), BJOERN serves nothing from that site: an empty answer then means "not yet", never "no document". The mirror is regarded as stale after 30 minutes; the affected items are hidden until it is current again. A rights change in Microsoft 365 reaches BJOERN after the next mirror cycle plus Microsoft's own propagation. Files that Microsoft protects with encryption stay unavailable until a supported rights check exists.

Information Barriers and SharePoint Restricted Access Control are not mirrored in this release. The tenant licence check compares the complete licence-plan inventory with a reviewed plan list; when a plan can enable either policy (for example Microsoft 365 Copilot plans) or is unreviewed, SharePoint serving waits until an admin confirms under Settings > Site-wide access policies (/console/settings?group=rights_policy, setting No site-wide access policies, rights_policy.settings.site_policies_absent_confirmed) that the tenant uses neither. Without a complete licence inventory serving stays closed. Device, network and authentication-context restrictions, app-enforced file-type restrictions and guest-access blocks each have a check in Check your tenant before you confirm; grant the tenant-wide roles only when every check shows the control absent for the tenant and every site, and repeat the checks before you add such a control or create a site that uses one.

The console has no per-person view of what someone can find; Rights mirror shows counts and stages per site. To see what one person can find, ask that person (or yourself, when you hold the same rights) in the connected AI: the answer lists the items BJOERN's mirrored permissions grant that person.

Offboard a person

  1. Revoke the person's AI connections first; this takes effect at once: AI clients > Clients, on each client card Revoke access next to the person.
  2. Disable the account in Entra and revoke its sessions. The rights mirror reads accountEnabled for every user from Microsoft Graph and ends the person's search and reading in the first run that receives false. The normal scheduled wait is 900 seconds after a run finishes; retries and mailbox renewal can run sooner, and throttling can delay the next run. Microsoft's own propagation comes on top. Separately, BJOERN never serves rights evidence that it observed more than 30 minutes ago.
  3. Remove the person's BJOERN.User / BJOERN.Admin assignment (or the group membership). This blocks new sign-ins to BJOERN; existing AI connections end through steps 1 and 2.

The full sequence is in Offboard a person.

Deletion timing

Item Timing
Files permanently deleted in SharePoint After the library's next change list (normally within 15 minutes; at the latest after the night run)
Mail permanently deleted (available after qualification) Within 24 hours. Mail in Deleted Items stays findable until it is permanently deleted
Mailbox, or site before the tenant-wide roles, removed in Sources Hidden at once; stored text, index entries and vectors are eligible for purge after the Purge after (days) hold (default 30 days); the nightly purge works through them within a time limit (a backlog is possible) and the index is compacted afterwards (three stages). Permanent: this server can never release the same site or mailbox again. The console asks you to confirm, naming the source, before it removes anything

The generic behaviour and held removals are described in Deletion mirror and held removals.

Connect Microsoft Copilot

Microsoft Copilot clients that accept a remote MCP server with OAuth connect like any other client: register the app as described in Connect Claude and ChatGPT with the redirect address that your Copilot product shows for the connection, exactly as displayed.

Limits

Settings

Setting Default Range Effect
Directory (tenant) ID none (set in wizard) one tenant The Entra tenant of this installation.
App A1/A2/A3 application IDs none (set in wizard) one per app, all different Which registrations BJOERN uses.
App certificates A1-A3 generated at install, valid 365 days - Authenticate the apps to Microsoft; rotate before expiry.
Admin and user group IDs none optional Optional directly assigned people need no group.
Sites all sites of the tenant one SharePoint host Each site is read completely and its rights mirrored; new sites are found within 15 minutes.
Hidden-membership groups off on / off Adds Member.Read.Hidden to A3.
Reading interval 15 minutes 60 seconds or more, or daily How often changes are fetched, for documents and mail separately. See Schedules.
Rights mirror interval 15 minutes (900 seconds after a run finishes); retries and mailbox renewal can run sooner, throttling can delay it fixed, no setting Evidence older than 30 minutes is never served. See Schedules.

Alerts of this connector

Alert or message Meaning First action
"Waiting for selected grant" on a site The tenant-wide roles are not granted yet Grant the tenant-wide roles
All sources stop at once An app certificate expired or an app was disabled Rotate the certificate; check the app in Entra
Nobody gets results although sign-in works A3 lost access or its certificate expired, so the rights mirror is stale Check A3 permissions and certificate
Mailbox alerts (available after qualification) Mailbox owner changed, mailboxes inaccessible See Mailboxes

Troubleshoot Microsoft 365

Symptom Likely cause Fix
Test connection: "Token request failed" Wrong tenant or application ID, certificate not uploaded to that app, certificate expired Compare IDs with the app's Overview; upload the matching public certificate; check the server clock
Test connection: "Microsoft could not find this tenant / this app" Tenant ID or application ID mistyped Copy both from the Entra Overview page
Test connection: "Microsoft rejected the certificate" (AADSTS700027) The wrong certificate is on the app Upload bjoern-signin.cer to A1, bjoern-reading.cer to A2, bjoern-mirror.cer to A3
Test connection: "Missing permission/admin consent" A permission is missing or not consented Add it to the app and choose Grant admin consent
Test connection: "additional application permissions" A permission such as Mail.Read or Files.Read.All was added Remove it; use only the listed ones
Test connection: "Site ... could not be read" The tenant-wide roles are not granted yet Grant the tenant-wide roles and test again
Test connection: "Mailbox ... is refused and not saved" A3 cannot confirm a user mailbox: its scoped role is missing, the address does not resolve, or the mailbox has another type Check the primary SMTP address, direct group membership and A3's Application MailboxSettings.Read assignment; allow propagation, then test again. Verify A2's Application Mail.Read separately (Mailboxes)
"Check the server clock" Server time differs from Microsoft Enable time synchronisation (timedatectl set-ntp true)
Microsoft says the app requires assignment (AADSTS50105) The person has no app role Assign BJOERN.User or BJOERN.Admin to the person in the enterprise application
Sign-in says "app role required" The token carries no BJOERN.User/BJOERN.Admin role, usually because "default access" was used or the role was not created Create both roles on A1; assign them; sign in again
Redirect URI mismatch (AADSTS50011) One of the three registered URIs differs from https://<your-host>/console/callback, /oidc/callback or /console/microsoft/callback Correct or add the URI in app A1 (platform Web)
"MFA policy required" The token has no MFA proof (amr without mfa): no Conditional Access policy requires MFA for BJOERN sign-in, or the person is outside its groups Create the MFA policy for the enterprise app BJOERN sign-in and the BJOERN groups (Security Defaults alone is not enough); check the person's group and registered MFA method
Admin sign-in loops or asks for MFA repeatedly The last MFA is older than the freshness window, or the token has no auth_time/amr claim Check the optional claims on A1; sign in again
Nobody gets results from a site Rights mirror of the site not complete yet (BJOERN serves nothing until it is), or A3 lost its roles Wait for the first mirror cycle (15 minutes); check A3's roles
Many items "unreadable" Encrypting labels or protected files Open the reason column; protected files stay unavailable until a supported rights check exists
Mail in an online archive is not found 1.0 does not read online (In-Place) archives; Microsoft does not yet offer a supported read path Expected; archive reading comes with a later version

Next: 10 Reference

SharePoint request-unit limit

Microsoft limits how many SharePoint and OneDrive request units (RU) one app may use per tenant, by licence tier. BJOERN keeps its reading within a share of that limit, per minute and per rolling 24 hours, across all reading processes on the server. Mail is not counted: mailboxes keep their own Microsoft limits. These Settings changes take effect at the next scheduling cycle.

Setting Default Range
operational.settings.microsoft_ru_tier auto (detected from licences) auto, 1–5
operational.settings.microsoft_ru_limit_percent 90 % 10–100
operational.settings.microsoft_ru_lane_shares delta 25, reading 55, background 20 each 10–80, sum 100

With auto, the rights service reads the tier from the tenant's licences once per round (no extra permission). A detected tier stays valid for 48 hours after the last successful read, then tier 1 applies. A SharePoint throttling response (429) lowers the per-minute rate by a quarter until 00:00 UTC, never below 10 %; every 429 or 503 pauses all SharePoint reading for Microsoft's Retry-After. Waiting work is retried automatically and never counts as a failure. The Processing pipeline card shows "RU last 24 h: used / limit" and the split per lane. Emergency without a release: tier 5 and 100 %.

Bulk change detection and quiet period

These Settings changes take effect at the next scheduling cycle.

Setting Default Range
operational.settings.microsoft_bulk_change_detection off on / off
operational.settings.microsoft_quiet_minutes 30 minutes 0–240; 0 disables waiting
operational.settings.microsoft_max_deferral_hours 4 hours 1–24

With bulk detection either off or on, BJOERN waits until a new or changed file has been quiet for 30 minutes. Later edits extend the wait, up to four hours from the first deferral. A save received while reading starts another waiting period. Files already older than the quiet period can be read immediately. A published version stays available until its replacement is published. The wait survives restart and change notifications continue to advance. Setting quiet minutes to zero releases existing waits at the next scheduling cycle.

Deletions, visibility loss and detected parent or scope changes are handled immediately. The separate rights scan is never delayed. Source availability, release checks and capacity limits still apply.

Keep bulk detection off (the default) until the release notes of your kit name it as qualified. Off checks item metadata before and after downloading, including the existing size and provider hash checks. On downloads with one Graph content request and no item metadata requests. A signed redirect adds a physical request; exact-host checks, download limits, Content-Length checks and streamed SHA-256 remain enforced. Retained bulk input is verified locally against its durable receipt when resuming.

Bulk mode uses the change notification's tags as observation watermarks. Streamed SHA-256 and length identify the actual downloaded bytes; old listed size or hash values do not need to match a newer body. Each publication is immutable and its version agrees with the search document and location fence. Retirement uses the live publication's version. Every downloaded file enters the parser; the existing vector cache remains available.

Changing the bulk switch changes work and download-ledger identities. After a full enumeration or token reset, this can cause a one-time reread of the inventory. Already queued work keeps its identity. Off mode still honors a persisted retry deadline when resuming retained input, including delayed retries. This prevents a restart from bypassing its cooldown.

Each distinct bulk observation gets one body attempt per existing reading phase. Exact replays do not grant another attempt. A positive reappearance after deletion or visibility loss can be read again even if Microsoft repeats old tags. A download 404/410 holds the item as acquisition unavailable. In either bulk mode, a replacement that is held or ends in failure withdraws the previously searchable version. A later positive notification permits one recovery attempt for an otherwise identical observation. Further identical replays remain held.

Processing pipeline shows the current “Waiting for quiet period” count and cumulative counts for “Read after maximum deferral”, acquisition metadata GETs, Graph operations, physical requests and nominal RU. Retries count as attempts; redirects add a physical request without another nominal Graph RU. A fresh successful acquisition uses nominal RU 3 off / 1 on. Listing and rights-scan costs are outside these acquisition counters. No document names appear in them.

No SQL migration is needed. Work payloads store receipts and waiting deadlines; legacy acquisition proofs keep their existing meaning. Original files are not retained as a content hash cache.

The qualification covers download consistency against Microsoft 365 and whether changes eventually produce distinguishable notifications, including co-authoring, restore, check-in/draft visibility and redirected large files. Identical tags and identical selected change metadata cannot reveal a change, which is why off is the default. Sharing-delta preferences and the rights scan are outside this setting.

10 Reference

In this chapter

Settings reference

The settings below are the ones you will touch. Every setting is listed in the console under Settings with an "i" icon that explains what it does, what is stored, who sees it and how to switch it off; the same text is in the kit's handbook (docs/handbook/settings.md, one page per setting). Defaults and ranges are as the product enforces them.

Note. The console has no setting for languages (BJOERN reads all languages), for content filters (there are none) or for a second scope list (the release list is the only one).

Sources (generic)

Setting Default Range Effect
Released sources none any number of sources the connector has been granted Each released source is read completely and its rights are mirrored.
Parts of a source whole source selection offered by the connector The selected parts are read.

Connector-specific settings (for Microsoft 365: tenant and app identifiers, app certificates, hidden-membership groups, sites) are in Microsoft 365 settings.

Schedules

Each schedule has a time zone, a run interval, an evidence age and a daily window. Defaults: time zone UTC until you choose yours, window 00:30 to 06:00 local time.

Schedule (setting group) Default interval Range What runs
Reading base (ingest.schedule) 15 minutes 5 to 15 minutes Starting value for the reading interval
Reading interval per source class (reading.settings) 15 minutes 60 seconds or more, or daily Documents and mail separately; what the connector uses
Rights mirror and people and groups 15 minutes fixed, no setting Shown as information; see below
Site discovery (discovery.schedule) 15 minutes 5 to 60 minutes Look for newly granted sites
Backlog and full rights (backlog.schedule, full_rights.schedule) 24 hours fixed Night work: deferred items, complete rights listing

The Microsoft 365 rights controller (bjoern-controller) refreshes rights, people and group membership in one run and waits 900 seconds between runs; this is fixed and has no console setting. The normal scheduled wait is 900 seconds after a run finishes. Retries and mailbox renewal can run sooner; throttling can delay the next run. The evidence age that stops serving is fixed at 30 minutes, counted from the start of the run that observed the evidence.

Setting Default Range Effect
Traffic limit (operational.settings.download_bytes_per_hour) none (no cap) 64 KiB per hour or more Limits download volume per hour during reading.
Cool-off (operational.settings.cooloff_seconds) 900 s 1 to 86,400 s How long admission pauses after a protection trips.
Trip limit and window (trip_limit, trip_window_seconds) 3 trips in 21,600 s 2 to 100 / up to 7 days Repeated trips pause the scope until you resume it.
Source failure rate (source_failure_count, source_failure_percent) more than 3 and more than 10 % of the last 50 document reads 1 to 49 / 1 to 99 % Provider failures on single documents trip a source only above both thresholds.
Process limits (install.resources.*) edge 8 GiB / 4 CPUs, parser 8 GiB / all cores, connector 512 MiB / 2 CPUs, controller 512 MiB / 1 CPU per process family systemd memory, task, CPU and temporary-space limits. Leave them unless you size the server differently. With the default install.resources.parser_cpu_quota_percent auto the reading process may use all cores of the server and starts one reader per core beyond two (up to 20, within its memory); search and AI clients have CPU precedence over it. Set and apply a numeric limit with sudo ./admin.sh apply --parser-cpu-quota 300 (300%, three CPUs); the reader count follows it. Return to all cores with sudo ./admin.sh apply --parser-cpu-quota auto. Accepted numbers are 10..51200 percent. An update keeps the parser limit your installation already has; use the same auto command for core-derived sizing on an existing install.
Release copies to retain (install.release.retention) 3 2 to 10 Releases kept for rollback.

Delivered text and password handling

BJOERN 1.0 delivers what the user's rights allow, including passwords or access keys that appear in documents. The server's instructions tell AI clients to name the file and location where a password is found instead of repeating it (an instruction to the AI client, not enforced by the server). Field names ending in _masked are the delivered text (historical names). Error code mask_failed means delivery could not be completed safely (audit or authority not confirmed); retry when retryable is true.

The installer writes the install identity file (mask-policy.json, historical name) once. Do not edit or empty it or change its generation or digest: doing so requires a planned re-ingest.

Users, clients and sign-in

Setting Default Range Effect
App roles BJOERN.Admin, BJOERN.User assigned in Entra per person or group Who may sign in to the console / connect an AI.
AI apps none any number Each app has a label, exact redirect URIs, a client ID and (confidential apps) a secret.
Client ID metadata documents (auth.clients.metadata_documents) On On / Off Lets AI apps announce themselves by web address.
Admin approval for new AI clients (auth.clients.approval) Required Required / Automatic for known apps / Automatic What happens when a new AI app connects by itself.
Waiting time / waiting list size 7 days / 50 1 to 30 days / 1 to 200 How long and how many AI apps wait for approval.
Admin allows access for all users (auth.consent.admin_for_all_users) Off On / Off Lets an admin allow an approved AI app for every user at once.
Sign-in valid for / ends after inactivity 30 days / 7 days 1 to 90 / 1 to 30 days How long a person's AI connection lasts.
AI access lifetime (auth.sessions.access_minutes) 60 minutes 1 to 60 How long an access pass works before the app renews it.
Admin sign-in freshness 15 minutes 5 to 60 minutes How recent the admin's MFA must be for changes.
Console session lifetime 60 minutes 5 to 480 minutes Length of a console sign-in.
Sign-in failures per address / installation per minute 10 / 100 1 to 10 / 1 to 100 Rate limits.

Network and certificates

Setting Default Range Effect
Console hostname none (set with admin.sh tls, confirmed in the wizard) DNS name Name users and AI apps connect to; part of redirect URIs.
HTTPS certificate chain and key installed with admin.sh tls PEM Certificate for the public name; one command for first import and every renewal (Rotate a certificate); the Overview warns 30, 14 and 7 days before expiry.
Setup listener (install.listener.*) loopback (install option --loopback), port 8443 loopback or one interface Where the setup pages are served during setup. After admin.sh external --interface <nic> the console and the MCP endpoint are served on that interface, port 443, and 8443 is closed.
App certificates generated at install, valid 365 days - Authenticate the apps to Microsoft; rotate before expiry (see the connector chapter).

Licence

Setting Default Range Effect
Licence key entered in the wizard (mandatory) signed key from iamBJOERN Sets tier, pages (or documents) and users. The Free key: 1,000,000 pages, 5 users, no expiry. Replace it on the licence page (Paste replacement licence key) to upgrade; effective at once.
Seat idle days (licence.settings.seat_idle_days) 30 1 to 365 A seat is released after this many days without sign-in.

Usage report and diagnostics

Setting Default Range Effect
Weekly usage report off on or off (wizard licence step: checkbox Send a weekly usage report (counts only); console licence page > Usage and diagnostics) Sends counts only once a week to https://get.iambjoern.com/api/usage; the console shows the last report word for word.
Diagnostic report never sent by itself your click, after a preview Counts, versions and recent error codes, to https://get.iambjoern.com/api/support-report.

Audit and support

Setting Default Range Effect
Access log retention (audit.settings.retention_days) 90 days 1 to 36,500 Each entry is removed by the daily maintenance run once it is older than the retention in effect when it was written. Each run removes up to 1,000,000 expired entries; a larger backlog clears over the following runs.
Security events (AI app registration, consent, revocation, admin roles, audit exports) and mail-filing audit follows the access log retention - Removed by the daily maintenance run once older than the current access log retention, up to 10,000 entries per store and run; a larger backlog clears over the following runs.
Setting audit (revision and apply result per setting group) current revision - Each save replaces the previous setting record. There is no automatic retention period; ordinary uninstall preserves data and configuration.
Support invitation (console.support.minutes) 60 minutes 1 to 1,440 Gives iamBJOERN support numeric viewer access until it expires or you replace the code.
Counts-only diagnostics available on invitation - Support sees counts and versions, nothing else.

Limits and fixed behaviour

Item Value
Identity-provider tenants per installation 1
Setup code lifetime until first use, at most 24 hours; locks after 10 failed attempts
Setup session lifetime 24 hours from first use of the code, or until promotion; kept across restart, apply and upgrade
Rights mirror too old to serve 30 minutes
Principal refresh (person loses a role or group) in the next rights controller run (the normal scheduled wait is 900 seconds after a run finishes; retries and mailbox renewal can run sooner, throttling can delay it); revoking the AI connection is immediate
Held-removal threshold more than max(50, 5 percent) of a library
Licence after a paid licence ends the Free limits apply at once; use above them starts a 14-day grace period, after which search and MCP answer HTTP 503; the Free key has no expiry
Licence checks with iamBJOERN activation every 30 days; revocation list and latest-release notice weekly
Licence keys per Microsoft tenant 1 key per tenant; a second tenant for the same key is refused
Free keys per confirmed e-mail address 1
Usage report once a week, counts only
MCP tools nine: gather_context, collect, search, read_document, list_tables, get_rows, help, file_mails (works once mail filing is on) and collect_files (needs the same filing integration, the copies-to-folders switch and browser delivery, for moving also Allow moving files: Switch it on, steps 6 and 7); both only with a kit whose signed feature list names microsoft_mail
MCP protocol version 2025-11-25 (also 2025-06-18, negotiated)
MCP request size (mcp.settings.max_request_bytes) default 16,384 bytes, 1,024 to 1,048,576; gather_context accepts at least 131,072
MCP gather_context up to the search depth per call: Focused 20, Balanced 50 (default) or Thorough 100 passages; a client size (small 20, normal 50, large 100) asks for fewer, never more
MCP collect 100 references per page, continuation with resume
MCP search page size 1 to 100 results per page (default 20), continuation for more
MCP read_document 1 to 65,536 characters per call, continuation by offset
MCP get_rows at most 500 rows per call
Sites per installation no fixed cap; all of one SharePoint host. One listing holds up to 200 discovered sites, and each addition has a 60-second connection check, so add sites in smaller batches when it is reached. After setup add sites with Sources > Add a site
Redirect URIs per AI app up to 10, exact match
Signed kit each kit has a signed expiry date; installs and updates after it are refused (release_expired)

Console roles

Role Sees Can
BJOERN.Admin the console: sources, AI apps, settings, support change settings, release sources, manage AI apps
BJOERN.User nothing in the console connect an AI and search within their own rights
Support (by invitation) numbers only nothing

Ports and endpoints

Endpoint Use
https://<your-host>/console Admin console
https://<your-host>/mcp MCP endpoint for AI apps
https://<your-host>/console/callback, /oidc/callback, /console/microsoft/callback Sign-in redirects (the third belongs to the site picker); all three are registered on app A1
https://<your-host>/authorize, /token, /revoke, /allow OAuth endpoints and the Allow access page used by AI apps
https://<your-host>/.well-known/oauth-protected-resource/mcp, /.well-known/oauth-authorization-server Discovery documents read by AI apps (also usable as an external health check)
https://<your-host>/console/mail-filing/callback Redirect of the mail filing app (chapter 13)
https://<your-host>/compute/v1/lease, /compute/v1/result Compute worker endpoint, only while compute workers are switched on (chapter 15)
Port 8443 Setup port on the loopback address during setup; closed after admin.sh external. The public port 443 is in Network and ports
Port 80 Only with HTTP redirect and ACME listener on: 301 to the HTTPS address and ACME HTTP-01 challenges (Network and ports)

The kit's inet bjoern_listener nftables table protects both the listener and maintenance output. Its maintenance_uids set resolves these static system accounts at each load:

System user Maintenance service
bjoern-vectors Vector backfill
bjoern-import Retained-result import instances; cache /var/cache/bjoern-import-static, mode 0700
bjoern-licence Daily licence seats and auth retention
bjoern-lifecycle Lifecycle purge
bjoern-lexical Nightly and when-due lexical compaction

Their maintenance_output chain allows only TCP to 127.0.0.1 and ::1 on the installation's configured PostgreSQL port and rejects every other IP packet from these users, including DNS to 127.0.0.53:53. Every service requires bjoern-firewall.service and verifies the policy at activation. The same nft mechanism runs on bare metal and in containers; the product units also retain systemd IP filters.

Server commands

Run in the extracted kit directory as root (sudo ./admin.sh ...); they use the installed program after the first install.

Command What it does
trust <public.pem> --key-id <id> --fingerprint <sha256> Provision a trusted release key
install --loopback --table-backlog-dir /var/lib/bjoern/parser/tables First installation; prints the setup URL, one-time code and TLS fingerprint
tls --hostname <name> --cert <fullchain.pem> --key <privkey.pem> Install or renew the HTTPS certificate; restarts the web service once; prints the fingerprint
external --interface <nic> [--setup-from <IPv4 CIDR>] Before the setup wizard: serve HTTPS on that interface's IPv4 address, port 443, and open it in the installer's firewall for that interface only; setup port 8443 closes (chapter 3, step 4)
upgrade [--dry-run] Apply a newer signed kit. With the kit of the installed version it repairs and applies saved Installation settings (Console settings). Refused with backup_recovery_active while a restore started with the built-in backup of release 1.0.0-rc.12 or older is unfinished; finish it with that kit first
apply [--dry-run] [--compute on|off] Apply saved Installation settings and repair from the installed release; works with any kit folder of the installation, also after the kit's download expiry (Console settings). --compute on|off saves and applies Use additional compute for the first load in one step, in the same record the console shows (chapter 15)
google --customer <id> --client-id <id> --domain <domain> --project <project ID> [--time-endpoint <url>] Set up Google sign-in, the independent time endpoint and the quota allocations of the connector's Google Cloud project for a new installation; asks for the OAuth client secret and the allocations; a failure restores the previous configuration (exit 2) (12)
mail-filing --client-id <id> --tenant-host <host> --certificate-out <file> Set up the mail filing app; writes its public certificate; a failure restores the previous configuration (exit 2) (13)
rollback [--to <version>] Back to a retained release
restored / restored --apply After a restore from your own backup, before the first start, with every BJOERN unit except bjoern-firewall.service stopped: check ({"status":"dry_run"}), then prepare the restored installation in one database transaction ({"status":"ok","invalidated":1,...}); then run apply (Restore, in order, codes)
mail-subjects / mail-subjects --apply --expected <n> / mail-subjects --disarm Count, then start (with the printed count as <n>), or end, the one-time mail-subject pass that the release notes ask for; stop bjoern-connector.service and bjoern-nachlese-connector.service first (Mail subjects after an update)
import <export folder> --seal-sha256 <sha256> Import every bundle of an export in sequence; a rerun continues after the last imported bundle (chapter 14)
status Installed version, previous version, setup state, TLS fingerprint (one JSON line)
setup-code Issue a new one-time setup code and the setup link https://<hostname>/console/setup#code=<code> (before promotion)
uninstall Remove services and code; data and configuration stay. Purging needs --purge-data --confirm-install-id <id>

Restore codes

restored --apply and upgrade print one JSON line with the code. A restored refusal changes nothing. backup_recovery_active comes from the new release while it applies itself, after the switch: no recovery protection is retired, and the update ends like any failed apply, rolled_back (the previous release is active again) or, if that rollback fails too, failed.

Code Meaning and what to do
restored_units_active A BJOERN unit other than bjoern-firewall.service runs; stop the units as in A consistent capture and run restored --apply again
restored_schema_unsupported The restored database comes from a release this kit's restored cannot prepare (it prepares databases of 1.0.0-rc.10 to rc.13); restore a newer backup, or restore with the kit of the backup's own release if it has restored
restored_tenant_mismatch The restored database belongs to another installation than the restored configuration; restore the database and the paths from the same backup
backup_recovery_active (upgrade) A restore started with the built-in backup of release 1.0.0-rc.12 or older is unfinished; finish it with that kit, then run upgrade again

Connector and import commands, run as root on the installed server:

Command What it does
bjoern-provider add dropbox|google --provider-tenant <id> --configuration <file> Register a Dropbox Business or Google Workspace instance (both preview; 11, 12)
bjoern-provider credential <key> --dropbox Enter the Dropbox app key, secret and authorisation code
bjoern-provider credential <key> --file <path> Store a credential file, for example the Google service account key
bjoern-provider status Instances with state, credential health and read/acl/discover health
/opt/bjoern/current/venv/bin/python -I -B -m bjoern.imports import legacy verify|run|status|purge <bundle> --bundle-sha256 <sha256> Check, import, inspect or clean up an import bundle (chapter 14)
systemctl start bjoern-import@<sha256>.service Run an import as its own service instance

Glossary

Term Meaning
Connector The part of BJOERN that brings one kind of source in: reads released sources and mirrors their rights
Identity provider The service that signs people in: Microsoft Entra ID, or Google for an installation set up with admin.sh google
A1, A2, A3 The three Microsoft Entra apps of the Microsoft 365 connector: sign-in, reading, rights mirror
Access log Record of which person received which item and when
Allow-list, release list The list of sources you release; the only scope setting
App role BJOERN.Admin or BJOERN.User, assigned in Entra; the signed role in the sign-in token decides access
Census The first complete listing of a source, counting every object
Compute worker A machine you link that computes meaning-index vectors during the first load (chapter 15)
Retained result Text, tables and vectors brought in with an import bundle and used once instead of reading the item again (chapter 14)
Console The web interface for administrators
Delta A source's list of what changed since the last run
Deletion mirror Removal from BJOERN of what was permanently deleted in the source
Fail closed When a right cannot be confirmed, the item is hidden
Licence key The signed key every installation needs, the Free key too; sets tier, pages (or documents) and users
Site opening A site opens for its entitled people when its fast read, rights mirror and vectors are complete
Usage report The weekly report of counts only; off until you switch it on; the last one is shown word for word in the console
Fast first read The first complete reading of all released sources at full speed (text that is directly available)
Follow-up reading (console block of the same name) Thorough background re-reading of scans, images, unclear tables and other hard items after the fast read
Held removal Hidden rows that are erased only after a check or your confirmation
MCP Model Context Protocol, the open standard through which AI apps call tools
Delivered text (*_masked) Historical API field names for the delivered text; BJOERN 1.0 does not mask passwords
OCR Recognising text in scans and images; runs on the server
Promotion The first MFA admin sign-in that closes the setup procedure
Rights mirror Mirrored structure of who may open what, used at query time
Sites.Selected Microsoft permission that gives an app access to individually granted SharePoint sites only
Vector Numeric representation of the meaning of a text passage for meaning search
Word index Full-text index of every word, for exact numbers, names and phrases

FAQ

Does BJOERN send my documents to a cloud AI? No. Reading, OCR and vectors run on your server, and on the compute workers you link if you choose to. Only the passages requested by a person's connected AI are returned to that AI.

Does BJOERN change anything in the source systems? Reading uses read access only. The rights mirror app holds full control on the sites: in our tests on a Microsoft 365 tenant, SharePoint answered every permission read for read and manage with "access denied"; fullcontrol works. BJOERN uses it only to read permissions; the grant is technically write-capable, BJOERN's code sends GET requests only. The one writing feature is mail filing: when you switch it on, a person can file mails as new .eml files, or individual attachments as new files, into a folder they can write to and create a subfolder there. Each operation is confirmed in the browser, except automatic attachment filing, which the person opts into and Undo reverses for files nobody has changed since. Existing files stay as they are.

Which sources can BJOERN read? The connectors listed in the connectors overview: SharePoint sites and personal OneDrives in Microsoft 365. Dropbox Business folders and Google Workspace shared drives and mailboxes are previews, not yet qualified for production: setup, discovery and connection checks are available, source release requires a qualified build, and content serving also requires completion of identity mapping. Microsoft 365 mailboxes come next.

Which languages are supported? BJOERN reads all languages. There is no language setting.

Can I read only part of a site? No. BJOERN reads every site as a whole: every library and folder of it. Single document libraries cannot be chosen in this release.

What if a person should no longer have access? Remove their app role (and disable the account if they left) and revoke their AI connection in AI clients. Access ends at once for the connection and within the principal refresh for the rights.

Do I need a graphics card? No. Reading, OCR and vectors run on CPU.

What does BJOERN cost to start? Nothing: the Free key includes up to 1,000,000 pages and 5 users with no expiry. Every installation needs a key, the Free one too: request it at https://get.iambjoern.com/ with a business e-mail address and you get it by e-mail. Above the Free limits a paid key sets your pages and users; upgrading is a new key, with no data migration.

What happens when a paid licence ends? The Free limits apply at once. If your use is above them, a 14-day grace period starts; after it, search and MCP pause until you enter the renewed key. The console, export and deletion mirror keep working, and data is never deleted. A Free key is issued once per confirmed business address and serves one Microsoft tenant; write to support@iambjoern.com if you need another key.

Can iamBJOERN see our data? No. Support only happens by your invitation, with numeric access only, for a limited time.

Is data sent to iamBJOERN? With your consent, BJOERN sends a weekly counts-only usage report (licence ID, version, pages, documents, users, sources, health): off until you switch it on in the wizard or on the console licence page, and the last report is shown word for word. The licence ID links a report to the company and address you gave when you requested the key. A diagnostic report is sent only when you click, after a preview. Neither contains names, contents, file names, paths or search questions. For the licence, BJOERN activates the key every 30 days (key, tenant hash, installation ID) and fetches the signed revocation list and latest-release notice weekly without any identifier (Licence checks). BJOERN keeps working when iamBJOERN is unreachable.

How do I know a backup works? By restoring it. Run the restore test of chapter 18 on an isolated test server monthly and after major updates; chapter 18 lists what your backup must cover.

Where do I report a problem or a security issue? Write to support@iambjoern.com (security issues with the subject "Security"; never include customer data).

Components and SBOM

Administrators open Support > About · Components (/console/about/components) to see every component of the installed kit with Component, Version and Licence ("Not declared" when the SBOM names none), 100 rows per page, and the count "Components recorded". The list comes from the kit's CycloneDX 1.6 SBOM, /opt/bjoern/current/sbom.cdx.json: shipped libraries with package URL, licence and hashes, and the models with their SHA-256. Download SBOM (/console/about/components/sbom) returns the exact installed file (application/vnd.cyclonedx+json).

The SBOM is part of the signed release inventory. BJOERN checks its signature and SHA-256 on every request; if the file is missing or differs, the page answers HTTP 503 with "The installed SBOM is unavailable or does not match the release inventory." The page is for administrators only and makes no network request.

11 Connector: Dropbox Business

Not yet qualified. In release 1.0, Microsoft 365 is the qualified connector; Dropbox Business ships as a preview, not yet qualified for production. Setup, discovery and connection checks are available. The console shows the connection as "not yet qualified" and offers no Release source action; release follows with a qualified build. Content serving also requires completion of identity mapping (linking Dropbox members to BJOERN people). Until then every Dropbox file stays hidden, which is the safe state (Who finds a Dropbox file). A preview remains a preview until it is qualified.

The Dropbox Business connector reads the team folders, shared folders and member folders of your Dropbox team that you release, and mirrors who may open each file. You set it up once with the server command bjoern-provider and then release sources in the console under Sources > Manage connections.

In this chapter

What it reads

Source type What is read
Team folder (dropbox_team_folder) An active team folder with all its subfolders
Shared folder (dropbox_shared_folder) A shared folder of the team with all its subfolders
Member folder (dropbox_member_folder) A team member's folder with all its subfolders

Each released folder is read completely, including deleted entries so that deletions are mirrored. A folder nested inside a released folder that is its own shared folder is read only when you release it separately. Files that Dropbox marks as not downloadable are skipped. Each download is checked against Dropbox's content_hash and size.

Prerequisites

Permissions and why

Create a Dropbox app for your team in the Dropbox App Console with scoped access and these scopes. BJOERN requests exactly this set; a different set is refused with dropbox_scope_invalid.

Scope Why
files.metadata.read List folders and files and their changes
files.content.read Download file content for reading
sharing.read Read folder and file members for the rights mirror
team_data.member Act on team content on behalf of the administrator member
team_data.content.read Read team folders and namespaces
team_info.read Prove the team ID
members.read Read team members for the rights mirror
groups.read Read groups and their members for the rights mirror

All calls are read operations. The connector refuses any other Dropbox operation (dropbox_write_refused).

Set up

Find the team ID and the administrator member ID

Dropbox shows both IDs through its API. Use the Dropbox app you created above:

  1. In the Dropbox App Console open the app, tab Settings, and choose Generate under Generated access token. The token carries the app's scopes and acts for your team.

  2. On any computer with curl, read the token without echo and ask for the team and for the administrator's member profile (use the administrator's sign-in address):

    read -rs DROPBOX_TOKEN
    curl -s -X POST https://api.dropboxapi.com/2/team/get_info -H "Authorization: Bearer $DROPBOX_TOKEN"
    curl -s -X POST https://api.dropboxapi.com/2/team/members/get_info_v2 \
      -H "Authorization: Bearer $DROPBOX_TOKEN" -H "Content-Type: application/json" \
      --data '{"members":[{".tag":"email","email":"admin@example.com"}]}'
    

    The answers look like this (shortened):

    {"name": "Example Team", "team_id": "dbtid:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ...}
    {"members_info": [{".tag": "member_info", "profile": {"team_member_id": "dbmid:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ...}}]}
    

    team_id is the team ID for --provider-tenant (step 1); team_member_id is the value for admin_subject.

  3. Delete the generated token in the App Console afterwards (Generated access token > Revoke) and close the shell.

BJOERN compares the team ID with Dropbox's answer when you enter the credential (step 2) and refuses a different one (credential_invalid). It sends the member ID as the acting administrator on the requests that read team content, so a wrong member ID shows up as a failed read.

Step 1: Register the instance

Create a JSON file with exactly two keys, then register it. instance_ref is a name you choose for this connection; admin_subject is the administrator's team member ID.

{"instance_ref": "dropbox-main", "admin_subject": "<team member ID of an administrator>"}
sudo bjoern-provider add dropbox --provider-tenant <team ID> --configuration dropbox.json

The command prints one JSON line with the instance key. A second add with the same key is refused (instance_exists).

Step 2: Enter the credential

sudo bjoern-provider credential <key> --dropbox

The command asks, without showing what you type:

  1. Dropbox client ID: - the app key of your Dropbox app.
  2. Dropbox client secret: - the app secret.
  3. It prints an authorisation address on https://www.dropbox.com/oauth2/authorize. Open it as the team administrator and allow the app. Dropbox shows an authorisation code.
  4. Authorization code: - paste that code.

BJOERN exchanges the code for a long-lived refresh token, proves that the token belongs to the team ID from step 1 and stores client ID, secret and refresh token on the server (/var/lib/bjoern/providers/credentials/, readable only by the provider service). The credential serves reading, the rights mirror and source discovery. Run the same command again to replace it.

Step 3: Check the status

sudo bjoern-provider status

Each instance shows state (configured, qualified, disabled or removed), credentials (healthy, needed, expired, invalid or unknown) and a health value for read, acl and discover. After a successful credential step the instance is qualified and all three are healthy.

Release sources

Open Sources, choose Manage connections (/console/providers) and select the Dropbox instance.

  1. Choose sources lists the team folders, shared folders and member folders that the connector found.
  2. Qualify source runs a connection test for the chosen source. It reports counts only.
  3. Release source releases it. A release needs a qualification that is at most 15 minutes old. Not in release 1.0: the button is not shown until Dropbox Business is qualified (see the notice at the top).
  4. Start reading starts the first read.

Remove source withdraws a released source and removes its copies from BJOERN. Recover source restarts a source whose listing was paused after Dropbox reset its change cursor repeatedly. Test connection and Requalify credentials check the stored credential again.

How rights are mirrored

BJOERN mirrors team members, groups with their members, and the members of each folder and file, including inherited access. The access levels owner, editor, viewer and viewer_no_comment grant reading.

When changes are picked up. Content and deletions come with the change listing, which follows the reading schedules under Reading > Schedules (documents and mail separately, 60 seconds or more, or daily; default 15 minutes). The rights of each released folder are read again by default 900 seconds (15 minutes) after its previous rights pass finished; the provider service looks for due work about once a minute.

Who finds a Dropbox file. A mirrored grant reaches a person only when the Dropbox member is linked to that person's BJOERN sign-in. In release 1.0 BJOERN links no Dropbox member to a BJOERN person: it does not match e-mail addresses for Dropbox and has no command to link a member by hand. Qualify source therefore counts every member as unmapped (identity_unmapped), and a released Dropbox file is found by nobody; it stays hidden, which is the safe state. Invitees without a Dropbox account and groups outside the team stay unmapped as well.

Limits

Item Value
Per request 30 seconds, 2 retries
Per run 20,000 attempts, 1,000 pages, 512 MiB
Rights evidence older than 30 minutes is not served
Web link in results none (results show the location in Dropbox)

Network access

Host Use
api.dropboxapi.com Listing, rights, token refresh
content.dropboxapi.com File downloads
www.dropbox.com Only the authorisation page you open in your browser in step 2

All connections use HTTPS on port 443; redirects are not followed.

Troubleshoot

bjoern-provider code Meaning Fix
credential_invalid The token does not prove the team ID given with --provider-tenant Check the team ID; authorise the app as a team administrator; run credential again
credential_material_invalid The input could not be read Run credential again and paste the values exactly
instance_exists The instance key is already registered Use credential for the existing key
fields_invalid The configuration file is not the expected JSON Use exactly instance_ref and admin_subject, each 1 to 512 characters
host_unavailable The provider service is not running sudo systemctl status bjoern-providers.service
provider_qualification_required, provider_qualification_stale Release source needs a fresh qualification Choose Qualify source again, then release within 15 minutes

Next: 12 Connector: Google Workspace

12 Connector: Google Workspace

Not yet qualified. In release 1.0, Microsoft 365 is the qualified connector; Google Workspace ships as a preview, not yet qualified for production. Setup, discovery and connection checks are available. The console shows the connection as "not yet qualified" and offers no Release source action; release follows with a qualified build. Content serving also requires completion of identity mapping (linking Google Drive sharing to BJOERN people). Until then Google content stays hidden, which is the safe state. Separately, the daily licence job for Google installations (seat release and sign-in and audit housekeeping) is being completed. A preview remains a preview until it is qualified.

The Google Workspace connector reads the shared drives and Gmail mailboxes that you release and mirrors who may open each item in Google. It authenticates with a service account that has domain-wide delegation. You set it up with the server command bjoern-provider and release sources in the console under Sources > Manage connections.

In this chapter

What it reads

Source type What is read
Shared drive (google_shared_drive) All files of the shared drive, read in the name of the directory administrator you configure
Mailbox (google_mailbox) One user's Gmail: inbox, sent, archive, custom labels, drafts, spam and trash, each mapped to its folder class
My Drive (google_my_drive) Listed in Choose sources for each directory user, so you see every My Drive; this release reads shared drives and mailboxes (Troubleshoot)

BJOERN reads files up to 512 MiB and mails up to 128 MiB. Native Google Docs, Sheets, Slides and Forms are listed and shown in the source counts. Files whose owner restricts downloading or copying keep that protection: BJOERN counts them as held by policy. Items removed or trashed in Google are removed from BJOERN as well.

Prerequisites

How to find each ID is in Find the Google IDs.

Permissions and why

Grant the service account's client ID domain-wide delegation in the Google Admin console with exactly these scopes:

Scope Why
https://www.googleapis.com/auth/drive.readonly List and download files of shared drives; read sharing
https://www.googleapis.com/auth/gmail.readonly Read released mailboxes
https://www.googleapis.com/auth/admin.directory.user.readonly Find users and prove the configured directory user
https://www.googleapis.com/auth/admin.directory.group.readonly Read groups and members for the rights mirror

All four are read-only. The connector sends GET requests only (plus the token request).

Set up

Find the Google IDs

Sign in as a super administrator. The customer ID is shown in the Google Admin console under Account > Account settings > Profile (Customer ID). Read the other IDs with the Admin SDK Directory API, for example with Try this API on Google's reference pages for customers.get, users.get and groups.get:

ID Request Field in the answer Example (synthetic)
Customer ID GET https://admin.googleapis.com/admin/directory/v1/customers/my_customer id C00000000
User ID of a person GET https://admin.googleapis.com/admin/directory/v1/users/<primary e-mail address>?fields=id,primaryEmail,customerId,suspended id 100000000000000000000
Group ID GET https://admin.googleapis.com/admin/directory/v1/groups/<group e-mail address>?fields=id,email id 00000000000000a

A users.get answer looks like this:

{"id": "100000000000000000000", "primaryEmail": "person@example.com", "customerId": "C00000000", "suspended": false}

How the IDs are used:

Step 1: Set up Google sign-in

In the Google Cloud console of your project, create an OAuth client ID of type Web application with these two authorized redirect URIs (your console hostname):

Then run, as root on the server in the kit folder, with your customer ID, the OAuth client ID, every domain whose people sign in and the ID of the Google Cloud project the connector uses (the same project you register in step 3):

sudo ./admin.sh google --customer <customer ID> --client-id <OAuth client ID> --domain example.com \
  --project <Google Cloud project ID> [--time-endpoint https://time.example.com/]

The command asks for the OAuth client secret in an echo-free terminal (an SSH or console session); it is never a command-line argument. Where the terminal cannot hide input, for example with piped input, the command stops before reading with hidden_input_unavailable; run it again in an interactive terminal. The secret is stored on the server for the web service only. The command then asks for the quota allocations of your project (see below). It writes the Google sign-in configuration and the allocations for the web service and the provider service, restarts both and prints one JSON line with "status": "ok", the instance name google-workspace and the two redirect URIs. Every later install, repair and upgrade keeps this configuration. Run the same command again with the same customer ID to change the client ID, the domains, the secret, the allocations or the time endpoint; a different customer ID needs a new installation (identity_customer_mapping_changed).

The command applies the new configuration as one step: if writing, restarting or the health check fails, or the command is interrupted, it puts the previous configuration files and service units back exactly as they were, restarts the services with them, prints "status": "rolled_back" with the code and exits with 2. The previous secret is removed only after the new configuration runs healthy, the new one only after the previous configuration runs healthy again; if neither runs healthy (health_failed_after_rollback), both secrets stay so you can repair and run the command again. If the server itself stops in the middle of the step, run the same command again.

Independent time

Google sign-in needs a trusted clock that does not depend on Google: the web service and the provider service read the Date header of an HTTPS HEAD request to the time endpoint (default https://www.cloudflare.com/). Set your own with --time-endpoint: an https:// URL on port 443 without query, user name or fragment, outside the Google, Microsoft and Dropbox domains, that answers HEAD with status 200, one Date header and no cached Age. The value is kept when you run the command again without it, and by every repair. Allow the host outbound (Network access). The web service opens its listener only after a successful time reading, so a failed reading at start makes the setup step roll back (see above); later failed readings answer sign-in with trusted_time_unavailable until a reading succeeds. The provider service retries a failed reading every 30 seconds.

Quota allocations

BJOERN paces its requests to the allocations of your project; it has no built-in values. Open the Google Cloud console of the project, IAM & Admin > Quotas (or APIs & Services > the API > Quotas), and read the per-minute values the command asks for. BJOERN counts requests in Google's current quota model:

Prompt Where to read it How BJOERN counts
Admin SDK API, per project and per user Admin SDK API: queries per minute, and per minute per user 1 query per request
Google Drive API, per project and per user Google Drive API: quota units per minute, and per minute per user (also paces Google Forms) Drive quota units: lists 100, downloads and exports 200, single reads 5
Drive downloads, bytes per minute No Google console value: the download volume per minute you allow the connector Bytes read
Gmail API, per project and per user Gmail API: quota units per minute, and per minute per user Gmail quota units: message read (also metadata) 20, message list 5, history 2, labels/profile/delegates 1; full mail download 60

If the console shows a value for another period, convert it to one minute. Every value is a whole number at least as large as the largest single request of that service (Drive 200, Gmail 60, Admin SDK 1, Drive downloads 65536 bytes); smaller values could never admit that request. Each person's requests use their own per-user allocation; all of them share the per-project allocation.

Older Drive projects. A project created before Google's current Drive quota model can still show a grandfathered allocation in queries per minute. Enter that number as it is: BJOERN charges every Drive request its current quota units against it, so it sends fewer requests than the old allocation would allow. This is deliberately conservative; it never exceeds the allocation. If the connector reads too slowly, ask Google to move the project to the current quota model and enter the new quota units value.

Code Meaning
tls_hostname_required Install the HTTPS certificate with admin.sh tls first
identity_provider_mapping_changed This installation already signs in with Microsoft
identity_configuration_invalid A domain or the client ID is not valid (lowercase domains such as example.com)
credential_material_invalid The secret is empty or contains spaces or control characters
google_project_invalid The project ID is not a Google Cloud project ID (6-30 lowercase letters, digits, hyphens)
google_quota_allocation_missing A service or a per-project/per-user allocation is absent from the stored set
google_quota_allocation_invalid An allocation is empty, not a whole number or below the minimum of its service
trusted_time_configuration_invalid The time endpoint is not an https:// URL as described in Independent time
hidden_input_unavailable The terminal cannot hide the secret; run the command in an interactive SSH or console session

Step 2: Create the service account key

In the Google Cloud console, create a service account in your project and a JSON key for it. Keep the file on the BJOERN server only for the next steps, readable by root. The key must be of type service_account with an RSA key of at least 2048 bits, and its project_id must be the project you register in step 3.

Step 3: Register the instance

Create a JSON file with exactly these keys:

{
  "instance_ref": "google-workspace",
  "directory_subject": "<user ID of the directory user>",
  "directory_address": "<primary e-mail address of the directory user>",
  "project": "<Google Cloud project ID>",
  "eligibility_group": "<group ID>",
  "drive_attested": true,
  "mail_attested": true
}

Set drive_attested and mail_attested to true for each service that is enabled for the eligibility group, and at least one of them. Then register it:

sudo bjoern-provider add google --provider-tenant <customer ID> --configuration google.json

Use the same customer ID as in step 1, and as project the project ID you gave --project in step 1. The command prints one JSON line with the instance key.

Step 4: Enter the credential

sudo bjoern-provider credential <key> --file <service-account-key.json>

BJOERN reads the key file, signs in as the directory user, and checks that the user ID, primary address and customer ID match and that the account is active. It then stores the key on the server (/var/lib/bjoern/providers/credentials/, readable only by the provider service). The credential serves reading, the rights mirror and source discovery. Delete your copy of the key file afterwards. Run the same command again with a new key to rotate it.

Step 5: Check the status

sudo bjoern-provider status

After a successful credential step the instance is qualified and read, acl and discover are healthy.

Step 6: Assign the first administrator and enter the licence key

You set up directly under your DNS name, as for Microsoft: import the certificate, point DNS to the server and run sudo ./admin.sh external --interface <nic> (optionally with --setup-from <your admin network>), see chapter 3, step 4. The SSH tunnel is only the recovery route (chapter 3).

  1. Open https://bjoern.example.com/console/login, enter the setup code and choose Open setup. You land on Google Workspace setup (/console/google/setup).
  2. Enter the person's user ID as Google subject and again as Verified Directory ID (Find the Google IDs), choose Assign initial administrator, sign in with Google, choose Enroll passkey, create the passkey and confirm it once. Checkpoint: you are back on Google Workspace setup, signed in as that administrator. Until promotion only this browser and this administrator can continue; anyone else sees setup_session_required.
  3. Choose Promote installation. This ends setup: the Overview opens and the setup code can no longer be used. No source needs to be released before.
  4. Enter the licence key. A Google installation accepts only a key that names your Workspace customer ID; a key without it, or bound to a Microsoft tenant, is refused (binding_mismatch). Ask support@iambjoern.com for the key and give your customer ID. Open Users & licence > Licence & seats (/console/licence) and paste it into Paste replacement licence key (or choose Upload licence). Checkpoint: the page shows your tier and its page and seat limits.
  5. Release the first source (Release sources).

If the web service restarts after the Google sign-in and before promotion, you are signed out and the code is used up: run sudo ./admin.sh setup-code and enter the new code. The administrator and the passkey are kept: in the same browser open https://bjoern.example.com/console/login again, choose Sign in with Google and confirm the passkey, then continue with step 3.

Step 7: Give people access

Every person signs in with an assigned BJOERN role; the eligibility group decides whose content is read, the role decides who may sign in. As an administrator signed in with Google and a passkey:

  1. Open /console/google/setup.
  2. Enter the person's Google subject and Verified Directory ID and choose Assign user role (or Assign administrator role). The page shows an enrollment code for this person, once. It is valid for 30 minutes and for one passkey enrollment of exactly this person.
  3. Hand the code to the person over a channel you trust (in person or by phone).
  4. The person opens /console/login in their own browser, signs in with Google, enters the code under Enroll a local passkey and creates the passkey. The page then asks for that passkey once to finish the sign-in.
  5. From then on the person signs in with Google and the passkey. People with the user role open their personal page; administration stays with administrators.

If the code expired or was used up, enter the Google subject and choose Issue enrollment code for a new one; a new code replaces the previous one. A wrong, expired or used code shows enrollment_handoff_invalid.

To end access, enter the Google subject and choose Revoke role. BJOERN disables the role, withdraws an open enrollment code, holds the subject and ends the person's sessions. An installation keeps at least one administrator who has a passkey: a second administrator counts once they have enrolled theirs, so finish step 4 for them before you revoke or change the last one (otherwise last_admin_required). Assigning, issuing codes and revoking need a sign-in of the last 30 minutes. Every assignment and revocation is recorded with the administrator, the person, the role before and after, and the role revision.

Release sources

Open Sources, choose Manage connections (/console/providers) and select the Google Workspace instance.

  1. Choose sources lists the shared drives and, for each directory user, the mailbox and My Drive.
  2. Qualify source runs a connection test for the chosen source; it reports counts only.
  3. Release source releases it. A release needs a qualification that is at most 15 minutes old. Not in release 1.0: the button is not shown until Google Workspace is qualified (see the notice at the top).
  4. Start reading starts the first read.

To change the eligibility group, enter the Group ID under Google eligibility group, tick Drive enabled and Gmail enabled as they apply and choose Save eligibility attestation. Saving withdraws all released sources of this instance and sets it back to configured; qualify and release them again.

How rights are mirrored

BJOERN mirrors the sharing of each file and drive and the membership of groups, read through the directory. The roles owner, organizer, fileOrganizer, writer, commenter and reader grant reading; a mailbox belongs to its owner. Items shared only by link, with the whole domain or with target audiences are counted and grant nothing in this release. While the connector is a preview, these grants are mirrored but not yet served (see the notice at the top).

When changes are picked up. Content and deletions come with the change listing, which follows the reading schedules under Reading > Schedules (documents and mail separately, 60 seconds or more, or daily; default 15 minutes). The rights of each released source are read again by default 900 seconds (15 minutes) after its previous rights pass finished; the provider service looks for due work about once a minute.

Limits

Item Value
File size 512 MiB
Mail size 128 MiB
Per request 30 seconds, 2 retries
Per run 20,000 attempts, 1,000 pages, 512 MiB
Directory lookups for unassigned people 30 per hour (directory_rate_limited above that)
Rights evidence older than 30 minutes is not served
Web links in results drive.google.com and docs.google.com

Request rates per project, service and person come from the allocations entered in step 1; a project without allocations is reported as google_quota_allocation_missing.

Network access

Host Use
oauth2.googleapis.com Service account tokens
www.googleapis.com Drive and directory
admin.googleapis.com Directory
gmail.googleapis.com Gmail
forms.googleapis.com Google Forms
Host of the time endpoint (default www.cloudflare.com) Independent time: HTTPS HEAD, web service and provider service (Independent time)

All connections use HTTPS on port 443; redirects are not followed. The full outbound list is in chapter 2.

Troubleshoot

Code Meaning Fix
credential_invalid The key does not prove the customer ID, or the directory user does not match Check customer ID, user ID, primary address, project and the delegated scopes; run credential again
provider_configuration_changed Customer ID or instance name differ from the Google sign-in configuration of step 1 Use the customer ID of step 1 and instance_ref google-workspace
provider_release_plan_unsupported My Drive release in this release Release shared drives and mailboxes
provider_eligibility_invalid Group ID missing or no service ticked Enter the group ID and tick at least one service
directory_rate_limited More than 30 lookups per hour for unassigned people Wait for the next hour
google_quota_allocation_missing No allocation for the registered project Run admin.sh google again with --project equal to the project of step 3
host_unavailable The provider service is not running sudo systemctl status bjoern-providers.service
trusted_time_unavailable The time endpoint gave no valid Date reading Allow the time endpoint host outbound or set another with admin.sh google --time-endpoint
identity_correspondence_required Subject, directory ID, customer or account state do not match the directory Check both IDs of the person and that the account is active
last_admin_required The change would leave no administrator with a passkey Assign another administrator and let them enroll their passkey first
enrollment_handoff_invalid The enrollment code is wrong, expired, used or meant for another person Issue a new code for the person (step 7)
admin_authentication_required The administrator sign-in is older than 30 minutes Sign in again

Next: 13 Mail filing

13 Connector: Atlassian (Jira + Confluence)

Preview. The Atlassian connector is ready for qualification and passes its synthetic tests. Production source release follows exact-build qualification and completed identity mapping. The installed host supplies operator setup and console wiring; live qualification remains pending.

BJOERN reads the Jira projects and Confluence spaces you release from one Atlassian Cloud site. Atlassian decides who may read an issue; Confluence space permissions and page restrictions decide who may read a page.

What it reads

Source type Reading
Jira project (jira_project) Issues, public issue comments and attachments
Confluence space (confluence_space) Current pages and blog posts, footer and inline comments, attachments

The reader polls for changes. Jira comments with role or group visibility are counted separately and omitted from issue text. Attachments use BJOERN's existing parser and OCR path in all languages.

Prerequisites

Use an Atlassian Cloud site with a pinned cloud ID and one site host under atlassian.net. Prepare a service account with access to every issue security level and every page restriction in the released sources. This gives the reader the complete view needed for reading and reconciliation.

Make the BJOERN service account a member of every issue security level and every page restriction it should read. Review its security levels and restrictions with your Atlassian administrator whenever you add one.

Permissions and why

Use a scoped API token with read-only scopes. The exact scope profile and product-access group configuration are qualification prerequisites; the compiled Preview profile is subject to that check. Store the credential through the provider credential broker as an opaque handle. Keep token material outside configuration and logs.

Permission Purpose
Browse projects and View space Read released issues, pages and blog posts
Browse users and groups Mirror account eligibility and group members
Administer Jira, with the scoped read-only token Ask the bulk permission check about other accounts

The transport uses HTTPS GET and two read-only POST operations: Jira search/jql and permissions/check. The service account's administrative permission supports reading the rights of other people.

The account census needs these granular Jira scopes on the token, as listed in Atlassian's Jira Cloud REST API v3 reference:

Endpoint Granular scopes
GET /rest/api/3/applicationrole (Get all application roles) read:application-role:jira
GET /rest/api/3/group/member (Get users from group) read:group:jira, read:user:jira, read:avatar:jira

Get all application roles also uses the service account's Administer Jira global permission listed above.

Set up

  1. Prepare the site's cloud ID, pinned host and service account.
  2. Enrol the connection using the sequence under Installed Preview configuration:
    • Create a protected configuration file with a well-formed placeholder token_secret_reference, then register it with sudo bjoern-provider add atlassian --provider-tenant CLOUD_ID --configuration FILE. KEY is the configuration's instance_ref; the placeholder reserves the reference field for setup.
    • Run sudo bjoern-provider credential KEY --atlassian. Enter the API token at the hidden prompt, or provide exactly one line on standard input. The command prints JSON containing the staged real reference (secret-ref:<64 hexadecimal characters>), called REF below.
    • Set the file's token_secret_reference to REF. Run sudo bjoern-provider status and copy configuration_digest from the row whose key is KEY as DIGEST, then apply the file with sudo bjoern-provider configure atlassian KEY --expected DIGEST --configuration FILE.
    • Complete enrollment with sudo bjoern-provider credential KEY --reference REF to prove and bind it. For rotation, repeat staging, configuration with the current digest, and proof/binding in that order. Each staged file remains available in the instance folder. An administrator may remove a staged reference that is not bound.
  3. Complete Link Atlassian accounts below.
  4. Qualify the exact build against the released sources and review the numeric connection checks.

Atlassian hides most email addresses; link accounts once with bjoern-provider link KEY --account ACCOUNT_ID --principal PRINCIPAL_REF.

Link each known Atlassian account ID to an existing enabled BJOERN sign-in principal in this installation. Use the connection's KEY and the principal's stable PRINCIPAL_REF. The root-only admin socket records the local operator's action in the provider audit. Run the commands on the BJOERN host:

sudo bjoern-provider link KEY --account ACCOUNT_ID --principal PRINCIPAL_REF
sudo bjoern-provider link KEY --file /root/account-pairs
sudo bjoern-provider link KEY --file -
sudo bjoern-provider unlink KEY --account ACCOUNT_ID

The pairs file contains one ACCOUNT_ID PRINCIPAL_REF pair per line, separated by whitespace:

account-1 principal-1
account-2 principal-2

Keep the pairs file root-only (0600) and remove it after use. --file - reads the same pairs from stdin.

The complete file is applied in one transaction. Every pair receives the same validation; a refused pair leaves all links unchanged. Replies contain linked and unchanged counts and refusal counts by code. Each account retains one principal per connection. Check each pair before linking; bjoern-provider unlink undoes a wrong link at once. Linking an account to a different person comes with the next update; until then, contact support.

Linking takes effect at the next complete mirror/rights cycle. Unlink takes effect at once: it withdraws access for the connection until its next complete rights cycle. Links persist across host restarts and become available after the accepted start read refreshes their evidence. The connection card shows one mapped/unmapped count pair for active accounts holding an allow/read grant in released sources. Deactivated or removed accounts count in neither number. A current valid, unblocked link to an enabled, complete BJOERN principal counts as mapped; other active holders count as unmapped and remain unserved. Link all intended readers and review these counts after the next cycle.

Release sources

After qualification, select the connection under Sources > Manage connections, choose projects and spaces, and obtain a fresh qualification receipt before release. Release applies to stable project and space IDs. Removing a source uses the existing provider removal path and withdraws its rights and publications together.

How rights are mirrored

For Jira, Atlassian checks BROWSE_PROJECTS for each eligible account and issue batch. Missing issues in a result receive no grant. Issues with identical allowed account sets share a scope. For Confluence, BJOERN intersects space view permission with the page's read restriction and every ancestor's read restriction. Groups are expanded in the same evidence window. ALL_LICENSED_USERS covers mapped accounts with Confluence product access; ALL_PRODUCT_ADMINS covers mapped Confluence product administrators. Guests receive access through explicit user or group permissions. Other access classes are counted as withheld.

An account reaches a signed-in person only through the existing identity map. Anonymous access and share links contribute no grants. An unreadable restriction or group withholds the items that depend on it. Healthy items keep their own mirrored rights.

Limits

Setting or measure Preview value
Rights mirror interval 15 minutes
Rights freshness window Twice the interval; 30 minutes by default
Change overlap 5 minutes
Request timeout and retries 30 seconds, at most 2 retries shared across a run
Run scheduling bounds 20,000 attempts, 1,000 pages, 512 MiB
Reader blind spot Not measurable with the measured endpoints
Scope count Reported per source

Expired rights hide content until a complete refresh succeeds. Search inconsistencies are isolated with bounded Jira ID-range bisection; the change watermark holds until the gap is resolved. Confluence trash/archive deltas withdraw content. A complete authoritative inventory supports the daily absence sweep; partial inventories prove no absence. Preview measurements still need to qualify Confluence child-list request costs and Jira batch limits.

Settings

Each connection pins one cloud ID, site host and configuration digest. Keep polling and rights-refresh schedules within the measured run capacity. The host supplies durable state and the existing mirror's trusted evidence stamps; Atlassian response timestamps provide content versions.

Alerts and troubleshooting

Readiness provides counts of checked scopes, account evidence, incomplete work and each fixed atlassian_withheld.* reason. Items the service account cannot see are not read; keep it in every security level and restriction (see Prerequisites).

Reason Action
restriction_unreadable, group_unreadable Restore the reader's access and complete the group census
principal_unknown, access_class_unknown Review account evidence or qualify the access class
permission_check_failed, security_level_unreadable Review the scoped token and Jira administrative permission
duplicate_grant Reconcile duplicate permission evidence before the next tick
comment_restricted Review the separate count of restricted comments
anonymous_only, link_only Add an explicit user or group grant in Atlassian where appropriate
search_inconsistent Allow the next bounded search retry to resolve the gap
credential_invalid, scope_invalid Requalify credentials and the site's pinned cloud ID
quota, transient, run capacity exhausted Honour Retry-After and review run capacity; evidence follows its lease

Installed Preview configuration

The installed provider host composes the credential worker, HTTPS transport, durable discovery/journals, parser custody and mirror clock. Use profile real or atlassian. The signed kit feature atlassian gates source release; a kit without that qualification keeps discovery and checks available in Preview.

Create /root/atlassian.json as a protected JSON configuration with these fields (all example values are synthetic). The reference of 64 zeroes is a well-formed placeholder for first enrollment:

{
  "instance_ref": "synthetic-atlassian",
  "site_host": "synthetic.atlassian.net",
  "cloud_id": "synthetic-cloud",
  "service_account_email": "service@synthetic.invalid",
  "token_secret_reference": "secret-ref:0000000000000000000000000000000000000000000000000000000000000000",
  "host_form": "gateway"
}

host_form selects site or gateway. Gateway calls use the pinned cloud ID under https://api.atlassian.com/ex/jira/ or /ex/confluence/; the public site metadata check still pins the site to that cloud ID, without sending the gateway credential to the site. API requests use HTTP Basic with the service-account email and API token. Redirects are refused.

Enrollment proves /rest/api/3/myself: only accountType: app with active: true is accepted; human accounts (atlassian) are refused. If emailAddress is returned, it must equal the configured service-account email. The first successful proof pins accountId with the credential reference; every later proof and token rotation must match that ID, including when the email is absent.

The staging command creates the token reference in the installation's /var/lib/bjoern/providers/credentials/<instance_ref>/ secret folder through SecretFiles. The folder is owned by the provider host user with mode 0700; the token file has mode 0600 and the 64-character hexadecimal basename following secret-ref:. Complete first enrollment in this order; the two read commands accept the reference and digest copied from the preceding JSON output:

sudo bjoern-provider add atlassian --provider-tenant synthetic-cloud --configuration /root/atlassian.json
sudo bjoern-provider credential synthetic-atlassian --atlassian
# Paste the returned reference, then press Enter.
read -r REF
# Set token_secret_reference in this file to the same reference.
sudoedit /root/atlassian.json
sudo bjoern-provider status
# Paste configuration_digest from the synthetic-atlassian row, then press Enter.
read -r DIGEST
sudo bjoern-provider configure atlassian synthetic-atlassian --expected "$DIGEST" --configuration /root/atlassian.json
sudo bjoern-provider credential synthetic-atlassian --reference "$REF"

Optional fields confluence_users_group, confluence_admins_group and confluence_guests_group default to confluence-users-<site>, confluence-admins-<site> and confluence-guests-<site>. Jira product groups come from applicationrole. All member lists must finish in the current mirror window. Active human Atlassian accounts enter the census; guests never enter either Confluence access class.

To change the pins or token reference, use bjoern-provider configure atlassian <instance_ref> --expected <current-configuration-digest> --configuration /root/atlassian.json, then register the new reference. The current digest is available through sudo bjoern-provider status as the instance row's configuration_digest. Configuration changes park old releases, withdraw mirrored rights and require fresh credential/source qualification. A cloud ID change requires a new instance. The connection card reports numeric identity mapping counts from the existing identity map.

Confluence v2 storage reads require the returned version.number and retain the acquisition version guard. Explicit zero child summaries skip the corresponding footer-comment, inline-comment or attachment list. Missing summaries trigger complete list reads. Synthetic request measurements are 4 for a one-page initial read with zero summaries and 7 without summaries, including the 3 fixed cloud-pin/page-list/blog-list requests. Attachment custody adds a download and its own version guard. The live lab must qualify summary availability and total request cost.

13 Mail filing

Only with a mail kit. Mail filing, attachment filing, copies to folders and moving files, also into To-Delete (collect_files), are for a kit whose signed feature list names microsoft_mail (Overview > Readiness shows the list). With a kit without it, skip this chapter and the mail-filing and copies-to-folders steps in Configure; do not register the filing app. file_mails and collect_files are then not usable; every other MCP tool is read-only and works as described.

With mail filing, a person asks their AI to file selected mails or individual attachments into a OneDrive or SharePoint folder that they can write to. After the person confirms the destination in the browser, BJOERN writes each mail as an original .eml file with its embedded attachments, or each chosen attachment as its own file, and can create a new subfolder there. Attachment proposals are ranked by the person's own earlier choices. Automatic attachment filing needs your switch, the person's opt-in and more than 70 percent first-proposal acceptance over at least 50 reviewed proposals; Undo moves an automatically filed file that nobody has changed since into To-Delete; nothing is deleted. You switch the feature on, choose the people and the AI clients that may use it, and register one extra Microsoft app for the write connection.

In this chapter

How it works

  1. The AI calls the MCP tool file_mails with action: prepare, the mails and a target folder.
  2. BJOERN checks each mail against the person's current rights, resolves the folder and returns a confirmation address (/console/mail-filing/confirm?plan=<id>). The plan is valid for 10 minutes.
  3. The person opens the address, checks the destination and the file names and confirms. The page shows a single-use confirmation reference.
  4. The AI calls file_mails with action: execute, that reference and an idempotency key. BJOERN uploads the files and reports the counts; action: resume continues a paused operation.

Each file is named <date and time UTC>_<subject>_<short hash>.eml. A file with the same name, size and SHA-256 that is already there counts as already_filed. A different file with the same name is kept; the new file gets a suffix _1 to _10. Linked cloud attachments stay links.

The target is a sharing address (https://) on one of your tenant hosts, or a path below the person's OneDrive root. Mail itself is read by the connector's reading app on the server; the filing app holds only the person's delegated write connection.

Register the filing app

Register one more app in Microsoft Entra > App registrations, separate from the sign-in app A1 (Microsoft 365 connector). BJOERN refuses to start the feature when both apps share a client ID (mail_filing_app_shared).

Item Value
Supported account types Your tenant only
Redirect URI (Web) https://bjoern.example.com/console/mail-filing/callback
Delegated permissions openid, profile, offline_access, Microsoft Graph Files.ReadWrite.All; profile carries the person's object ID (oid), without it the connection is refused (connect_required)
Credential The certificate that admin.sh mail-filing writes (next section)

A grant that includes any Mail.* permission or Sites.FullControl.All is refused (connect_required), so the filing app holds file write access only. Give the app no application permissions: BJOERN uses only the delegated permission, and the person's connection cannot see application permissions, so checking this is your step. In Entra > App registrations > the filing app > API permissions, every row must have the type Delegated; remove any Application row and its admin consent.

Customer administrator, in one session (next to the apps A1 to A3 of Microsoft 365), this is the fourth app:

  1. Register the app with the values above and add the delegated Microsoft Graph permissions openid, profile, offline_access and Files.ReadWrite.All.
  2. Choose Grant admin consent for your tenant (tenant-wide consent; the default), or let only chosen people consent for themselves. The connection uses Files.ReadWrite.All; you decide who may use it with the allow list and the switches below.
  3. Upload the certificate after the server command below.

What this permission does, in plain words: BJOERN can read and write files with the signed-in person's own Microsoft rights, and only when that person asks for it and confirms it. Moving files stays off until you tick Allow moving files. Nothing is deleted: a file the person wants deleted goes into a To-Delete folder. You can revoke the consent at any time (Enterprise applications > the filing app > Permissions). Mail stays read-only.

Configure the server

Mail filing needs a finished Microsoft setup (wizard step 3). Then run one command as root on the server, in the kit folder, with the filing app's client ID and your SharePoint hosts:

sudo ./admin.sh mail-filing --client-id <filing app client ID> \
  --tenant-host contoso.sharepoint.com --tenant-host contoso-my.sharepoint.com \
  --certificate-out /root/bjoern-mail-filing.cer
Option Value
--client-id Application (client) ID of the filing app; it must differ from the sign-in app (mail_filing_app_shared)
--tenant-host (repeat) Your SharePoint and OneDrive hosts, for example contoso.sharepoint.com and contoso-my.sharepoint.com; up to 16. BJOERN uses them as filing targets, for upload sessions and to read an existing file back for comparison
--library-drive (optional, repeat) Up to 9 document library drive IDs offered as targets besides OneDrive
--certificate-out File for the public certificate of the filing app

The command:

  1. creates the filing app's key and certificate on the server once (/etc/bjoern/credentials/microsoft/edge/, readable by root only) and writes only the public certificate to --certificate-out;
  2. creates the private sealing keys for stored write connections once (/etc/bjoern/credentials/mail-filing-keys.json);
  3. writes the mail_filing block of /etc/bjoern/app.json for the web service;
  4. lets the web service load both credentials, restarts bjoern-edge and checks the services.

It prints one JSON line with "status": "ok", the certificate file and the redirect URI. Upload the certificate file to the filing app (Certificates & secrets > Certificates). Run the same command again to change hosts or library drives; the key and the sealing keys stay as they are. An optional traffic cap download_bytes_per_hour (65,536 or more) that you add to the block is kept.

Install, upgrade and admin.sh apply keep the reader socket and scratch settings in step, including an existing web-service configuration snapshot. The connector uses /var/lib/bjoern/connector/mail-filing; the web service uses its own /var/lib/bjoern/edge/mail-filing/scratch, owned by bjoern-edge with mode 0700. An upgrade creates and repairs this directory as part of the saved setup. The web service removes interrupted filing-* scratch files at startup before accepting filing requests and logs the count as mail_filing_scratch_removed. Other files stay in place. The mail reader runs inside the connector service (bjoern-connector.service); there is no separate unit.

The certificate is valid for 365 days. Renew it like the other app certificates (Microsoft 365, Certificates) with the app name filing, then restart bjoern-edge.

Switch it on

Open AI clients > Mail filing (https://bjoern.example.com/console/mail-filing) as an administrator (changes need a fresh MFA sign-in). Until the server command above has run, the page names that command.

  1. Tick Allow mail filing.
  2. To let people file individual attachments, tick Allow attachment filing; tick Allow automatic attachment filing for users who opt in as well if automatic filing may be used. Optionally enter the Project or case folder name rule and the Central parent folders that need such a subfolder.
  3. Under Users allowed to file mail, enter the people who may file, one per line, each as their Microsoft Entra object ID (Entra admin center > Users > the person > Overview > Object ID).
  4. Adjust the limits if you want (see Limits) and choose Save.
  5. For each AI client that may file: enter its Client reference and Current client revision, tick Allow this client to request mail filing and choose Save client capability. The client asks its people for fresh consent, which now includes File original mails after confirmation (scope mail.file).
  6. To let people copy files to folders (collect_files), tick the copies-to-folders switch and, further down the same page, Enable browser delivery with Save browser delivery. Without browser delivery copies to folders stay off (the default). The page shows the disclosure text and whether it is on or off. The change needs a fresh MFA sign-in, is recorded in the audit trail. To switch it off, clear the box and save again.
  7. To let people move files, tick Allow moving files (default off) and save; for each AI client that may move files, also tick Allow this client to request moving files (scope files.move; copies to folders never implies it). Browser delivery is needed only for a move into another drive, which copies the file first. See Move files and To-Delete.

Turning the feature off, or removing a person from the list, deletes that person's stored write connection at once. The write connection is shared by mail filing, copies and moving: it is deleted when every one of these switches is off for the person. Switching off only Allow moving files stops every move at once and keeps the connection for the others.

What each person does

  1. Open https://bjoern.example.com/console/mail-filing/connect and choose Connect Microsoft account. The page then shows Ready to file.
  2. Reconnect the AI app and allow File original mails after confirmation.
  3. Ask the AI to file mails; open the confirmation address it returns, confirm, and give the confirmation reference back to the AI within 10 minutes.
  4. To file attachments, open https://bjoern.example.com/console/mail-filing/inbox or ask the AI (it uses the attachment actions of file_mails), review the proposals and confirm. https://bjoern.example.com/console/mail-filing/history shows the person's results, the automatic-filing opt-in and Undo for automatically filed files.

Disconnect on the same page ends the person's write connection.

A confirmed mail operation can resume within its resume hours limit, including after the initial 10-minute confirmation window. Each remaining mail is checked against the plan again: its source folder and changeKey must match before upload. Changed or missing mails receive an item outcome (reconfirm_required or mail_unavailable) and contribute to the failed count; unchanged mails continue. Prepare and confirm a fresh plan for changed mails.

Move files and To-Delete

A person asks their AI to copy files into a folder, to move files into a folder, or to "delete" files. BJOERN never deletes anything: delete moves the files into a folder To-Delete at the root of each file's own drive (SharePoint library or OneDrive), created on first use, with the original folder path below it, so /A/B/report.pdf goes to /To-Delete/A/B/report.pdf. A taken name gets a suffix _1 to _10.

  1. The AI calls collect_files with action: preview, the search terms and mode: move with the target drive and folder, or mode: to_delete. Only released SharePoint and OneDrive files that the person can see in BJOERN at that moment take part, at most the mails limit per job; other matches are listed as not moved.
  2. The AI shows the person the confirmation address (/console/mail-filing/collect?job=<id>, valid 20 minutes). Only the signed-in person who asked can open it. It lists each file with its real name and where it goes and says "Moves the files. Nothing is deleted." Nothing moves before the person chooses Confirm and move; the AI cannot confirm or start a move.
  3. BJOERN then moves exactly the listed files with the person's own write connection, so Microsoft checks the person's rights on every file. Within the same drive a file is moved in place. A move into another drive copies the file (with every check of a copy, browser delivery included), compares size and content hash of the copy and then moves the original into its own drive's To-Delete. If the connection or the server drops during a move, BJOERN first looks where the file is; a file renamed or changed in the meantime is reported as changed and Undo leaves it alone.
  4. The AI reports the counts with action: status; resume continues waiting files after checking their planned versions again. Copies also check the planned source folder and eTag, so a rename or move is detected even when content stays the same. Changed files receive version_changed, missing files source_unavailable, with per-file reasons and counts. A copy job prepared before these location checks receives reconfirm_required for remaining files; prepare a fresh preview. An accepted copy or move is reconciled from its recorded intent on resume.
  5. Undo on the same page (once, within 24 hours) moves each file back to where it was, if nobody changed, renamed or moved it since. After a move into another drive the original comes back and the copy goes into the To-Delete of its drive. Undo needs the same permission as the move: your switch, the AI client's move permission and the person's consent; without them it is refused and recorded.

A moved file takes the permissions of its new folder. Search shows the new location after the next sync; files in To-Delete (also below a folder renamed or moved into it) are withdrawn from search and answers like deleted files with the next sync (a large folder in steps of a few hundred files) and come back when moved out, and a file moved into another drive leaves the released source. To-Delete belongs to you: BJOERN never empties it; set its retention or empty it with your usual tools. Every move, refusal, start and undo is recorded in the audit trail with counts and references only, never with file names or content.

Limits

Setting (console label) Default and maximum Meaning
mails 100 Mails per operation; also files per move job
operation bytes 1 GiB Bytes per operation
mail bytes 256 MiB Bytes per mail
resume hours 24 How long a paused operation can be resumed

Fixed: one unfinished operation per person, at most 4 open plans per person, files up to 4,000,000 bytes in one request and larger files in 5 MiB parts. Finished operations are kept as count-only receipts for up to 30 days from the creation of the operation, at most 4,096 receipts in total; beyond that the oldest receipts are removed first. The filing audit (counts only) follows the access log retention.

Status and error codes

An operation is pending, running, paused, complete, partial or failed and reports the counts selected, created, already_filed, failed and pending.

Code Meaning
filing_unavailable The feature is off, not configured, or the person or client is not allowed
connect_required The person has not connected the Microsoft account, or the grant is not accepted
confirmation_required, reconfirm_required The person confirms (again) in the browser
mail_unavailable The mail is not available under the person's current rights
target_write_denied The person cannot write to the target folder
item_too_large The mail is larger than mail bytes; it is not filed
size_limit_reached, time_limit_reached A limit of one call was reached; the operation pauses and can be resumed
throttled Microsoft asked to slow down; retry after retry_after seconds
conflict, outcome_unknown The target changed during upload; BJOERN checks it on resume
source_unavailable Undo cannot open the folder of the filed file (moved, deleted or no access); Undo works again once the person can open it

Next: 14 Import kit

14 Import kit (earlier results)

Moving the reading results of an earlier BJOERN system or trial into this installation is a service of iamBJOERN support; support runs the steps of this chapter with you. A new installation needs no import. The results arrive as an import bundle. BJOERN keeps the imported text, tables and vectors as retained results. When the live connector reaches the same item at the same version, it uses the retained result instead of downloading and reading the item again, so nothing is read twice. Items that changed since the export are read live as usual.

In this chapter

When to import

Import the bundle before BJOERN first reads the sources. A retained result saves work only for an item that the live connector has not read yet. The order is:

  1. Install (chapter 3, steps 1 to 3). The installer writes this server's import binding at once, so you can bind, verify and run the import right after the install.
  2. Import the export and wait until its last bundle has finished (Import an export with several bundles).
  3. In the setup wizard, the admin sign-in (step 6) promotes the installation; from then on BJOERN finds all sites within 15 minutes and reads them (chapter 3, step 6). The import must be finished before you save that step.

If you import later, items that were already read live keep their live result: the retained result for them is not used and expires by itself (Clean up). Items the connector has not reached yet still use their retained result.

What a bundle contains

A bundle is a folder with these files and nothing else:

File Required Content Size limit
manifest.json yes Format bjoern-legacy-import/v1, producer kit, snapshot time, installation and tenant reference, file list with size and SHA-256 of every file, counts and pins 32 MiB
items.sqlite yes One row per item with its identity (source, container, item, version), the retained text with its SHA-256, text units, and units still waiting for OCR 8 GiB
vectors.sqlite no Meaning-index vectors for the text units (1024 dimensions) 64 GiB
tables/<set_ref>.sqlite no One retained table set per spreadsheet item 64 MiB each

The bundle's identity is the SHA-256 of its canonical manifest.json. You receive this value separately from the bundle, from whoever produced it, and give it to every command.

Bind the bundle to this server

A bundle is made for exactly one installation. It must name this server's installation_ref and tenant_ref, the values in /etc/bjoern/import.json. The installer writes that file during the install and never changes it. Both values are random references of this installation, not your Microsoft tenant ID, so they exist before the setup wizard. Read them on the server:

sudo /opt/bjoern/current/venv/bin/python -I -c 'import json; d = json.load(open("/etc/bjoern/import.json")); print(d["installation_ref"], d["tenant_ref"])'

Send both values to whoever produces the bundle for you, before the bundle is made. A bundle with other values is refused with binding.

Import an export with several bundles

An export usually consists of many bundles: the producer starts a new bundle whenever the next item's table sets would exceed the 64 MiB limit per file. One command imports all of them, one after the other, with the same verification and the same import service as the single-bundle steps.

The export folder holds one subfolder per bundle (bundle-01, bundle-02, ...) and the producer's sealed receipt receipt/producer.json. The receipt is the seal list: it lists every bundle in export order with its folder and bundle SHA-256, and its top-level candidate_sha256 seals the whole list. You receive that top-level value separately from the export, from whoever produced it, just as the bundle SHA-256 for a single bundle.

  1. Copy the whole export folder to /var/lib/bjoern/import/<export name>/ on the server, as root. Keep it on the same file system as /var/lib/bjoern/import/bundles/: the command then links each bundle there under its SHA-256, so the bundle bytes stay unchanged and take no second copy. On another file system it copies the bundle instead.

  2. Import the export:

    sudo ./admin.sh import /var/lib/bjoern/import/<export name> --seal-sha256 <top-level candidate_sha256>
    

    The command first checks the receipt against the given SHA-256 and against the folder: every listed bundle must be present and sealed (it holds its manifest.json), and no other bundle-* folder may exist. Then, strictly in the listed order, it handles one bundle at a time: it checks the free space, places the bundle in /var/lib/bjoern/import/bundles/<sha256>/ with the access rights of the single-bundle steps, verifies it, runs bjoern-import@<sha256>.service and waits for its result, and reads the stored status. A bundle counts as imported only when the database proves it complete: every item of its manifest, its table sets and the decision on all of its vectors are stored. The free-space check adds up, per file system, the copy into /var/lib/bjoern/import/bundles/ (only when the export lies on another file system; otherwise the files are hard links) and the private copy that verification (/var/tmp) and then the service (/var/cache) make one after the other: about two bundle sizes when everything shares one file system.

    Each bundle prints one line with counts only, then a total line follows:

    {"bundle": 1, "chunks": 412305, "items": 61022, "result": "ok", "seconds": 1874, "sha256": "3f2a9c41d0be", "vectors": 412305}
    {"bundle": 2, "chunks": 0, "items": 214, "result": "ok", "seconds": 41, "sha256": "88c1e07b5a2d", "vectors": 0}
    {"bundles": 2, "chunks": 412305, "imported": 2, "items": 61236, "seconds": 1915, "skipped": 0, "status": "ok", "vectors": 412305}
    
  3. When a check or a bundle does not succeed, the command stops at once. Its last line names the error code, the bundle (when one was reached) and the command to continue:

    {"bundle": 2, "error": "space", "result": "failed", "seconds": 0, "sha256": "88c1e07b5a2d"}
    {"bundle": 2, "chunks": 412305, "error": "space", "imported": 1, "items": 61022, "resume": "sudo ./admin.sh import ...", "seconds": 1874, "skipped": 0, "status": "failed", "vectors": 412305}
    

    Remove the cause and run the same command again. A bundle counts as skipped only when the database proves it complete; a bundle the database lacks or holds only in part (after a crash, a database reset or the restore of a backup taken during an import) is imported again, which keeps what is already stored. The import continues with the bundle that stopped. Besides the bundle codes, the command uses these codes:

    Code Meaning
    seal_sha256 The receipt's bundle list or top-level candidate_sha256 does not match --seal-sha256
    seal_manifest receipt/producer.json is missing, not a verified kh277-producer/v2 receipt, or its bundles are not bundle-01, bundle-02, ... in order
    seal_mismatch A listed bundle is missing in the folder, or the folder holds a bundle-* folder not listed
    unsealed A listed bundle has no manifest.json: the export was not sealed
    space A file system has less free space than the bundle needs on it (see above)
    place The bundle could not be linked or copied into /var/lib/bjoern/import/bundles/
    unit_failed The import service did not finish successfully; see sudo journalctl -u bjoern-import@<sha256>.service
    incomplete The service finished, but the database does not hold the whole bundle; for example its vectors are not decided because the installed model is missing

The database also needs room for the imported text and vectors; the free-space check does not cover it. The command waits for each bundle and can run for hours: start it in a session that survives a lost connection (for example tmux). If the connection drops anyway, the running bundle finishes in its service; run the same command again.

Run an import

These steps import one bundle by hand. They are the reference for what the command above does per bundle.

Disk space. Verification and the import each copy the whole bundle and delete the copy at the end; there is no free-space check. Keep free: the bundle folder itself, one more bundle size for the copy (on the verify scratch folder and, during the run, under /var/cache), and room in the database for the imported text and vectors. A bundle can reach about 72 GiB (items.sqlite 8 GiB, vectors.sqlite 64 GiB, plus table sets); plan for it in chapter 2.

  1. Copy the bundle folder to /var/lib/bjoern/import/bundles/<bundle SHA-256>/ on the server and give the import service read access through the group bjoern. The import unit runs under a temporary system user that is a member of bjoern, so the bundle belongs to root, its folders are group-traversable and its files group-readable; other users get no access:

    sudo chown -R root:bjoern /var/lib/bjoern/import/bundles/<sha256>
    sudo find /var/lib/bjoern/import/bundles/<sha256> -type d -exec chmod 0750 {} +
    sudo find /var/lib/bjoern/import/bundles/<sha256> -type f -exec chmod 0640 {} +
    
  2. Verify it. Verification leaves PostgreSQL unchanged. It copies the bundle into a private temporary folder, hashes every file while copying and reads the SQLite files of that copy; the copy is deleted at the end. Give it a root-only scratch folder on a file system with at least the bundle's size free (the default temporary folder is often too small):

    sudo install -d -m 0700 /var/tmp/bjoern-import-verify
    sudo env CACHE_DIRECTORY=/var/tmp/bjoern-import-verify \
      /opt/bjoern/current/venv/bin/python -I -B -m bjoern.imports import legacy verify \
      /var/lib/bjoern/import/bundles/<sha256> --bundle-sha256 <sha256>
    

    The result lists the declared and reproduced counts and how many items are valid, quarantined and how many table sets are rejected (table_sets_rejected).

  3. Run the import as its own service instance:

    sudo systemctl start --no-block bjoern-import@<sha256>.service
    

    The import is finished when sudo systemctl show -p ActiveState,Result bjoern-import@<sha256>.service reports ActiveState=inactive and Result=success and the journal shows the result line below. Import several bundles one at a time.

    The unit bjoern-import@.service copies the bundle into a private working copy in its own cache folder on disk, hashes every file while copying and imports only from that copy. It runs without network access (localhost only) for up to 6 hours. It writes its result, one JSON line with the new, identical and quarantined items, to the journal:

    sudo journalctl -u bjoern-import@<sha256>.service
    

    The status command shows the stored counts at any time.

Running the same bundle again is safe: items that are already present with the same content count as identical and are not written again. An update with admin.sh upgrade stops running imports and does not restart them: after the update, start the import again with the same systemctl start --no-block command.

Vectors. Imported vectors are accepted all or nothing. BJOERN re-computes a random sample on this server with its own model: 0.5 percent of the vectors, at least 1,000, and all of them when the bundle has fewer than 1,000 (min(n, max(1000, ceil(0.005 × n))) for n vectors) and accepts the set only when every sample matches. Vectors of protected items are skipped.

Tables. A retained table set is accepted when its pins match the table_pins value in /etc/bjoern/import.json and the bundle's table header. A fresh installation writes table_pins with the pins of the reviewed table export, so only that producer's table sets are accepted; any other set is counted as rejected (table_sets_rejected) and its item is imported as text.

How retained results are used

The live connector lists your released sources as always. For each item it looks for a retained result with the same identity and version (for SharePoint the ctag, for mail the change key) and the same text processing. On a match it publishes the retained text (and the retained table set, if one was accepted) without downloading the item. A retained result is used once; afterwards the item follows normal reading. Units that were still waiting for OCR in the bundle are read again in full by the follow-up reading.

A retained table set is validated again when it is published. If it does not pass, the item is published as text only and the counter retained_table_rejected goes up.

Check the status

sudo /opt/bjoern/current/venv/bin/python -I -B -m bjoern.imports import legacy status \
  /var/lib/bjoern/import/bundles/<sha256> --bundle-sha256 <sha256>

The result shows how many items were accepted, retained, used (hits), are still unclaimed or wait for the source's census, and how many vectors are staged.

Clean up

Retained results that are not used expire by themselves. Two settings under Settings control this:

Setting Default Range Effect
operational.settings.retained_max_days 90 1 to 3,650 A retained result expires this many days after the import
operational.settings.unclaimed_after_census_days 30 1 to 3,650 A result that the source's completed census did not claim expires after this many days

Each reading cycle removes a bounded number of expired results. To remove all expired results at once:

sudo /opt/bjoern/current/venv/bin/python -I -B -m bjoern.imports import legacy purge \
  /var/lib/bjoern/import/bundles/<sha256> --bundle-sha256 <sha256>

Removing a source also removes its retained results. You can delete the bundle folder after the import: status and purge then address the stored results by the bundle SHA-256 you give with --bundle-sha256 (keep the same path argument). While the folder exists, they first check its manifest.json against that value.

Error codes

A refused bundle prints {"error": "<code>"}:

Code Meaning
bundle_sha256 The manifest does not match --bundle-sha256
path A file that a bundle does not contain, a link or an executable file
limit A file or row limit is exceeded
manifest, schema, counts, inventory The manifest or a database file does not have the expected form
binding The bundle names another installation or tenant
pins The text processing pins do not match this release
file_hash A file differs from its SHA-256 in the manifest
legacy_import_refused Any other refusal

Single items that do not pass are quarantined with a reason, for example text_hash, version, tenant or key_conflict (the same item with different content was imported before); the rest of the bundle is imported.

Next: 15 Compute workers

15 Compute workers

The first load of a large installation spends most of its time computing meaning-index vectors. Compute workers let additional machines take part in that work: your own machines or compute you rent from any provider. A machine with an NVIDIA graphics card (GPU) is the standard and computes much faster; a machine without one computes the same vectors, more slowly. You decide whether to use workers and where they run. The feature is off by default; without it, this server computes every vector itself.

In this chapter

What a worker receives

A worker asks this server for work over HTTPS and sends vectors back. It needs no inbound port.

The worker receives The worker returns
Text passages of your documents, opaque lease numbers, the model pin One vector of 1,024 numbers per passage

Passages sent to a worker are unmasked document text. BJOERN 1.0 masks nothing, so a passage can contain names, mail addresses, personal data and secrets such as passwords that appear in your documents. A worker receives no credentials of BJOERN, no rights or access lists, no file names or paths and no item references.

Protected items never reach a worker (files that were encrypted or password-protected at the source, also when BJOERN could unlock them). All other released content can, Microsoft 365 mail included (from 1.0.0-rc.11; up to rc.10 mail stayed on this server). A mail passage goes to a worker only while its mailbox is served to its owner: released, admitted under the running release, the message bound to its proven mailbox and the mailbox admission not expired. These are the checks every search answer passes. When one of them ends while a worker computes, BJOERN discards the result and computes the passage on this server. For mail a worker receives the same three things as for documents and no mailbox, folder or message reference. A mail passage is message body text only: BJOERN does not add the sender, recipients or subject, but header lines quoted inside the body (a forwarded or replied message) are part of the text and leave with it.

Content a worker may not receive stays in the queue on this server and never blocks the worker's other work.

The worker program writes no files and logs counts only, but the machine and whoever operates it can keep what it receives. Run workers only on machines you trust with that content. Linked workers belong to what leaves the server. On rented compute the provider processes this data for you: put a data-processing agreement with the provider in place before you link the worker.

Every worker runs the model files and program of the same signed kit that is installed on this server, on a graphics card or on the processor; both give the same vectors. Before it takes any work, the worker tests its own machine (The machine self-test). The server accepts results only for the model of this release, and any failure or timeout returns the work to this server's own queue.

Switch it on

  1. Open Settings > Installation, find Use additional compute for the first load (install.compute.mode) and set it to on. The setting is there on every installation, also right after the update from an earlier release. The values you choose are on and off; after it was on, off is stored as maintenance and shown as off (Switch it off).
  2. Apply it like every install setting: on the server, in a kit folder of your installation, run sudo ./admin.sh apply (Console settings). The setting shows Pending until then and Applied afterwards. The worker endpoint on this server's HTTPS address (/compute/v1/lease, /compute/v1/result) is available from then on.

Without the console, sudo ./admin.sh apply --compute on does both steps at once; the console then shows the setting as on and Applied.

Prepare the worker machine

The worker runs as a container. Everything it needs comes with the kit: the program, its Python environment, the model and the container recipe. One command builds and starts it.

Item Recommended: GPU machine Alternative: CPU machine
Hardware Any NVIDIA graphics card, amd64 (Intel or AMD) Any amd64 (Intel or AMD) machine; more cores compute faster
Software Linux with Docker or Podman, NVIDIA driver 580 or newer and the NVIDIA Container Toolkit Linux with Docker or Podman
Result The same vectors, much faster The same vectors, slower
Disk 20 GB free 15 GB free
Network Outbound HTTPS to this server's DNS name on port 443; no inbound port Same

The GPU container uses the first graphics card of the machine. Rented or your own, a machine is paid for or busy only while it runs. Firewall. If your firewall limits port 443 of this server to your users' networks, also allow the worker machine's outbound address.

Open Reading > Compute workers (https://bjoern.example.com/console/compute). The page shows every line to copy, with a copy button each:

  1. Prepare a worker machine. Download the four files of the version installed on this server from https://get.iambjoern.com/ into ~/bjoern-worker on the worker machine. Then run the lines the page shows: they check the signing key, the signature and the kit exactly as in chapter 3, step 2 and unpack the kit into ~/bjoern-worker/kit. Expected: the key fingerprint of chapter 3, header-ok, Signature Verified Successfully and bjoern-install-<version>.tar: OK. Stop on any other result.

  2. Add a worker. Choose Add a worker. The page shows the start command once, for example:

    printf '%s\n' 'bjoern-worker-1.…' | sh kit/runtime/deploy/worker/worker.sh
    

    The string after printf is the worker's enrolment: it contains the worker's secret, this server's address and the fingerprint of this server's HTTPS key.

  3. Start the worker. Run the command in ~/bjoern-worker as a user who may run docker or podman. It takes a few minutes the first time and does everything in order:

    • finds Docker or Podman, and an NVIDIA graphics card; with a card it builds the GPU worker image, without one the CPU worker image (--cpu at the end of the command builds the CPU image on a GPU machine too);
    • runs the machine self-test;
    • saves the enrolment in a container volume that only the worker can read;
    • starts the worker container bjoern-worker, which comes back after a reboot.

    It ends with worker: started. Within 2 minutes Workers connected on the console page shows the machine.

The worker connects only to the enrolled address (port 443 unless the address names another), checks the server's key fingerprint before it sends its secret and follows no redirects. The worker logs counts only: docker logs bjoern-worker (or podman logs bjoern-worker). With rootless Podman, enable the restart after a reboot once: systemctl --user enable podman-restart.service and loginctl enable-linger; with sudo podman: sudo systemctl enable podman-restart.service.

HTTPS key and renewals. The enrolment pins the SHA-256 of the public key of this server's HTTPS certificate, not the certificate itself. A renewal with the same key keeps every worker running. A renewal with a new key stops every worker with pin_mismatch until you choose Link worker again for each and run the new command. With certbot, renew with --reuse-key while workers are linked.

The machine self-test

Every worker tests its machine before it takes its first piece of work: when the command above starts it, and again at every start of the container. The kit carries a few short synthetic reference texts together with their vectors, which the release build computed on the processor. The worker computes the same texts on its own graphics card or processor and compares: each vector must match its reference to a cosine similarity of at least 0.999. This takes seconds, writes no files and needs nothing per type of machine.

Result What the worker does
Passed One log line kit_self_test passed, then it takes work
Not passed It takes no work at all and prints one line with the likely cause, ending in This machine is not usable - stop it. The command above then ends with exit status 3 and starts no worker
Line starts with Likely cause What to do
self_test_unrelated The vectors are unrelated to the release model: a different kit version or a changed worker image Download and verify the kit of the server's version again and run the start command again
self_test_nonfinite The vectors are empty or not numbers: the graphics driver or the graphics card Update the NVIDIA driver to 580 or newer, or use another machine
self_test_precision The vectors are slightly off: a precision setting of the machine Use another machine, or the CPU container (--cpu)

When a running worker's container starts again and its self-test does not pass, it stays idle and takes no work; the server computes the vectors itself. Stop the machine (docker stop bjoern-worker) and use another one.

See where vectors are computed

The Compute workers page shows for each worker its Last delivery and its Chunks per minute over the last 15 minutes.

You always see where vectors are computed. While Use additional compute for the first load is on, this server is computing vectors and no worker has delivered any for 15 minutes, every console page shows this notice:

The external compute machine is not delivering - vectors are now computed on this server. Check or stop the rented machine.

The first load continues on this server in the meantime. Check the worker machine: is it running, and what does docker logs bjoern-worker show (an error code or a self-test line)? Once a worker delivers again, or you switch the setting off, the notice goes away. A notice right after you switch the setting on is normal until the first worker delivers.

Manage workers

Button Effect
Link worker again Shows a new start command with a new enrolment; the old one stops working at its next request. Use it after a change of the HTTPS key, and run the new command on the worker machine: it replaces the running worker.
Resume worker Resumes a worker that was paused after 3 timeouts in a row
Remove worker Revokes the worker; its next request is refused

The state of each worker is Active, Paused after 3 timeouts or Removed. Vectors that a removed worker delivered stay in the meaning index.

Goal On the worker machine
Pause, for example to stop paying for a rented machine docker stop bjoern-worker; open work returns to the server after its timeout
Resume docker start bjoern-worker
Use a newer kit Download and verify the server's new version as in Link a worker, step 1, then Link worker again and run the new command

With Podman, write podman instead of docker.

Remove a worker machine

Remove worker ends the worker's access on this server. Then clear the machine itself:

  1. Remove the worker and its data: docker rm -f bjoern-worker, docker volume rm bjoern-worker-secret, docker rmi bjoern-worker and delete ~/bjoern-worker. The enrolment's secret no longer works, but it is still a secret; the volume holds it.
  2. Rented compute: destroy the instance and its disks, volumes and snapshots with the provider, so that no copy of the passages it received remains. Your own machine: wipe it according to your rules for data of the documents' classification.

When the first load is complete, the server needs no more workers: remove them and switch the setting off.

Switch it off

Set Use additional compute for the first load to off and apply it with sudo ./admin.sh apply, or run sudo ./admin.sh apply --compute off. The setting then shows off. Internally the compute service changes to maintenance mode: no more passages leave the server, while the local queue finishes. This server completes the remaining first load itself.

Before an admin.sh rollback, switch compute off and let the compute service finish every open lease.

Error codes

Where Code Meaning
Worker enrolment_invalid, enrolment_unreadable, enrolment_mode_invalid The saved enrolment is damaged or unreadable; choose Link worker again and run the new command
Worker pin_mismatch The server's HTTPS key differs from the enrolled fingerprint; choose Link worker again
Worker model_pin_invalid The model files do not match the release; download and verify the server's version again
Worker self_test_references_invalid The worker image lacks its self-test references; build it again from a verified kit
Worker redirect_refused Something between worker and server answered with a redirect
Worker lease_refused_<status> The server refused the request, for example lease_refused_401 for a removed worker
GPU worker gpu_runtime_missing The image has no GPU software; run the start command again on the GPU machine
GPU worker device_unavailable No usable graphics card: check the NVIDIA driver (580 or newer) and the NVIDIA Container Toolkit
GPU worker gpu_settings_invalid The graphics card did not accept the worker's settings; use another machine or the CPU container
GPU worker engine_oom, engine_failed, engine_result_nonfinite Graphics memory ran out or the card returned an error or invalid result; the server completes the work itself
Worker exit status 70 A work batch did not finish within 40 seconds; the server completes it itself
Start command exit status 3 The machine self-test did not pass; the line above it names the cause
Console worker_invalid The worker or action is no longer valid; reload the page

Docker or Podman starts a stopped worker again after a short, growing pause, which bridges short network or server interruptions. While you repair a lasting error, stop the worker (docker stop bjoern-worker) and start it again afterwards.

Back to the handbook overview.

16 Licence and usage report

Your licence key, the checks BJOERN makes with iamBJOERN, and the optional numbers-only usage report.

In this chapter

Licence

Every BJOERN installation needs a licence key, the Free key too. The key is a signed text that you paste into the setup wizard (Install, step 5.3). A Google Workspace installation needs a key that names its customer ID and enters it on the console licence page (Google Workspace, step 6). BJOERN checks its signature on your server; the key works at once and keeps working offline. In addition, BJOERN activates the key with iamBJOERN (Licence checks with iamBJOERN).

Get a key.

  1. Open https://get.iambjoern.com/ and enter your name, your company and a business e-mail address. Free-mail providers (for example gmail or outlook.com addresses) and disposable addresses are refused, and the address's domain must be able to receive mail; if your request is refused, use your company address. A short automatic check (a bot check) protects the form. iamBJOERN stores the name, address and company to issue and support your key; product news is sent only if you tick a separate box.
  2. Confirm the address with the link in the mail you receive. The Free key arrives by e-mail; it is never shown on the page.
  3. Paste it in the wizard. The step is mandatory: without a key the setup cannot finish.

There is one Free key per confirmed e-mail address. Asking again with the same address sends you the same key again (upper and lower case and +tags in the address make no difference). A second key for the same address, for example for a test and a production server, is issued on request after iamBJOERN's approval, like a paid key.

Licence feature Free key Paid keys
Limits 1,000,000 pages (a page counts when text was recognised on it) and 5 users (people who connect an AI) A tier by documents or pages, and by users, as agreed with iamBJOERN
Expiry None Valid to the end of the licensed period; then the Free limits apply (see below)
How you get it Download page, by e-mail Request it at support@iambjoern.com; the key is issued after iamBJOERN's approval
Tenant Bound to your Microsoft tenant when the installation activates it; one tenant per key. A Google Workspace installation needs a key issued for its customer ID (from support@iambjoern.com) The same

Upgrade. Move to a larger tier with a new key: open the licence page in the console (/console/licence), paste the new key into Paste replacement licence key (or choose Upload licence). It takes effect immediately; nothing is migrated, reinstalled or re-read.

The licence page shows your tier, the limits, the pages used against the limit and the seats used against the limit. When a limit is reached the console shows a clear notice and points to the next tier:

Situation What happens
Page or document limit reached Search continues; reading of new content pauses (licence_processing_paused) until a larger key is entered
Seat limit reached Existing people keep working; a further person's sign-in is refused with licence_user_cap
Paid key ends, or is revoked The Free limits apply at once
Use above the Free limits without a paid key A 14-day grace period starts; the console shows its deadline in a banner. After the deadline search and MCP answer with HTTP 503, and reading, follow-up reading and vectors pause, until a valid key is entered or use is back within the Free limits; pending work then catches up by itself

Data and index are always kept. The console, the access-log export, the deletion mirror and updates stay available in every state. With a valid paid key, or after one day back within the Free limits, the grace period ends. The key works after a restore without contacting iamBJOERN.

Licence checks with iamBJOERN

The web service contacts get.iambjoern.com for three small checks. They run in the background and never block the product: if a check cannot reach the service, everything stays as it is and BJOERN tries again later.

Check Request What is sent When
Activation POST /api/activate The licence key, a hash of your Microsoft tenant ID (Google Workspace: of your customer ID), a random installation ID and a one-time number When the key changes, then every 30 days; retry after 1 hour
Revocation list GET /api/revoked Nothing: no cookies, no identifiers Weekly; retries after 1 hour and 24 hours
Latest release GET /api/latest Nothing: no cookies, no identifiers Weekly, same schedule

The activation answer is signed. A refused activation (other_tenant, revoked) and a key on the signed revocation list make the Free limits apply. The revocation list and the release notice are signed too; BJOERN keeps the last verified copy and never accepts an older one. The kit includes a revocation list, so a server without internet access starts with that one. When a newer kit is published, the console shows New version available with links to "What's new" and the download.

A seat is taken when a person's AI app first signs in. A seat is released after the person has not signed in for 30 days (setting "Seat idle days", 1 to 365). You can also release seats by hand on the licence page.

Usage report and diagnostics

BJOERN works offline. Besides the licence checks, three report types can reach iamBJOERN; this section says exactly what each one contains.

Weekly usage report (counts only)

With your consent, BJOERN sends one small HTTPS request per week to https://get.iambjoern.com/api/usage. It is off until you switch it on, which you do only in the console, not in setup: you can switch it on or off at any time on the console licence page under Usage and diagnostics (/console/licence/reporting) with the switch Send a weekly usage report (counts only). Saving needs a fresh MFA sign-in. The page also shows the two receiver addresses, which you can change.

Sent Not sent
Your licence ID Names of people, sites, libraries or files
The BJOERN version Document content or text
Counts: pages, documents, users, sources Paths and links
Health: ok, degraded or error Search questions
The time of the report Addresses of your users

The licence ID is the link to the company, name and e-mail address that you gave when you requested the key; the report itself carries none of them. The console shows the last report word for word, with its time and the delivery result. If the report cannot be delivered (no internet, the receiver is down) nothing else changes: BJOERN tries again after 1 hour and after 24 hours (at most 3 attempts per week), never builds up a queue, and every function keeps working. iamBJOERN's receiver does not store IP addresses.

Automatic error reports (on by default)

This independent setting starts on. Usage and diagnostics provides the Automatic content-free error reports switch and View sent error reports. Switching Off stops recording for transmission and sending. Usage reporting remains opt-in and off by default.

At most one bundled error report per hour is sent to https://get.iambjoern.com/api/error-report when counters are non-zero, with at most three attempts for a frozen bundle. It contains only schema 1, the product version, UTC time truncated to the hour and up to 50 fixed component/code/count entries. Unknown local codes become the component's fixed other code. The last 50 sent attempts remain visible as the exact JSON bytes sent, with time and result (delivered, http_xxx or delivery_failed). Both builder and receiver enforce the closed contract. The receiver has its own bounded table and keeps no IP addresses.

Diagnostic report (only when you click)

If support asks for more detail, or you want to attach it to a ticket, open the console and choose Send diagnostic report to iamBJOERN support on the Usage and diagnostics page. It goes to https://get.iambjoern.com/api/support-report.

  1. BJOERN builds the report: counts, numeric versions, UTC hour and the most recent fixed error codes. This report is separate from licence metering and carries no licence ID.
  2. The console shows you the complete report as a preview.
  3. Nothing leaves the server until you confirm. If you close the page, nothing was sent.

A diagnostic report never contains document content, file names, names of people or sites, paths or search questions. BJOERN never sends one by itself.

Note. This is separate from the support invitation, where you give support numeric viewer access for a limited time.

17 Run BJOERN in a container

This chapter installs BJOERN in one Ubuntu 24.04 system container with rootful podman. The container is a regular production form, equal to a dedicated Ubuntu Server 24.04 LTS server (usually a virtual machine, chapters 2 and 3): the container is set up exactly like such a server. systemd runs inside it, and you install, update and back up BJOERN there with the same signed kit and the same commands as on a server. The host provides the container engine, the encrypted volume and the network.

Choose the form that suits your IT: a dedicated server when you run virtual machines, a container when you run container hosts.

In this chapter

How it works

Part Where it lives
Ubuntu 24.04, systemd, the operating-system packages of chapter 3, step 1.2 The image you build from Containerfile
The BJOERN kit, PostgreSQL 19, BJOERN's service accounts, configuration, data, database and journal The container's own root filesystem, inside the engine's storage on the encrypted volume. Nothing is bound in from the host.

The container files come with the signed kit, in its folder deploy/container/: Containerfile (the image), run.sh (creates the container with podman) and qualify-sandbox.sh (the sandbox probe the image carries). The image holds no BJOERN code. You copy the signed kit into the running container and install it there, so the kit is verified exactly as in chapter 3, and updates stay admin.sh upgrade (chapter 5).

The container is long-lived, like a server: it is created once and then only started and stopped. A new container is a restore from backup (Replace the container).

The host unit bjoern-container.service starts and stops the container. You start it after unlocking and mounting the volume (After every reboot), so the host boots without waiting for the passphrase. The unit starts only with the encrypted volume mounted, gives systemd inside up to 10 minutes to shut PostgreSQL and BJOERN down, and is stopped before the volume is unmounted. It also repeats the checks of run.sh before every start (volume mounted, podman storage on it, memory limits).

Plan

Host requirements

Item Requirement
Operating system Any amd64 Linux with systemd and cgroup v2 (check: stat -fc %T /sys/fs/cgroup prints cgroup2fs), for example Ubuntu 24.04 or a RHEL 9 family host. Hosts with SELinux (RHEL family) run it in enforcing mode.
Container engine Rootful podman 4 or later from the distribution, with its storage (/var/lib/containers) used by BJOERN alone. On a host that already runs Docker, podman runs beside it and Docker's storage (/var/lib/docker) stays as it is. A host whose podman storage already holds other containers or images does not fit the container form in 1.0; check with sudo podman ps -a and sudo podman images -a (both list nothing) and sudo podman info --format '{{.Store.GraphRoot}}' (/var/lib/containers/storage).
CPU, RAM and disk As in chapter 2, for BJOERN: at least 2 CPUs and 32 GiB RAM, 64 GiB recommended; the disk on the encrypted volume. On a host with other services, add their needs on top and give BJOERN its share with a memory limit (Memory). BJOERN sizes reading to the CPUs it sees; to give the container fewer CPUs, assign them as a cpuset (--cpuset-cpus, for example --cpuset-cpus 0-7).
Encryption at rest The engine's whole storage on an encrypted volume (for example LUKS) with entries in /etc/crypttab and /etc/fstab, both with the option noauto, mounted at /var/lib/containers. Keep swap encrypted as well.
Time NTP on the host. The container uses the host clock.

The volume is unlocked by hand after each reboot (After every reboot). Until it is mounted, bjoern-container.service stays stopped, so everything BJOERN writes lands on the encrypted volume. Run podman commands only after the volume is mounted.

Memory

BJOERN sizes PostgreSQL and its workers from the memory it has: the host RAM, or the container's memory limit when that is lower. The installer and every service read the same value, and the console's readiness page shows it ("Memory for sizing", with its source).

Any other memory limit above the container (for example on machine.slice) stays at or above the container's memory: BJOERN cannot see such a limit from inside, and the kernel would stop processes when BJOERN uses the memory it sized itself for. run.sh and every start of the unit check this.

Network

BJOERN serves port 443 from inside the container; the engine forwards a host port to it (and port 80 if you publish it). By default this is port 443 on every host address. When port 443 of the host is taken (a reverse proxy or another service on a shared host), choose another host address and port with BJOERN_PUBLISH, for example BJOERN_PUBLISH=127.0.0.1:9443 or BJOERN_PUBLISH=[2001:db8::10]:9443. Point your proxy at that address with TCP pass-through of the encrypted connection, as in chapter 2, Company proxy or load balancer; TLS ends at BJOERN.

Inside the container BJOERN listens on all of the container's addresses, because the engine gives the container a new address on its bridge network at every start. BJOERN's firewall rules accept its port only on the selected ingress interface, eth0. The supported topology is a rootful Podman container on a bridge network, in its own network namespace (host networking, --network host, is outside it). A restart of the container or the host therefore needs no BJOERN command: start the container as in After every reboot and BJOERN serves again. A fixed container address (podman's --ip option) is optional, only for your own rules on the host; BJOERN does not need it.

BJOERN's firewall table lives in the container's own network namespace; its interface there is eth0. With firewalld's default settings the engine's port forwarding bypasses the host's firewalld zones. To restrict who reaches the published port before setup, use an nftables rule on the host that runs before the engine's forwarding (a prerouting hook with a priority below -100). Behind a proxy BJOERN sees the proxy's or the bridge's address, not the client's, so admin.sh external --setup-from does not limit setup access there: limit it at the proxy or with this host rule.

Administration happens on the host over SSH (port 22) and then inside the container with podman exec; the container itself runs no SSH server.

Security settings

The container gets exactly what systemd and BJOERN's service sandboxes need. These settings, the encrypted volume for the engine's storage and the flags as shipped in deploy/container are the technical and organisational measures (TOM) of the container product form.

Setting Why
Unprivileged (Privileged=false) with the capabilities SYS_ADMIN and NET_ADMIN added systemd builds the service sandboxes (private mounts and networks), and BJOERN manages its own firewall table
Private cgroup namespace, systemd mode, no limit on the number of processes systemd runs as PID 1 and manages its own services
No volumes, bind mounts or devices The container's mounts stay separate from the host's; the sandbox probe checks it
label=disable on SELinux hosts only The container's SELinux label blocks the mounts systemd needs for the service sandboxes; the host keeps SELinux enforcing for its own services and other containers
apparmor=unconfined on AppArmor hosts only (Ubuntu) Under podman's default AppArmor profile systemd (PID 1) stops right after the start, without an AppArmor denial in the log (measured: Ubuntu 24.04, podman 4.9.3, same image with and without the profile). Without the profile the container is confined by seccomp, its reduced capability set and the absence of volumes, bind mounts and devices, and no longer by AppArmor mandatory access control. Because the container holds SYS_ADMIN, treat root inside the container as host root (below) and restrict who has it. The host keeps AppArmor for its own services and other containers

Root inside the container counts as root on the host. BJOERN's application services run without root and inside the sandboxes that step 4 proves; its updater runs as root like any maintenance service. Give container root access to the people who have host root access. On AppArmor hosts the container has no AppArmor profile, so limit podman exec and container root to the people who hold host root. The host, its SELinux policy, firewall, backups and disk encryption, and who holds host root are run by your team; iamBJOERN support helps with each of them.

Install

1. Prepare the host

  1. Install podman: sudo dnf install podman (RHEL family) or sudo apt-get install podman (Ubuntu). On SELinux hosts allow systemd in containers: sudo setsebool -P container_manage_cgroup on.

  2. Check that podman's storage is empty (Host requirements). Create the encrypted volume, add it to /etc/crypttab and /etc/fstab with the mount point /var/lib/containers, unlock and mount it; on SELinux hosts label it once: sudo restorecon -R /var/lib/containers. Keep podman's default storage settings (graphroot /var/lib/containers/storage, transient_store off); run.sh checks them.

  3. On the host, download, trust and verify the kit as in chapter 3, step 2, into ~/bjoern-download. Extract it and copy its container files to a folder of their own:

    cd ~/bjoern-download
    mkdir -m 700 kit
    tar --extract --file bjoern-install-<version>.tar --directory kit --no-same-owner
    cp -r kit/runtime/deploy/container ~/bjoern-container
    

2. Build the image

cd ~/bjoern-container
sudo podman build -t localhost/bjoern-host:24.04 -f Containerfile .

The build downloads Ubuntu 24.04 and its packages once.

3. Create and start the container

sudo bash run.sh

Add settings in front of bash as you need them; they apply when run.sh creates the container:

Setting Effect
BJOERN_PUBLISH=127.0.0.1:9443 Publish BJOERN's port 443 on this host address and port instead of port 443 on every address (Network). IPv6: [address]:port.
BJOERN_MEMORY_GIB=48 Memory limit for a host with other services, whole GiB from 32 up to the host RAM (Memory).
BJOERN_HTTP=1 Also publish port 80 (HTTP redirect and ACME).

Example for a shared host: sudo BJOERN_PUBLISH=127.0.0.1:9443 BJOERN_MEMORY_GIB=48 bash run.sh.

The script checks SELinux (where present), cgroup v2, the mounted volume, that podman stores the container on it, the settings above, and that no memory limit on machine.slice is below the container's memory. It creates the container once, installs itself as /usr/local/sbin/bjoern-container-run (the unit runs its checks before every start), and starts bjoern-container.service. Running it again keeps the existing container and its settings. On a host where SELinux is present but not enforcing it stops with selinux_enforcing_required. On SELinux hosts it creates the container with --security-opt label=disable, on AppArmor hosts (/sys/module/apparmor/parameters/enabled is Y) with --security-opt apparmor=unconfined (Security settings). BJOERN_APPARMOR_UNCONFINED=0 or =1 overrides the AppArmor detection; with 0 on an AppArmor host systemd does not boot. Whenever it adds apparmor=unconfined, run.sh says so in one line.

Check the security options the container was created with (part of the TOM in Security settings):

sudo podman container inspect --format '{{.HostConfig.SecurityOpt}}' bjoern

Expected: [label=disable] on SELinux hosts, [apparmor=unconfined] on AppArmor hosts, [] elsewhere.

Check that systemd runs inside:

sudo podman exec bjoern systemctl is-system-running

Expected: running (or degraded with only units unrelated to BJOERN failed; systemctl --failed lists them).

4. Prove the service sandboxes

BJOERN's services use private networks and devices, read-only system mounts, hidden processes, kernel protection, hostname and clock restrictions, system call filters and delivered credentials. Maintenance services also use the kit's nftables PostgreSQL-only output policy, in containers as on a server. The probe confirms that systemd applies all of it in this container:

sudo podman exec bjoern bjoern-qualify-sandbox

Expected before installation: every hard gate PASS, probes failed: 0, exit 2, and PENDING ip-address-deny plus PENDING load-credential. These two checks use the installed kit (step 5). The INFO device-policy line is diagnostic and has no effect on the exit code; product units use PrivateDevices.

The independent hard gates prove ProtectKernelTunables makes /proc/sys read-only, ProtectControlGroups makes /sys/fs/cgroup read-only, ProtectProc=invisible hides another user's process, ProtectKernelLogs makes /dev/kmsg inaccessible, ProtectKernelModules makes the module directory inaccessible, ProtectHostname refuses sethostname with EPERM, and ProtectClock refuses clock_settime with EPERM. The mount checks require a private mount namespace and the protected mount itself; the process check includes an unrestricted control. Hostname and clock controls use invalid arguments, keeping both calls harmless. Both require an additional systemd seccomp filter, and hostname protection also requires a new UTS namespace, so inherited runtime restrictions alone cannot pass. propagation-precondition checks that the container's root mount is shared, as the image sets it up; the probe then leaves an empty tmpfs with a new name on every run mounted inside the container and prints the host check for it, for example:

sudo grep -c bjoern-propagation-probe-Ab12Cd34 /proc/self/mountinfo

Run the printed command on the host. Expected: 0. Install the kit once every probe passes and the host check prints 0; otherwise send the output (it holds no content) to iamBJOERN support.

A container created by an earlier run.sh on an AppArmor host keeps the default profile and its systemd does not boot (podman ps -a shows it exited). While the kit is not yet installed, recreate it: sudo systemctl stop bjoern-container && sudo podman rm bjoern, then sudo bash run.sh.

5. Copy the kit in and install

Copy the verified download folder of step 1 into the container:

sudo podman cp ~/bjoern-download bjoern:/root/bjoern-download
sudo podman exec -it bjoern bash

You are now root inside the container, and the kit is extracted in /root/bjoern-download/kit. Continue with chapter 3, step 3 on, from cd kit (the extraction is done): run admin.sh trust and admin.sh install in that folder, import the certificate with admin.sh tls and run the wizard. The sudo in the handbook commands works inside the container as well.

Right after admin.sh install, before the wizard, run the probe again inside the container: bjoern-qualify-sandbox. Expected: every hard gate PASS, exit 0 (including ip-address-deny and load-credential, which also shows the owner, mode and ACL of the credential file the service user bjoern-edge receives), probes failed: 0, and the new host check prints 0. Go on with the wizard once this holds; otherwise send the output to iamBJOERN support.

The ip-address-deny gate verifies the loaded nft table, then runs under each of bjoern-vectors, bjoern-import, bjoern-licence, bjoern-lifecycle and bjoern-lexical, with no transient IPAddressDeny setting. For every identity, UDP to the DNS stub 127.0.0.53:53 and to the container's own global IPv4 address must return EPERM, and TCP to 127.0.0.1 on the installation's configured PostgreSQL port must connect. The unrestricted control must send successfully. The product units retain their systemd IP filters as an additional layer.

Two steps of chapter 3 look slightly different in the container:

Operate

Task How
Open a shell sudo podman exec -it bjoern bash
Status Inside: sudo ./admin.sh status in the kit folder; the console's readiness page shows the memory BJOERN sizes from
Logs Inside: journalctl -u 'bjoern-*' --since today
Stop and start sudo systemctl stop bjoern-container and sudo systemctl start bjoern-container (always through the unit, so its checks run)
After a reboot See After every reboot.
Update BJOERN Copy the new kit into the container and run admin.sh upgrade there, as in chapter 5.
Operating-system updates Inside: sudo apt-get update && sudo apt-get upgrade, as on a server. Then run the sandbox probe again. Keep the host and its engine updated as well.
Back up Your backup covers chapter 18. Either snapshot the encrypted volume /var/lib/containers while the container is stopped (sudo systemctl stop bjoern-container), or take the PostgreSQL dump and the paths of chapter 18 inside the container and copy them to your backup volume with podman cp.
Restore As a replacement: Replace the container.

After every reboot

The host boots with the volume locked and BJOERN stopped. Over SSH, unlock and mount the volume, then start the container:

sudo cryptsetup open <device> <name>    # the device and name of your /etc/crypttab entry; asks for the passphrase
sudo mount /var/lib/containers
sudo systemctl start bjoern-container

Replace the container

A container is replaced when it is lost or damaged, by a restore, like a lost server (chapter 18, Restore, in order):

  1. Stop and remove the old container; keep your backup.
  2. Restore the snapshot of the encrypted volume /var/lib/containers, or restore the PostgreSQL dump and the paths of chapter 18 into the container. Start the container only with its published port closed to everyone (for example with a host nftables rule as in Network), so that nothing is served yet.
  3. Inside the container, stop every BJOERN unit except bjoern-firewall.service (chapter 18, A consistent capture), then run sudo ./admin.sh restored --apply and sudo ./admin.sh apply in the kit folder. Run bjoern-qualify-sandbox again: it must exit 0 with PASS load-credential, no PENDING or FAIL line, and the host check must print 0; otherwise stop and send the output to iamBJOERN support. Then open the published port again.

Remove the container

Follow chapter 3, Uninstall: purge or copy the data inside the container first, then remove what run.sh created on the host (item 5 there): the unit, /usr/local/sbin/bjoern-container-run, the container and the image.

Good to know

18 What your backup must cover

BJOERN keeps your index, the stored texts, the sign-in state and its configuration on this server. Your own backup system protects them: a VM snapshot of all volumes, or a file backup plus a PostgreSQL dump. This chapter lists what your backup includes, how to take a consistent copy and how to restore it.

In this chapter

Paths your backup includes

Path What it holds
/etc/bjoern The configuration; credentials/ (app certificates and database logins), tls/ (the HTTPS certificate and key) and install/ with install-settings.json and the install identity file mask-policy.json
/var/lib/bjoern The data of the BJOERN services, the setup state, mail filing, the Dropbox and Google connections and the installer state (install/)
/opt/bjoern The installed releases and installed.json. The signed kit of the same version installs them again as well, so keep that kit
/var/lib/postgresql, /etc/postgresql The PostgreSQL 19 cluster and its configuration. A file copy of the cluster is valid only inside an atomic volume or VM snapshot; otherwise your backup includes the dump
Your table folder Only if you chose a --table-backlog-dir outside /var/lib/bjoern at install (the default is /var/lib/bjoern/parser/tables)

Optional: /var/lib/bjoern/install/snapshots holds the installer's temporary database dumps from before an update; they are deleted after one day.

Your backup can leave out the BJOERN unit files /etc/systemd/system/bjoern* and the import cache /var/cache/bjoern-import-static: sudo ./admin.sh apply writes the unit files again, and the cache is computed again.

The PostgreSQL dump

BJOERN's database is bjoern in the PostgreSQL 19 cluster main (postgresql@19-main.service, port 5432, data under /var/lib/postgresql). Dump it with the PostgreSQL 19 tools, as the installer does before an update, together with the database logins. /mnt/backup stands for your backup volume:

sudo sh -c 'umask 077; sudo -u postgres /usr/lib/postgresql/19/bin/pg_dump --port=5432 --format=custom --dbname=bjoern > /mnt/backup/bjoern.dump'
sudo sh -c 'umask 077; sudo -u postgres /usr/lib/postgresql/19/bin/pg_dumpall --port=5432 --globals-only > /mnt/backup/bjoern-globals.sql'

Both commands end without output. Take them during a consistent capture.

A consistent capture

BJOERN's services write to the database and to the folders at the same time, so your backup captures both at one moment. Choose one of two ways:

Search and AI access pause while BJOERN is stopped. Choose a time outside 02:00–05:00 server local time, the window of the automatic security updates (Updates and rollback).

Keys and custody

Your backup contains document text, credentials and sign-in state, so it is as sensitive as the server itself. Keep it encrypted, access-restricted and in another failure domain than the server, with at least one copy off this host.

Keep the signed kit of the installed version and its trust anchor (release-public.pem, key ID and fingerprint) offline beside the backup: a restore runs admin.sh from a kit folder of that version (for a backup of 1.0.0-rc.12 or older, also keep a kit of 1.0.0-rc.13 or later, for example 1.0.0-rc.16: Restore, in order, case B).

Retention

Set your own retention and align it with your deletion duties. A backup keeps data that BJOERN purges later (Deletion mirror), until the backup itself expires.

Restore, in order

Restore onto the original server or onto a replacement that answers to the same DNS name: the HTTPS certificate, the Microsoft app registrations and the AI connections all name it. The original server stays off for good, so that only one installation reads your sources and serves under your apps. Which steps you follow depends on the backup:

  1. Restore with BJOERN stopped. Restore the VM or volume snapshot, or restore the paths of this chapter and load the dump into the PostgreSQL 19 cluster, where no bjoern database exists yet:

    sudo sh -c 'sudo -u postgres psql --port=5432 < /mnt/backup/bjoern-globals.sql'
    sudo sh -c 'sudo -u postgres /usr/lib/postgresql/19/bin/pg_restore --port=5432 --create --dbname=postgres < /mnt/backup/bjoern.dump'
    

    psql reports the logins that exist already; that is expected. A restored snapshot starts BJOERN by itself at boot: boot it with its network disconnected (use the server console), then stop the units as in A consistent capture.

  2. Prepare the restored installation, before the first start. In the kit folder:

    sudo ./admin.sh restored
    sudo ./admin.sh restored --apply
    

    The first command only checks and prints {"status":"dry_run"}. Good for the second: {"status":"ok","invalidated":1,...} with counts. In one database transaction it marks the rights state unknown, so that rights are read again before anything is served; revokes every AI client, consent, grant, token and sign-in session and sets Admin approval for new AI clients to Required; binds the installation's identity again from /etc/bjoern/install/mask-policy.json; removes every compute worker and returns its open work to this server; and sends the mailboxes back to reconciliation. A refusal changes nothing: Restore codes.

  3. Start. sudo ./admin.sh apply in the kit folder. Good: "status": "ok"; then sudo ./admin.sh status shows "writers_paused": false. Connect the network again.

  4. Reconnect. Approve or register your AI clients again under AI clients (Connect Claude and ChatGPT); people choose Connect and sign in again. Add each compute worker again with Add a worker on the Compute workers page and run its new start command (chapter 15); the old start commands stop working. Sites answer again as soon as their rights are read again.

Restore test

A backup is proven by a restore. Run a restore test monthly and after major updates, on a test installation with its own DNS name, its own Microsoft apps and its own test sources, backed up by the same backup system:

  1. Take a backup of the test installation and switch the test server off for good.
  2. Restore onto a replacement test server that answers to the test DNS name, following Restore, in order, steps 1 to 4.
  3. Sign in to the console, register your AI client, and search for a document you know.
  4. Record the duration of each step, then wipe the replacement.

Keep restore tests on the test installation's own apps and sources; your production installation stays untouched.

Back to the handbook overview.