brscan-skey
Docker app from ZappyZap's Repository
Overview
Readme
View on GitHub
brscan-skey
Brother "Scan to PC" button → multi-page PDF in a folder.
Made for Paperless-ngx, works with any folder. For models without Scan to FTP / Network.
Docker image version Docker pulls Image size Architecture: amd64 License: MIT Changelog Buy me a coffee
Quick start · Requirements · Settings · Troubleshooting · Issues
Press SCAN → Scan to PC on a Brother network scanner and get a multi-page PDF in a folder: the Paperless-ngx consume folder, a Nextcloud folder, an SMB share, and so on.
This is useful on models that have no "Scan to FTP / Network / SharePoint" menu (many North American models, such as the DCP-L2550DW). The container runs Brother's brscan-skey daemon. It registers with the device, waits for the button, scans with SANE and writes the PDF.
- Takes every page in the document feeder. When the feeder is empty, it scans the glass.
- Writes compact PDFs: JPEG for gray and colour, CCITT G4 for black & white. The page size is preserved.
- Writes each file atomically, so a watcher such as Paperless never picks up a half-written file. The owner is configurable (
PUID/PGID, default99:100for Unraid). - Runs on
linux/amd64only, because Brother publishes x86 drivers only.
Requirements
- Host networking. The device sends the button event to UDP port 54925 on the host.
- The device must accept SNMP writes.
brscan-skeyregisters itself with an SNMP SET. On the device's web page, go to Network → Network → Protocol → SNMP and choose "SNMP v1/v2c read-write access". If you set a custom Set community, put the same value inSNMP_COMMUNITY. Without this, the device shows "No PC found". Choosing this mode disables SNMPv3. Read-only tools, such as the Home Assistant Brother integration (v2cpublic), keep working. - A model supported by brscan4. Most Brother laser and inkjet models from about 2012 to 2020 are supported. Run
docker run --rm --entrypoint list-models devzwf/brscan-skeyfor the list. The container refuses to start with an unknown model.
Quick start
docker run -d --name brscan-skey --network host --restart unless-stopped \
-e SCANNER_IP=192.168.1.50 \
-e SCANNER_MODEL=DCP-L2550DW \
-e SKEY_USER=Paperless \
-e TZ=America/Toronto \
-v /path/to/paperless/consume:/output \
devzwf/brscan-skey:latest
services:
brscan-skey:
image: devzwf/brscan-skey:latest
container_name: brscan-skey
network_mode: host
restart: unless-stopped
environment:
SCANNER_IP: 192.168.1.50
SCANNER_MODEL: DCP-L2550DW
SKEY_USER: Paperless
TZ: America/Toronto
PUID: 1000
PGID: 1000
volumes:
- ./consume:/output
Then, on the device, press SCAN → Scan to PC → File, choose your PC (the SKEY_USER name) if the device asks, and press OK.
Settings
| Variable | Default | Description |
|---|---|---|
SCANNER_IP |
(required) | IP address of the device. Use a static lease. |
SCANNER_MODEL |
(required) | Model name as known to brscan4, e.g. DCP-L2550DW. |
SKEY_USER |
brscan |
Name shown on the device screen. |
SNMP_COMMUNITY |
internal |
SNMP Set community used to register. |
SCAN_RESOLUTION |
300 |
100, 150, 200, 300, 400, 600 dpi. Use 300 for OCR. |
SCAN_MODE |
True Gray |
Black & White, Gray[Error Diffusion], True Gray, 24bit Color[Fast] (depends on the model). |
SCAN_PAGE_SIZE |
Letter |
Letter, A4 or Legal. |
SCAN_WIDTH_MM / SCAN_HEIGHT_MM |
(from page size) | Custom scan area. The maximum width is usually 211.9 mm. |
JPEG_QUALITY |
80 |
JPEG quality inside the PDF. |
FILENAME_PREFIX |
scan |
Files are named <prefix>_YYYY-MM-DD_HHMMSS.pdf. |
PUID / PGID |
99 / 100 |
Owner of the created files. |
TZ |
Etc/UTC |
Time zone, used for file names and logs. |
SCANNER_NAME |
Brother |
Internal SANE name. You can leave it as is. |
Every Scan to PC target (File, Image, OCR, E-mail) produces the same PDF.
How it works
- At startup, the container registers the device with the brscan4 SANE backend. It then starts
brscan-skey, which tells the device "send scan button events for SKEY_USER to this host". The registration is refreshed every few minutes, so it comes back after the device reboots. - When the button is pressed,
scanimage --batchreads the feeder. If no page comes out, it scans the flatbed. - The pages are assembled with
img2pdf. The PDF is written to/output/.brscan-tmp/, then renamed into/output. Paperless only consumes the top level of its folder (when not recursive), so the hidden subfolder is ignored.
Troubleshooting
- "No PC found" on the device: SNMP is read-only. See Requirements, step 2. Check that the container runs with
--network host. - Nothing happens after OK: look at
docker logs brscan-skey. Each scan logsstartand thenOK: N page(s) → file.pdf. - "Document feeder jammed": the pages read before the jam are kept in the PDF.
- Wrong name on the device: set
SKEY_USER, then restart the container. - Several hosts registered: the device lists every registered PC. Stop any other
brscan-skeyinstance on your network.
Building
docker build -t brscan-skey:local .
CI (Gitea Actions): secrets.yml runs gitleaks on the full history, ci.yml builds and smoke-tests every push. release.yml publishes X.Y.Z, X.Y and latest to Docker Hub when a vX.Y.Z tag is pushed (the tag must match VERSION). It also rebuilds the latest release every Monday to pick up Debian security updates.
License
The files in this repository are under the MIT license. The Brother drivers keep their own license; see THIRD_PARTY.md. This project is not affiliated with or endorsed by Brother Industries, Ltd. "Brother" is a trademark of its owner.
Requirements
Categories
Download Statistics
Related apps
Explore more like this
Explore allDetails
devzwf/brscan-skey:latestRuntime arguments
- Network
host- Shell
bash- Privileged
- false
- Extra Params
--restart=unless-stopped
Template configuration
Folder where the PDFs are written, for example the Paperless-ngx consume folder.
- Target
- /output
- Default
- /mnt/user/appdata/paperless-ngx/consume
IP address of the Brother device. Use a static lease.
- Target
- SCANNER_IP
Exact model name, e.g. DCP-L2550DW, MFC-L2710DW, HL-L2395DW. The container refuses to start with an unsupported model.
- Target
- SCANNER_MODEL
Name of this PC in the Scan to PC menu of the device.
- Target
- SKEY_USER
- Default
- Paperless
- Value
- Paperless
Scan area: Letter, A4 or Legal.
- Target
- SCAN_PAGE_SIZE
- Default
- Letter|A4|Legal
- Value
- Letter
300 dpi is recommended for OCR.
- Target
- SCAN_RESOLUTION
- Default
- 300|100|150|200|400|600
- Value
- 300
Colour mode. The available values depend on the model.
- Target
- SCAN_MODE
- Default
- True Gray|24bit Color[Fast]|Black & White|Gray[Error Diffusion]
- Value
- True Gray
Time zone, used for file names and logs.
- Target
- TZ
- Default
- America/Toronto
- Value
- America/Toronto
Must match the Set community on the device (Brother default: internal).
- Target
- SNMP_COMMUNITY
- Default
- internal
- Value
- internal
Files are named PREFIX_YYYY-MM-DD_HHMMSS.pdf.
- Target
- FILENAME_PREFIX
- Default
- scan
- Value
- scan
JPEG quality inside the PDF (gray and colour).
- Target
- JPEG_QUALITY
- Default
- 80
- Value
- 80
Optional custom width; overrides Page size. Max usually 211.9.
- Target
- SCAN_WIDTH_MM
Optional custom height; overrides Page size.
- Target
- SCAN_HEIGHT_MM
Owner of the created files (99 = nobody).
- Default
- 99
- Value
- 99
Group of the created files (100 = users).
- Default
- 100
- Value
- 100