HUB
Sign inSign up

lordraw/opennotebook-converter

By lordraw

•Updated 9 days ago

OpenNotebook isolated office-to-PDF converter (headless LibreOffice) for ingestion

Image
0

348

lordraw/opennotebook-converter repository overview

⁠OpenNotebook — Document converter

Self-hosted knowledge workspace with grounded RAG chat and traceable citations. Upload documents, source code, archives, images, web pages and notes; organize them in a freely nested Project → Workspace → Notebook tree; chat with an LLM that answers only from the sources in the selected scope, with every statement linked to the exact passage it comes from.

This image runs the optional document converter: headless LibreOffice that turns office documents (PPTX, XLSX, ODT/ODP/ODS, DOC/XLS/PPT, RTF and, by default, DOCX) into PDF for the ingestion worker, so they get page numbers in citations and open in the PDF viewer.

This image is one of the three OpenNotebook application images. Run them together with the Compose file described below — they are not meant to be started alone.

ImageRole
lordraw/opennotebook-web⁠Web UI (Angular) on unprivileged nginx; proxies /api to the api
lordraw/opennotebook-api⁠REST + streaming API (FastAPI); also runs the one-shot migrate job
lordraw/opennotebook-worker⁠Ingestion worker (Celery): parsing, OCR, web fetching, embeddings, knowledge graph, summaries
lordraw/opennotebook-converter⁠Optional isolated document converter (headless LibreOffice): office files to PDF
lordraw/opennotebook-renderer⁠Optional isolated page renderer (headless Chromium): web pages that need JavaScript

⁠No models inside

The images contain no model weights, no inference server and no ML runtime. Every model call (chat, summaries, knowledge-graph extraction, image description, OCR, embeddings, rerank) goes to an external provider you configure: Groq, OpenRouter, Google Gemini, Cloudflare Workers AI, Cerebras, Mistral, NVIDIA NIM, Hugging Face, or your own Ollama server. Each phase has its own model chain with fallbacks, globally or per project. A working instance needs one chat model and one embedding model (Gemini or Mistral alone covers both).

⁠Features

  • Ingestion: PDF (scanned pages via OCR), DOCX, Markdown, text, HTML; source code with structure-aware chunking (tree-sitter: C, C++, Python, JS/TS, Java, Go, Rust, C#, PHP, Ruby, shell); ZIP/TAR archives (every file becomes a source; zip-bomb and path-traversal protection); images (OCR + description); web pages by URL with an optional same-site crawl (SSRF-protected); notes.
  • Search: hybrid dense + BM25 retrieval with the access-control and on/off-switch filters applied inside the query; optional external rerank.
  • Grounded chat: streaming answers, strict prompt, validated [S1] citations that open the source at the cited passage (PDF page with the passage highlighted, or the text / code lines), provider fallback, save an answer as a note; an optional second model checks that the cited passages support the answer.
  • Knowledge graph and wiki: entities and relations from documents (LLM) and code (symbols, imports, calls — no model); wiki pages written only from the passages the reader may see; graph view; graph-expanded chat context.
  • Summaries and suggested questions for every document.
  • Deep research mode: plans sub-questions, searches each one in scope and writes a structured, cited report.
  • Operations in the UI: a Sources page with every file's state and completion, archives opened like folders, per-file re-index; a Processes page with telemetry (rates, estimated time left), running files and workers; Stop all and Reset all for indexing; optional isolated renderer for JavaScript pages.
  • Multi-user: projects, workspaces and notebooks with inherited viewer/editor/owner roles shared with users or groups; single sign-on (OpenID Connect, e.g. Keycloak) with group sync that follows the provider while you are signed in, and sign-out that ends the provider's session too (back-channel logout supported); audit log.
  • Governance: per-project provider policy (e.g. "LAN only", or excluding single models); changing the embedding model re-indexes with no search downtime (atomic index switch).
  • Light and dark theme.

⁠Quick start

Requirements: Docker Engine with the Compose plugin (v2.23+), 4 GB RAM (8 GB recommended), outbound HTTPS to your model providers.

mkdir opennotebook && cd opennotebook
BASE=https://raw.githubusercontent.com/lordraw77/OpenNotebook/HEAD
curl -fsSLO $BASE/deploy/production/docker-compose.yml
curl -fsSLO $BASE/.env.example
curl -fsSL  $BASE/scripts/gen-secrets.sh -o gen-secrets.sh && chmod +x gen-secrets.sh
./gen-secrets.sh .env      # creates .env and generates every internal secret + the first admin password
$EDITOR .env               # BOOTSTRAP_ADMIN_EMAIL, at least one provider key, optional MODEL_* defaults
docker compose up -d

Open http://<host>:8080 and sign in with BOOTSTRAP_ADMIN_EMAIL and the generated BOOTSTRAP_ADMIN_PASSWORD (in .env). Then: Settings → Providers (check providers and models), Settings → Models (chains per phase), Workbench (create a project, upload sources, ask).

The Compose file starts the three OpenNotebook images plus PostgreSQL 18, Qdrant, SeaweedFS (S3 storage) and Redis. Optional profiles: observability (Prometheus, Grafana, Jaeger), auth (Keycloak), converter (office documents to PDF, with CONVERTER_URL=http://converter:8080) and renderer (JavaScript pages, with RENDERER_URL=http://renderer:8080): docker compose --profile observability up -d.

⁠Tags

TagContent
1.4.3Visio drawings (.vsdx read from the file: shapes and the connections between them; .vsd and PDF preview through the converter), visible "New chat" button
1.4.2Processes page with telemetry and running files, WORKER_CONCURRENCY, quieter model-call logs, NAT helper script, updated in-app guide with new screenshots
1.4.1Stop all and reset all for ingestion, per-file and overall completion on the Sources page, what is being worked on in RAG Status
1.4.0JavaScript page renderer (optional image), Sources page, topics and duplicate suggestions in the graph, draggable graph, compressed single files, SSO logout and group re-sync, per-model provider policy, optional groundedness judge
1.3.07z and RAR archives, pictures inside PDF/DOCX read by models, OCR text anchored to line boxes, in-app user guide
1.2.0Iterative deep research, model-rewritten follow-ups, no double embedding on model change, chat history
1.1.0Git repository sources with scheduled sync, native XLSX/PPTX import, editable knowledge graph
1.0.1Rerank through Ollama-compatible proxies (llmproxy)
1.0.0First stable release: observability, operations, isolated office converter, lazy source tree, Italian UI, Helm chart
0.5.1Fix: sources can be uploaded to projects and workspaces, not only notebooks
0.5.0M0–M5: adds groups, single sign-on (OIDC), provider policy per project, zero-downtime embedding change, deep research mode
0.4.0M0–M4: foundations, ingestion, grounded chat, extended ingestion, knowledge graph and wiki
latestThe most recent release

Pin an exact version in production (VERSION=1.4.3 in .env). The three images of a deployment must have the same version. Images are linux/amd64.

⁠About this image

  • Enabled by the converter Compose profile; the worker uses it when CONVERTER_URL=http://converter:8080.
  • Isolation (threat T5): LibreOffice parses untrusted files, so the container sits alone on the convert network (internal: true: no internet, no database, no object storage), reachable only by the worker. It runs as a non-root user with a read-only root filesystem, no capabilities and memory/PID limits.
  • POST /convert?ext=<docx|pptx|xlsx|odt|odp|ods|doc|xls|ppt|rtf> with the document as body returns the PDF; GET /health. Each conversion has its own temporary LibreOffice profile and a timeout that kills the whole process group. Macros are never run.
  • Settings: CONVERTER_CONCURRENCY (default 2), CONVERTER_TIMEOUT_SECONDS (180), CONVERTER_MAX_MB.
  • No models inside: metric-compatible fonts (Liberation, Carlito, Caladea, DejaVu) keep page breaks close to Office.

⁠Security

  • Runs as a non-root user; the Compose file adds a read-only root filesystem, no-new-privileges and drops all capabilities.
  • Databases and storage sit on an internal network without internet access; only the web port is published.
  • Provider API keys are stored encrypted (AES-GCM) with APP_ENCRYPTION_KEY — back that key up together with the pg-data volume.
  • Strict Content-Security-Policy in the web UI; uploaded content is treated as untrusted (archive limits, SSRF protection, prompt-injection-aware prompts).

⁠Data and backup

Volumes: pg-data (source of truth), blob-data (original files), qdrant-data (vector index, rebuildable by re-indexing), redis-data (queues). Back up pg-data, blob-data and APP_ENCRYPTION_KEY.

⁠Upgrade

Set the new VERSION in .env, then docker compose pull && docker compose up -d. Database migrations run automatically in the migrate job before the api and worker start.

⁠Documentation and source

  • Source code, issues and full documentation: https://github.com/lordraw77/OpenNotebook⁠
  • Deployment guide: docs/deploy.md · Docker overview (services, profiles, volumes, troubleshooting): docs/docker.md · Architecture and threat model: docs/analysis/

Tag summary

Content type

Image

Digest

sha256:fa2ad3bd4…

Size

208.8 MB

Last updated

9 days ago

docker pull lordraw/opennotebook-converter