---
slug: docs
kind: recipe
status: partly-ran
sh: https://insidethemachine.ai/install/docs.sh
ps1: https://insidethemachine.ai/install/docs.ps1
json: https://insidethemachine.ai/install/docs.json
page: https://insidethemachine.ai/do/docs
---

# Install: Chat with your files

A private chat that answers questions about your own PDFs, notes and documents.

**Run status: Partly checked: some paths were run, the rest only checked against docs.** Install steps run on an Apple M4 Mac with 16 GB on 2026-10-15. File upload and the first Docling run are checked against the docs only.

**This script:** The wrapper scripts are generated from the site data. Every .sh passed bash -n and shellcheck and ran in plan mode on Linux (Debian 13). Every .ps1 passed the PowerShell parser and chat.ps1 ran in plan, verify and rollback mode under PowerShell 7 on Linux with Windows calls mocked. Not run on macOS or real Windows.

## One command

```bash
curl -fsSL https://insidethemachine.ai/install/docs.sh | bash
```

Windows (PowerShell):

```powershell
irm https://insidethemachine.ai/install/docs.ps1 | iex
```

Actions: `| bash -s -- plan` (print only), `verify`, `rollback --yes`. Env: ITM_RAM, ITM_MODEL. Read the script first: `curl -fsSL https://insidethemachine.ai/install/docs.sh | less`.

Lines marked YOU RUN are not run by the script (servers, interactive apps, your own files). The script prints them at the end, in order.

## Model by memory (picked automatically)

| memory GB (at least) | ollama tag |
|---|---|
| 8 | qwen3.5:4b |
| 16 | gemma4:12b |
| 24 | gemma4:12b |
| 32 | qwen3.8:27b |
| 48 | qwen3.8:27b |
| 64 | qwen3.8:27b |
| 96 | qwen3.8:27b |
| 128 | qwen3.8:27b |
| 192 | qwen3.8-flash-next:125b-a6b |
| 256 | qwen3.8-flash-next:125b-a6b |
| 512 | qwen3.8-flash-next:125b-a6b |

## Steps

### macOS and Linux (bash; brew lines are macOS only)

Install:

1. **Install Ollama**
   - run: `curl -fsSL https://ollama.com/install.sh | sh`
2. **Download your model**
   - run: `ollama pull $MODEL`
3. **Add a ChatGPT-style window**
   - run (macOS only): `brew install python@3.11`
   - run: `python3.11 -m venv ~/.venvs/openwebui && source ~/.venvs/openwebui/bin/activate`
   - run: `pip install open-webui`
   - YOU RUN (starts a server that keeps running; run it in its own window): `open-webui serve`
4. **Add your files**
   - note: In a chat, click + and attach a file, then ask about it. For a whole folder, go to Workspace → Knowledge, make a collection and upload your files. Then type # in a chat to use it.
5. **Messy PDF? Clean it first**
   - run: `python3 -m venv ~/.venvs/docling && source ~/.venvs/docling/bin/activate`
   - run: `pip install docling`
   - YOU RUN (needs your own file, folder or model name): `docling yourfile.pdf`

Verify:

- `ollama --version` → expect: a version number
- `ollama list | grep -F "${MODEL%%:*}"` → expect: your model is in the list
- `test -x ~/.venvs/openwebui/bin/open-webui` → expect: Open WebUI is installed
- `test -x ~/.venvs/docling/bin/docling` → expect: Docling is installed

Rollback:

- run: `ollama rm $MODEL`
- run: `rm -rf ~/.venvs/openwebui ~/.venvs/docling`
- run: `rm -rf ~/Library/Caches/pip`

### Windows (PowerShell, not run by us)

Install:

1. **Install Ollama**
   - run: `irm https://ollama.com/install.ps1 | iex`
2. **Download your model**
   - run: `ollama pull $MODEL`
3. **The rest of the recipe**
   - note: Install Ollama with this PowerShell command, or the installer from ollama.com/download. On Linux, the install command above works as it is. After that, every ollama command on this page is the same. Open WebUI and Docling also run on Windows; their pages have the steps. Steps: https://insidethemachine.ai/do/docs

Verify:

- `ollama --version` → expect: a version number
- `ollama list` → expect: your model is in the list

Rollback:

- run: `ollama rm $MODEL`
