Paperless-ngx: sharing the consume folder via Samba – scan straight into your DMS

Paperless-ngx watches an inbox folder, the so-called consume folder: every PDF or image file that lands there is automatically made searchable via OCR, tagged, archived and then removed from the folder. This only becomes really convenient once the folder is shared on the network. Then a network scanner (“scan to folder”) can scan straight into it, and from your PC you simply drag and drop documents into it.

This guide applies to a Paperless-ngx installation directly on a Debian or Ubuntu system (e.g. in a Proxmox container) with the consume folder /opt/paperless/paperless-ngx/consume and the system user paperless. If you use a different path or Docker, adjust the paths accordingly – see the note further down.

1. Install Samba

sudo apt install samba samba-common-bin

Check where the consume folder is located and who owns it:

ls -ld /opt/paperless/paperless-ngx/consume
id paperless

2. Set up the share

Add the following share at the end of the file /etc/samba/smb.conf:

[consume]
   comment = Paperless inbox
   path = /opt/paperless/paperless-ngx/consume
   browseable = yes
   writable = yes
   guest ok = no
   valid users = paperless
   force user = paperless
   force group = paperless
   create mask = 0770
   directory mask = 0770
   hosts allow = 192.168.178.0/24 127.0.0.1
  • valid users – only the user paperless may connect.
  • force user / force group – all files automatically belong to paperless, no matter which account writes them. That way Paperless can also delete them after processing.
  • create mask / directory mask – new files and folders are only readable by owner and group.
  • hosts allow – access only from your own network (adjust to your network).

Check the configuration:

testparm

3. Set the Samba password and restart the service

Samba manages its own passwords. The Linux user paperless already exists; it now gets a Samba password that scanners and PCs use to log in:

sudo smbpasswd -a paperless
sudo systemctl restart smbd

If a firewall is running, open the Samba ports, e.g. with sudo ufw allow from 192.168.178.0/24 to any app Samba.

4. Test

On Linux:

smbclient //192.168.178.45/consume -U paperless -c 'put test.pdf'

On Windows, enter \\192.168.178.45\consume in Explorer; on macOS use Go → Connect to Server in Finder and smb://192.168.178.45/consume. Copy a test PDF into it – after a few seconds it should disappear from the folder and show up in the Paperless interface. If you use the share permanently, map it as a network drive on Windows.

5. Set up the network scanner

The scanner’s web interface (Brother, HP, Canon, Epson …) usually offers a function called “Scan to Network”, “Scan to Folder” or “Scan to network folder”. Enter the following there:

  • Server/host: IP address of the Paperless server
  • Share/path: consume (sometimes as \\192.168.178.45\consume)
  • User/password: paperless and the Samba password
  • File format: PDF, ideally 300 dpi, greyscale or colour

Older scanners sometimes only support the outdated SMB1 protocol, which Samba no longer offers by default for security reasons. Before you switch it back on, a firmware update of the scanner is worth a try. If that does not help, many devices alternatively offer “Scan to FTP” or “Scan to E-mail” – Paperless-ngx can process the latter as well through its mail rules.

6. Use subfolders as tags

Paperless can turn subfolders of the consume folder into tags automatically. If you create folders such as Invoices, Insurance and Taxes, your documents are tagged accordingly right away. To do so, set the following in the Paperless configuration (/opt/paperless/paperless.conf with this type of installation):

PAPERLESS_CONSUMER_RECURSIVE=true
PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=true

Then restart the Paperless services (e.g. sudo systemctl restart paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue – the names may differ depending on the installation; systemctl list-units 'paperless*' lists them).

Note for Docker installations

If Paperless-ngx runs via Docker Compose, the consume folder is a directory on the host that is mounted into the container – recognisable in docker-compose.yml by a line such as - ./consume:/usr/src/paperless/consume. Samba then shares this host folder. Instead of paperless, enter the user whose UID is set in the USERMAP_UID variable (usually 1000) for force user, so that the container is allowed to read and delete the files. The Paperless options go into docker-compose.env.

Troubleshooting

  • File stays in the folder: check the permissions (ls -l in the consume folder) and look at the Paperless log (journalctl -u paperless-consumer -f or docker compose logs -f webserver).
  • Login fails: did you run smbpasswd -a? Is the client’s IP listed in hosts allow?
  • Share is not visible: check testparm for errors and look at sudo systemctl status smbd.