You only need this page if the one-command install in the README didn't work, or if you want to pre-configure something (API key, port, install directory, …).
For the happy path, just run the command from the README and skip this file entirely.
Windows users: just run the .exe from the release page — no flags.
The sections below apply only to the Linux/macOS install.sh.
install.sh accepts the flags below. They write to .env and start
the server when finished.
| Flag | Purpose |
|---|---|
--api-key sk-xxx |
Pre-configure your LLM API key |
--port 8080 |
Server port (default 15000) |
--dir <path> |
Install directory (default ~/tofu) |
--no-launch |
Install only; don't start the server |
Example:
curl -fsSL https://raw.githubusercontent.com/rangehow/ToFu/main/install.sh \
| bash -s -- --api-key sk-xxx --port 8080The installer is install.sh. Read the script if you want every detail;
the short version:
- Locates conda, or installs a private Miniforge as a project sibling.
- Creates a
tofuconda env (Python 3.12). - Installs all Python dependencies from conda-forge — never pip.
This avoids the
GLIBC_2.25 not foundtrap that pip's manylinux wheels (especiallylxml) hit on CentOS 7 / glibc 2.17. - Installs
ripgrep,fd-find, Chromium shared libs, and PostgreSQL from conda-forge — nosudo, no system packages. - Installs the Playwright Chromium binary.
- Writes
.tofu_env.jsonsopython server.pyre-execs into the right interpreter even from an unactivated shell. - Starts the server.
PostgreSQL is auto-bootstrapped as a local userspace process when available; otherwise Tofu falls back to SQLite, which has no configuration and no dependencies.
A pip-installed wheel of lxml (or similar) is shadowing the conda-forge
build. Fix it by re-running the installer:
curl -fsSL https://raw.githubusercontent.com/rangehow/ToFu/main/install.sh \
| bash -s -- --reset-env--reset-env deletes the existing conda env and rebuilds from scratch.
Destructive — only use it on the Tofu-owned env.
Almost always an outdated conda you installed yourself. Easiest fix:
let the installer drop a private Miniforge next to the project, and use
that instead of touching yours:
curl -fsSL https://raw.githubusercontent.com/rangehow/ToFu/main/install.sh \
| bash -s -- --force-sibling-condaYour data/pgdata/ was initialized by a different PG major than the one
the installer just placed in your env. Two options:
- Keep your data, fall back to SQLite — the default. The installer detects the mismatch and switches to SQLite automatically. Nothing to do.
- Re-initialize PG — pass
--reinit-pgdata. The installer renames the oldpgdatatopgdata.bak.<timestamp>and creates a fresh one.
If you don't need PG at all, pin SQLite up front:
curl -fsSL …/install.sh | bash -s -- --force-sqliteThe Miniforge download will fail. Workarounds:
- Pre-download
Miniforge3-<platform>.shmanually and setTOFU_MINIFORGE_LOCAL=/path/to/Miniforge3-...shbefore running the installer. - Or set
TOFU_MINIFORGE_MIRRORS="https://your-mirror/..."(one URL per line) — the installer tries each in order before giving up.
Every install.sh run writes a full transcript (ANSI colours stripped)
to <install-dir>/logs/install-YYYYMMDD_HHMMSS.log. Attach it when
filing an issue.
| Env var | Effect |
|---|---|
TOFU_DB_BACKEND=sqlite |
Force SQLite (legacy CHATUI_DB_BACKEND=sqlite still works) |
TOFU_DB_PATH |
SQLite file location (default data/tofu.db) |
TOFU_PG_HOST / TOFU_PG_PORT / TOFU_PG_DBNAME / TOFU_PG_USER / TOFU_PG_PASSWORD |
PG DSN overrides |
git clone https://github.com/rangehow/ToFu.git && cd ToFu
docker compose up -dAll data persists in named Docker volumes. No flags needed.