Open Source Consulting for Digital Independence
EN DE ES FR

do-scan-smart

Scan documents at home, deliver them straight to your Nextcloud.

do-scan-smart lets you scan documents on a scanner in your home network and have them delivered straight into your Nextcloud. Open a small web page in any browser, press Scan, and the finished file lands in the cloud — no cloud software ever touches the scanner directly. It is aimed at households and small offices that want a simple “press scan, find it in the cloud” workflow.

Features

Scanning

  • Drives any SANE-reachable scanner via scanimage (tested with the Epson XP-2200 over the epsonds network backend, no driver install).
  • Configurable scan timeout and SANE device selection.

Web interface

  • Small embedded web UI: open it in any browser or tablet, pick the options, press Scan.

Resolution, color, and format

  • Selectable resolution (75/150/300/600/1200 dpi), color mode (Lineart, Gray, Color) and output format (PNG, JPEG, PDF), each validated server-side.

Upload to Nextcloud

  • Uploads straight to Nextcloud over WebDAV (HTTPS PUT with a Nextcloud app password); nothing is stored locally.

Overwrite protection and file names

  • Overwrite handling: the UI checks whether the target name already exists before scanning, and uploads are race-safe (If-None-Match: *) so an existing file is never silently replaced.
  • File-name validation that blocks path traversal, separators and control characters.

Operation and reliability

  • Single binary, standard-library only; the one runtime dependency is scanimage (sane-utils) on the host.
  • Secrets stay out of the process list: the WebDAV password is taken from an environment variable or a password file, never a command-line flag.
  • Automatic retry of transient scanner errors (e.g. the post-scan carriage reset that drops the connection for a few seconds).

Deployment and licensing

  • Built for the split setup where Nextcloud lives in a data center while the scanner sits in your home LAN: the daemon runs on any Linux box at home and only ever opens outbound connections, so the scanner never needs an inbound port.
  • Licensed under AGPL-3.0-or-later.

Roadmap

The following are planned and documented in the v2 concept (docs/CONCEPT-nextcloud-plugin.md, status: DRAFT, not yet implemented):

  • Nextcloud app (PHP) plus daemon “agent mode”: trigger scans from inside Nextcloud on web and mobile, with the scanner still reachable only outbound via long-polling.
  • Files integration (“Scan to this folder”) and a dedicated app page with a full options dialog and job history.
  • Scanner capability detection (scanimage -A) so the UI only offers sources, modes and resolutions the hardware actually supports.
  • Multipage scanning: interactive flatbed next/finish loop and automatic ADF batch, assembled into PDF.
  • Agent pairing with revocable, hashed tokens and last_seen tracking.
  • Packaging of the agent as a systemd unit, Docker image and Home Assistant add-on.

Recorded as explicitly out of scope (not planned): OCR, scan preview with crop, multi-tenant/multi-user hardening, and Nextcloud App Store publication.