Architecture

LibreDataHub uses Docker Compose. It does not require Kubernetes. Open-source tools share one host, the same project folders, and the same database connections.

The platform is built for:

  • Single-server efficiency: one machine for the team, with optional GPU profiles
  • Project isolation: OIDC groups, separate folders, and one PostgreSQL database per project
  • One workspace across tools: Jupyter, RStudio, VS Code, and the terminal see the same files and packages
  • Governed AI: every model call goes through a gateway with a quota per project

Each project folder (visible in Jupyter, RStudio, VS Code, and the terminal) is split into:

  • personal/: the signed-in user, and project admins
  • public/: every project member can read and write
  • private/: every member can read; only project admins can write

Airflow DAGs live in airflow/dags/. Notebooks published with MyST live in myst/ and are reachable outside the platform.

JupyterLab

JupyterLab ships with Python 3.13 and an R 4.5 kernel. Packages persist and are shared with VS Code and the terminal. The project database is available through JupySQL. Jupyternaut talks to the LiteLLM gateway, billed to the selected project.

RStudio

RStudio provides R 4.5 with a persistent library shared with Jupyter and VS Code. The project database appears in the Connections pane.

Code-server (VS Code)

Code-server is VS Code in the browser, with the same Python and R packages as the other apps. Kilo Code is the in-editor assistant. It uses the LiteLLM gateway; Kilo’s own cloud and telemetry stay off.

Coding agents (codex, opencode, pi) are preinstalled in the terminal and pointed at the gateway, one provider per project.

Terminal

A browser terminal (ttyd) shares Python, R, and installed tools with the other apps. Each launch keeps a tmux session. Editors (vim, nvim, Helix), data CLIs, and the Harlequin SQL IDE are included, with a profile per database the user can reach.

LibreChat

LibreChat is the chat interface on the gateway. Each project is an endpoint, so choosing a chat chooses which quota is billed. A project knowledge-base agent can hold documents shared with the team. Enable it with the chat profile (it needs llm or llm-gpu).

MLflow

MLflow tracks experiments, one workspace per project. Members can read and update the project’s runs; project admins can delete them. Calls made with a project’s gateway key are also stored as traces in an llm-gateway experiment, visible to the whole project. Enable it with the mlflow profile.

LiteLLM gateway

LiteLLM is the only path to models: local Ollama (CPU or GPU), vLLM, and cloud providers. LLM ressources are not reachable directly, so quotas cannot be bypassed.

On each login, the provisioning service creates a team per project and a key per user-and-project pair, then writes those keys into Jupyter, VS Code, LibreChat, CloudBeaver, and the coding agents. Superadmins manage models and budgets in the gateway UI. A usage dashboard shows spend, tokens, and per-user activity.

Profiles: llm (CPU, Ollama can be disabled), or llm-gpu (Ollama on NVIDIA GPUs). On a GPU host, use ldh-gpu instead of ldh so user apps can see the GPU.

MyST

MyST publishes notebooks as web pages. Files dropped in a project’s myst/ folder are public. Set LDH_MYST_DOMAIN_NO_PROTO so those pages are served on their own host, separate from the logged-in session.

Apache Airflow

Apache Airflow is shared, but each project is independent. A superadmin turns Airflow on per project. That project then gets its own Celery worker, queue, task logs, and secrets folder. Members only see and trigger their projects’ DAGs. From Jupyter, VS Code, or the terminal, the af CLI calls the Airflow API with the user’s own credentials.

The broker is Valkey, with a separate ACL user per client.

CloudBeaver

CloudBeaver is the browser SQL client for the project database. Its AI assistant (chat, explain, fix) uses the LiteLLM gateway. A profile per project selects which quota is billed, and the schema is sent to the model only after the user agrees.

PostgreSQL

Each project has a PostgreSQL 17 database:

Schema Access
<username> personal tables, created by that user
public read and write for every member; tables created by project admins
private read-only for members; write for project admins

Connections are preconfigured in Jupyter, RStudio, VS Code, Harlequin, and CloudBeaver. TCP connections require TLS. PostgreSQL can run on the LibreDataHub host or on another machine.

Extensions available to enable per project include TimescaleDB, Citus (with columnar storage), pgvector, Apache AGE, pg_trgm, fuzzystrmatch, tdigest, pg_textsearch (BM25), pg_ivm, and PostgreSQL Anonymizer.

A superadmin app (launcher, Administration) toggles those extensions, grants read or write access from one project database to another, and picks up databases named shared_*.

DuckDB

DuckDB is available from Python and R. Database files placed in private/duckdb/ show up in the SQL tools. Open a shared file read-only: JupySQL and VS Code do not support concurrent writers on the same file.

Grafana

Grafana dashboards cover application usage per user, host resources, per-app CPU and memory, PostgreSQL, and LLM spend. Loki holds application logs. Prometheus can federate metrics to an external monitoring system.

Administration

ShinyProxy launches the apps. A gate in front of each app accepts only requests that carry that launch’s token. User apps are capped (APPS_CPU_LIMIT, and a memory limit on Jupyter, RStudio, CloudBeaver, and Airflow) and a user can open at most LDH_APPS_MAX_INSTANCES copies of each app. PostgreSQL roles receive a default statement_timeout so a runaway query does not hold the shared server.

Optional profiles: postgres, monitoring, airflow, llm or llm-gpu, chat, mlflow, and pg-backup (continuous WAL archive and encrypted backups to S3). LDH_ENABLED_APPS hides launcher tiles without removing a profile.