Self-hosted document archive

Every scan, receipt and PDF, searchable on your own server.

Engrafo is a small, self-hostable home for your paperwork. Drop in a scan, a receipt or an ebook: it reads the text, files it in your folders, and finds it again by what it says. Everything stays in your own bucket and database.

Get started View on GitHub ↗

  • The Documents page searching for “utility bills”. Five results, two electricity bills, a water bill, a lease and a payslip, each with a thumbnail and the passage that matched. The sidebar shows the folder tree: Home, Utilities, Medical, Receipts (shared over MCP) and Taxes.
    Search finds bills by what they say, each with its first page and the passage that matched.
  • An electricity bill's page on the Text tab, showing the bill transcribed as Markdown with its tables. Beside it, a Receipt card with vendor Stadtwerke München and total €84.20, and a Details card with the date read from the text.
    A bill read by the vision model: its text as Markdown, the vendor and total filled in beside it.
  • The Suggested merges page. Three scans, scan_0004 to scan_0006, are suggested as one document with high confidence (93%), with the reasons for and against, a note that the AI model confirmed one page break, and Dismiss and Review merge buttons.
    A letter scanned a page per file, spotted and explained before you merge it.
  • The Processing page: 1 running, 3 queued, 0 failed and 14 finished in the last day. The running document, a tax return, is on page 8 of 18 with the vision model, with a progress bar.
    A batch going through: one document read page by page, three waiting their turn.
  • The MCP settings: the endpoint address, http://nas.local:3004/mcp, and two API keys, “Claude Code on my laptop” and “Claude Desktop”, each with a Revoke button. The Receipts folder in the sidebar is marked MCP.
    Share a folder with Claude or any MCP client through one endpoint and an API key.
  • The vision model settings, connected to a local Ollama server with the qwen2.5vl:7b model and set to read documents automatically.
    Point Engrafo at any OpenAI-compatible vision model, local or hosted.

Features

Keep it, read it, find it again

Upload a file and it goes straight into a bucket you own. A pipeline reads it, files it and indexes it, and its page shows what came out.

  1. Get everything in

    Drag in a file or a whole folder, or point your scanner at a watched folder.

    Uploads go straight from the browser to your bucket, each with its own progress bar, and a folder upload keeps its subfolders. A scanner's network share works too: whatever lands in the watched folder is filed and then removed.

    • PDFs, images (JPEG, PNG, WebP, GIF, TIFF), EPUB, Markdown, CSV, HTML and plain text
    • Upload a file you already have and Engrafo warns you, with a link to the other copy
    • A crash mid-file is picked up on the next pass: nothing is filed twice or lost
    Set up the watched folder
  2. Every page read

    OCR turns scans into searchable PDF/A, and a vision model can read them too.

    ocrmypdf turns pages upright, straightens them and gives them a text layer. A PDF that already has text keeps it. If you have a vision model, any OpenAI-compatible endpoint can re-read the pages instead, as plain text or Markdown with tables.

    • Ebooks are read chapter by chapter, with each chapter named from the table of contents
    • Text files are read in whatever encoding they were saved in
    • Vision reads show their progress page by page, and a model that is down never fails an automatic scan
  3. Folders, not tags

    Nested folders, drawn as a tree in the sidebar on every page.

    File documents the way you file anything else. Drag a document or a folder onto another one, or use Move to. Names are unique within a folder, so a second scan.pdf becomes scan (2) instead of overwriting the first.

    • Deleting puts things in the Trash, and you can restore them for 30 days
    • Trashed documents are out of search and the tree until you restore them
  4. Dates and receipts, filled in

    The date on a letter and the total on a receipt are read for you.

    The date printed on a document is read from its text in the common formats, in English and German. A receipt's vendor, total and currency are read by plain rules, and left empty when they are unclear rather than guessed. Correct anything you like: your edits are never overwritten.

    • Export receipts as a CSV for a date range or a folder, ready for a spreadsheet
    • Totals are stored as exact decimals, never rounded floats
  5. Put split scans back together

    Merge pages scanned as separate files, or let Engrafo suggest which belong together.

    Pick PDFs and images in any order and merge them into one document. The OCR text layer comes along, so nothing is read twice. Engrafo also spots a scan filed as several documents, such as a page per file or front and back apart, and suggests the merge. A vision model can double-check the cases it is unsure of.

    • Suggestions explain themselves, with the reasons for and against
    • A vision model can suggest a title for the merged copy
    • Keep the originals, or send them to the Trash, where they can still be restored
  6. Share a folder with your AI agent

    Claude, or any MCP client, can search and read the folders you choose.

    Share a folder from its menu, make an API key in Settings, and point an MCP client at your instance. It can list, search and read what is in that folder and the folders inside it. Nothing else is visible, and the tools only read.

    • Turning a folder off takes effect on the agent's next call
    • Works with Claude Code, Claude Desktop, and any other MCP client
    Connect an agent
  7. A pipeline you can watch

    Every step of every document has a status, and a failure tells you why.

    The Processing page shows what is running, what is waiting and what has failed. A failed document says which step stopped and offers a retry, and any document can be processed again with OCR turned on or off. A restart picks up where it left off.

    • Long jobs show their progress, such as page 3 of 12
    • CPU-heavy OCR is limited to a few documents at a time, so a big folder doesn't stall the server
  8. Yours, end to end

    Your bucket, your database, your server. Nothing leaves it.

    Files live in any S3-compatible bucket (RustFS comes in the compose file), metadata in Postgres, and search runs locally. Export the whole archive as a single file and import it into another instance. Sign in with a magic link or your own OpenID Connect provider.

    • Full export and import: originals, folders, dates and receipts
    • Single sign-on with any OIDC provider, set up from the app
    • MIT licensed and free
    Backups and restore

Small on purpose

One job, done well

Engrafo keeps your documents and finds them again, and that is all it tries to do. Folders are the one way to organise, so there is nothing else to learn or maintain.

What you get

  • Folders, as deep as you like
  • OCR and local search in one image
  • Dates and receipts read for you
  • Four containers, set up in minutes

What it leaves out

  • Tags and correspondents
  • Mail ingestion
  • Workflows and matching rules

Get started

Running in five minutes

One compose file pulls everything from Docker Hub: Engrafo, Postgres, RustFS for storage, and a one-shot job that creates the buckets. Nothing to clone or build. Then open http://ENGRAFO_HOST:3004 and sign in; the first account is the admin.

Read the self-hosting guide Docker Hub ↗

mkdir engrafo && cd engrafo
curl -fsSLO https://raw.githubusercontent.com/cubicecho/engrafo/main/docker-compose.quickstart.yml

# The three secrets it refuses to start without, plus the address you reach it at.
printf 'ENGRAFO_HOST=%s\nBETTER_AUTH_SECRET=%s\nPOSTGRES_PASSWORD=%s\nRUSTFS_PASSWORD=%s\n' \
  "$(hostname -f)" "$(openssl rand -hex 32)" "$(openssl rand -hex 24)" "$(openssl rand -hex 24)" > .env

docker compose -f docker-compose.quickstart.yml up -d