* Fix: disable share link archive switch if archive version doesnt exist
* Fix: Add brief timeout before copy after share link creation for Safari, only show if succeeded
* Update messages.xlf
* Changelog v2.1.0 - GHA
* Remove a fix from the features list
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
* Updates the Gotenberg version to use 7.10 and gotenberg-client to match
* Fixes a long standing bug in this test where a whole page was missing from the expected
* Adds new filtering to exclude attachments from processing
* Frontend use include / exclude mail rule filename filters
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Replaces references to docker-compose (the v1 executable) with docker compose (the v2 plugin) as well as fixing up some referenes between the tool vs the command
* Update docs/setup.md
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Replaces references to docker-compose (the v1 executable) with docker compose (the v2 plugin) as well as fixing up some referenes between the tool vs the command
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* (1) Made curl command to download installation script silent while allowing erros to be dispalyed. (2) Made `if ! command -v ${DOCKER_COMPOSE_CMD}` silent as the other checks are as well.
* Made curl options more clear
* legacy barcodes exist which still contain characters after the number. the current logic did not truncate them. instead, int() was called from the remaining string. this does not work in this case. it is therefore sufficient to continue processing numeric characters.
* lint
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Separate admin / manage sections
* Move mail settings to its own component
* Move users and groups to its own component
* Move default permissions to its own settings tab
* Unify list styling, add tour step, refactor components
* Only patch saved views that have changed on settings save
* Update messages.xlf
* Remove unused methods in settings.component.ts
* Drop admin section to bottom of sidebar, cleanup outdated, add docs link to dropdown
* Better visually unify management list & other list pages
* Initial implementation of consumption templates
* Frontend implementation of consumption templates
Testing
* Support consumption template source
* order templates, automatically add permissions
* Support title assignment in consumption templates
* Refactoring, filters to and, show sources on list
Show sources on template list, update some translation strings
Make filters and
minor testing
* Update strings
* Only update django-multiselectfield
* Basic docs, document some methods
* Improve testing coverage, template multi-assignment merges
* Implement share links
Basic implementation of share links
Make certain share link fields not editable, automatically grant permissions on migrate
Updated styling, error messages from expired / deleted links
frontend code linting, reversable sharelink migration
testing coverage
Update translation strings
No links message
* Consolidate file response methods
* improvements to share links on mobile devices
* Refactor share links file_version
* Add docs for share links
* Apply suggestions from code review
* When filtering share links, use the timezone aware now()
* Removes extra call to setup directories for usage in testing
* FIx copied badge display on some browsers
* Move copy to ngx-clipboard library
---------
Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
* Change setting dark mode to use Bootstrap's data-bs-theme attribute
* Update dark mode styling to use Bootstrap's color mode attribute
* Update unit tests and lints
* Fix not reflecting custom theme color
* Remove commented-out code
* fix inverted thumbnails in dark mode & card borders
* prettier
* Fix application of dark mode, tests
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Feature: collate two single-sided scans
Some ADF only support single-sided scans, making scanning
double-sided documents a bit annoying.
This new feature enables Paperless to do most of the work,
by merging two seperate scans into a single one, collating
the even and odd numbered pages.
* Documentation: clarify that collation is disabled by default
* Apply suggestions from code review
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Address code review remarks
* Grammar fixes
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
Update UI tour library
Fix popover padding in tour steps
Add 10px backdrop offset where needed
Refactor tour initialization to use defaults
Make popover-body rule more specific
Update messages.xlf
* Add setting to decide whether the edit dialog should automatically close on save
* Add the actual button to the ui
* Revert "Add the actual button to the ui"
This reverts commit e1f5a8bde0.
* Revert "Add setting to decide whether the edit dialog should automatically close on save"
This reverts commit feef3c909b.
* Add button for save without exit
* Correct save button ordering, ensure perms, update translation strings
* fix e2e tests
* Add unit testing for save / save & close button
---------
Update messages.xlf
Update document-detail.component.spec.ts
Co-Authored-By: shamoon <4887959+shamoon@users.noreply.github.com>
toasts component testing
conditional import of angular setup-jest for vscode-jest support
Update jest.config.js
Create open-documents.service.spec.ts
Add unit tests for all REST services
settings service test
Remove component from settings service test
Create permissions.service.spec.ts
upload documents service tests
Update package.json
Create toast.service.spec.ts
Tasks service test
Statistics widget component tests
Update permissions.service.ts
Create app.component.spec.ts
settings component testing
tasks component unit testing
Management list component generic tests
Some management component tests
document notes component unit tests
Create document-list.component.spec.ts
Create save-view-config-dialog.component.spec.ts
Create filter-editor.component.spec.ts
small and large document cards unit testing
Create bulk-editor.component.spec.ts
document detail unit tests
saving work on documentdetail component spec
Create document-asn.component.spec.ts
dashboard & widgets unit testing
Fix ResizeObserver mock
common component unit tests
fix some merge errors
Update app-frame.component.spec.ts
Create page-header.component.spec.ts
input component unit tests
FilterableDropdownComponent unit testing
and found minor errors
update taskservice unit tests
Edit dialogs unit tests
Create date-dropdown.component.spec.ts
Remove selectors from guard tests
confirm dialog component tests
app frame component test
Miscellaneous component tests
Update document-list-view.service.spec.ts
directives unit tests
Remove unused resizeobserver mock
guard unit tests
Update query-params.spec.ts
try to fix flaky playwright
filter rules utils & testing
Interceptor unit tests
Pipes unit testing
Utils unit tests
Update upload-documents.service.spec.ts
consumer status service tests
Update setup-jest.ts
Create document-list-view.service.spec.ts
Update app-routing.module.ts
* Allow to filter documents by original filename and checksum
This adds filters for the original filename and checksum of documents to
be able to to lazy checks if the file is already stored in paperless.
* Add tests for DelayedQuery
* Add checksum and original_filename to whoosh index and DelayedQuery
* Refactored DelayedQuery to reduce duplicate code
* Choose icontains for checksums as whoosh has no exact match query term
* Bumped index version
* Revert whoosh filtering logic to simpler structure, remove redundant tests
Revert "Revert whoosh filtering logic to simpler structure, remove redundant tests"
This reverts commit 86792174bfbc697f42b72c4b39ee9eba483bb425.
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
When running `pipenv install` locally, `pipenv` triggers a warning that the
lockfile is out of sync, and starts regenerating the `Pipfile.lock` file.
This change syncs these files, and updates dependencies based on a fresh run of
`pipenv lock --dev`.
In line 328, `self.path` is set to a fresh written copy of the source file. This copy has a different timestamp (=now).
When using the source file's timestamp as `create_date`, it makes much more sense to ask for the timestamp from `self.original_path`
* Adding doc on how to setup Fail2ban
* Adding notes concerning log path variable
* Moved Fail2ban to Wiki
* Added "Enhancing security" section to link to wiki
* Update docs/setup.md
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
* Type
---------
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
If the user tried dropping a file onto the paperless-ngx UI, but the page itself had scrolled down a bit, the overlay would have scrolled together with the page.
This commit makes the overlay fixed to the viewport, independent from the scroll position.
This one-word commit was done directly through the GitHub web interface.
The fact that Tags were fetched while the `view_documenttype` permission
was validated caused a MixedContentTypeError, thus the document
consumptio to fail because the list of available tags could not be
fetched.
Have a question? 👉 [Start a new discussion](https://github.com/paperless-ngx/paperless-ngx/discussions/new) or [ask in chat](https://matrix.to/#/#paperlessngx:matrix.org).
### ⚠️ Please remember: issues are for *bugs*
That is, something you believe affects every single user of Paperless-ngx, not just you. If you're not sure, start with one of the other options below.
Before opening an issue, please double check:
Also, note that **Paperless-ngx does not perform OCR itself**, that is handled by other tools. Problems with OCR of specific files should likely be raised 'upstream', see https://github.com/ocrmypdf/OCRmyPDF/issues or https://github.com/tesseract-ocr/tesseract/issues
- type:markdown
attributes:
value:|
#### Have a question? 👉 [Start a new discussion](https://github.com/paperless-ngx/paperless-ngx/discussions/new) or [ask in chat](https://matrix.to/#/#paperlessngx:matrix.org).
#### Before opening an issue, please double check:
- [Existing issues and discussions](https://github.com/paperless-ngx/paperless-ngx/search?q=&type=issues).
- [Existing issues and discussions](https://github.com/paperless-ngx/paperless-ngx/search?q=&type=issues).
- Disable any customer container initialization scripts, if using any
- Disable any customer container initialization scripts, if using
If you encounter issues while installing or configuring Paperless-ngx, please post in the ["Support" section of the discussions](https://github.com/paperless-ngx/paperless-ngx/discussions/new?category=support).
If you encounter issues while installing or configuring Paperless-ngx, please post in the ["Support" section of the discussions](https://github.com/paperless-ngx/paperless-ngx/discussions/new?category=support).
@@ -20,11 +20,16 @@ NOTE: Please check only one box!
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other (please explain)
- [ ] Other (please explain):
## Checklist:
## Checklist:
<!--
NOTE: PRs that do not address the following will not be merged, please do not skip any relevant items.
-->
- [ ] I have read & agree with the [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CONTRIBUTING.md).
- [ ] I have read & agree with the [contributing guidelines](https://github.com/paperless-ngx/paperless-ngx/blob/main/CONTRIBUTING.md).
- [ ] If applicable, I have included testing coverage for new code in this PR, for [backend](https://docs.paperless-ngx.com/development/#testing) and / or [front-end](https://docs.paperless-ngx.com/development/#testing-and-code-style) changes.
- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
- [ ] If applicable, I have checked that all tests pass, see [documentation](https://docs.paperless-ngx.com/development/#back-end-development).
- [ ] If applicable, I have checked that all tests pass, see [documentation](https://docs.paperless-ngx.com/development/#back-end-development).
- [ ] I have run all `pre-commit` hooks, see [documentation](https://docs.paperless-ngx.com/development/#code-formatting-with-pre-commit-hooks).
- [ ] I have run all `pre-commit` hooks, see [documentation](https://docs.paperless-ngx.com/development/#code-formatting-with-pre-commit-hooks).
@@ -11,7 +11,7 @@ If you want to implement something big:
## Python
## Python
Paperless supports python 3.8 and 3.9. We format Python code with [Black](https://github.com/psf/black).
Paperless supports python 3.9 - 3.11. We format Python code with [Black](https://github.com/psf/black).
## Branches
## Branches
@@ -45,7 +45,7 @@ Examples of `non-trivial` PRs might include:
- Additional features
- Additional features
- Large changes to many distinct files
- Large changes to many distinct files
- Breaking or depreciation of existing features
- Breaking or deprecation of existing features
Our community review process for `non-trivial` PRs is the following:
Our community review process for `non-trivial` PRs is the following:
@@ -58,6 +58,13 @@ Our community review process for `non-trivial` PRs is the following:
This process might be slow as community members have different schedules and time to dedicate to the Paperless project. However it ensures community code reviews are as brilliantly thorough as they once were with @jonaswinkler.
This process might be slow as community members have different schedules and time to dedicate to the Paperless project. However it ensures community code reviews are as brilliantly thorough as they once were with @jonaswinkler.
# AI-Generated Code
This project does not specifically prohibit the use of AI-generated code _during the process_ of creating a PR, however:
1. Any code present in the final PR that was generated using AI sources should be clearly attributed as such and must not violate copyright protections.
2. We will not accept PRs that are entirely or mostly AI-derived.
Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, _less paper_.
Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, _less paper_.
Paperless-ngx forked from [paperless-ng](https://github.com/jonaswinkler/paperless-ng) to continue the great work and distribute responsibility of supporting and advancing the project among a team of people. [Consider joining us!](#community-support) Discussion of this transition can be found in issues
Paperless-ngx is the official successor to the original [Paperless](https://github.com/the-paperless-project/paperless) & [Paperless-ng](https://github.com/jonaswinkler/paperless-ng) projects and is designed to distribute the responsibility of advancing and supporting the project among a team of people. [Consider joining us!](#community-support)
[#1599](https://github.com/jonaswinkler/paperless-ng/issues/1599) and [#1632](https://github.com/jonaswinkler/paperless-ng/issues/1632).
A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com) using login `demo` / `demo`. _Note: demo content is reset frequently and confidential information should not be uploaded._
A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com) using login `demo` / `demo`. _Note: demo content is reset frequently and confidential information should not be uploaded._
@@ -33,37 +35,19 @@ A demo is available at [demo.paperless-ngx.com](https://demo.paperless-ngx.com)
- Organize and index your scanned documents with tags, correspondents, types, and more.
A full list of [features](https://docs.paperless-ngx.com/#features) and [screenshots](https://docs.paperless-ngx.com/#screenshots) are available in the [documentation](https://docs.paperless-ngx.com/).
- Performs OCR on your documents, adds selectable text to image only documents and adds tags, correspondents and document types to your documents.
- Supports PDF documents, images, plain text files, and Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents).
- Office document support is optional and provided by Apache Tika (see [configuration](https://docs.paperless-ngx.com/configuration/#tika))
- Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely.
- Single page application front end.
- Includes a dashboard that shows basic statistics and has document upload.
- Filtering by tags, correspondents, types, and more.
- Customizable views can be saved and displayed on the dashboard.
- Full text search helps you find what you need.
- Auto completion suggests relevant words from your documents.
- Results are sorted by relevance to your search query.
- Highlighting shows you which parts of the document matched the query.
- Searching for similar documents ("More like this")
- Email processing: Paperless adds documents from your email accounts.
- Configure multiple accounts and filters for each account.
- When adding documents from mail, paperless can move these mail to a new folder, mark them as read, flag them as important or delete them.
- Machine learning powered document matching.
- Paperless-ngx learns from your documents and will be able to automatically assign tags, correspondents and types to documents once you've stored a few documents in paperless.
- Optimized for multi core systems: Paperless-ngx consumes multiple documents in parallel.
- The integrated sanity checker makes sure that your document archive is in good health.
- [More screenshots are available in the documentation](https://docs.paperless-ngx.com/#screenshots).
# Getting started
# Getting started
The easiest way to deploy paperless is docker-compose. The files in the [`/docker/compose` directory](https://github.com/paperless-ngx/paperless-ngx/tree/main/docker/compose) are configured to pull the image from Github Packages.
The easiest way to deploy paperless is `dockercompose`. The files in the [`/docker/compose` directory](https://github.com/paperless-ngx/paperless-ngx/tree/main/docker/compose) are configured to pull the image from GitHub Packages.
If you'd like to jump right in, you can configure a docker-compose environment with our install script:
If you'd like to jump right in, you can configure a `dockercompose` environment with our install script:
@@ -85,7 +69,7 @@ If you feel like contributing to the project, please do! Bug fixes, enhancements
## Community Support
## Community Support
People interested in continuing the work on paperless-ngx are encouraged to reach out here on github and in the [Matrix Room](https://matrix.to/#/#paperless:adnidor.de). If you would like to contribute to the project on an ongoing basis there are multiple [teams](https://github.com/orgs/paperless-ngx/people) (frontend, ci/cd, etc) that could use your help so please reach out!
People interested in continuing the work on paperless-ngx are encouraged to reach out here on github and in the [Matrix Room](https://matrix.to/#/#paperless:matrix.org). If you would like to contribute to the project on an ongoing basis there are multiple [teams](https://github.com/orgs/paperless-ngx/people) (frontend, ci/cd, etc) that could use your help so please reach out!
## Translation
## Translation
@@ -101,14 +85,7 @@ For bugs please [open an issue](https://github.com/paperless-ngx/paperless-ngx/i
# Affiliated Projects
# Affiliated Projects
Paperless has been around for a while now, and people have built tools that interact with it. If you're one of them, please reach out and we can add your project to the list. Current projects include:
Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Affiliated-Projects) for a user-maintained list of affiliated projects and software that is compatible with Paperless-ngx.
- **Mobile**
- [Paperless App](https://github.com/bauerj/paperless_app): An Android/iOS application for Paperless-ngx.
- [Paperless Mobile](https://github.com/astubenbord/paperless-mobile): A modern, feature rich Android app for Paperless-ngx.
- [Paperless Share](https://github.com/qcasey/paperless_share): Share any files from your Android application with Paperless-ngx. Very simple, but works with all mobile scanning apps that allow you to share scanned documents.
- **Desktop**
- [Scan to Paperless](https://github.com/sbrunner/scan-to-paperless): Scan and prepare (crop, deskew, OCR, ...) your documents for use in Paperless-ngx.
The pre-built wheels of psycopg2 are built on Debian 9, which provides a quite old version of libpq-dev. This causes issue with authentication methods.
### What
The image builds psycopg2 wheels on Debian 10 and places the produced wheels into `/usr/src/wheels/`.
qpdf and it's library provide tools to read, manipulate and fix up PDFs. Version 11 is also required by `pikepdf` 6+ and Debian 9 does not provide above version 10.
### What
The Docker image cross compiles .deb installers for each supported architecture of the main image. The installers are placed in `/usr/src/qpdf/${QPDF_VERSION}/${TARGETARCH}${TARGETVARIANT}/`
@@ -358,6 +387,11 @@ Specify `-i` to have the document retagger work on documents tagged with
inbox tags only. This is useful when you don't want to mess with your
inbox tags only. This is useful when you don't want to mess with your
already processed documents.
already processed documents.
Specify `--id-range 1 100` to have the document retagger work only on a
specific range of document id´s. This can be useful if you have a lot of
documents and want to test the matching rules only on a subset of
documents.
When multiple document types or correspondents match a single document,
When multiple document types or correspondents match a single document,
the retagger won't assign these to the document. Specify `--use-first`
the retagger won't assign these to the document. Specify `--use-first`
to override this behavior and just use the first correspondent or type
to override this behavior and just use the first correspondent or type
@@ -374,7 +408,7 @@ that don't match a document anymore get removed as well.
### Managing the Automatic matching algorithm
### Managing the Automatic matching algorithm
The _Auto_ matching algorithm requires a trained neural network to work.
The _Auto_ matching algorithm requires a trained neural network to work.
This network needs to be updated whenever somethings in your data
This network needs to be updated whenever something in your data
changes. The docker image takes care of that automatically with the task
changes. The docker image takes care of that automatically with the task
scheduler. You can manually renew the classifier by invoking the
scheduler. You can manually renew the classifier by invoking the
following management command:
following management command:
@@ -389,6 +423,9 @@ This command takes no arguments.
Use this command to re-create document thumbnails. Optionally include the ` --document {id}` option to generate thumbnails for a specific document only.
Use this command to re-create document thumbnails. Optionally include the ` --document {id}` option to generate thumbnails for a specific document only.
You may also specify `--processes` to control the number of processes used to generate new thumbnails. The default is to utilize
a quarter of the available processors.
```
```
document_thumbnails
document_thumbnails
```
```
@@ -416,7 +453,7 @@ task scheduler.
### Managing filenames {#renamer}
### Managing filenames {#renamer}
If you use paperless' feature to
If you use paperless' feature to
[assign custom filenames to your documents](/advanced_usage#file-name-handling), you can use this command to move all your files after
[assign custom filenames to your documents](advanced_usage.md#file-name-handling), you can use this command to move all your files after
changing the naming scheme.
changing the naming scheme.
!!! warning
!!! warning
@@ -441,19 +478,19 @@ collection for issues.
The issues detected by the sanity checker are as follows:
The issues detected by the sanity checker are as follows:
- Missing original files.
- Missing original files.
- Missing archive files.
- Missing archive files.
- Inaccessible original files due to improper permissions.
- Inaccessible original files due to improper permissions.
- Inaccessible archive files due to improper permissions.
- Inaccessible archive files due to improper permissions.
- Corrupted original documents by comparing their checksum against
- Corrupted original documents by comparing their checksum against
what is stored in the database.
what is stored in the database.
- Corrupted archive documents by comparing their checksum against what
- Corrupted archive documents by comparing their checksum against what
is stored in the database.
is stored in the database.
- Missing thumbnails.
- Missing thumbnails.
- Inaccessible thumbnails due to improper permissions.
- Inaccessible thumbnails due to improper permissions.
- Documents without any content (warning).
- Documents without any content (warning).
- Orphaned files in the media directory (warning). These are files
- Orphaned files in the media directory (warning). These are files
that are not referenced by any document im paperless.
that are not referenced by any document in paperless.
```
```
document_sanity_checker
document_sanity_checker
@@ -522,7 +559,7 @@ Documents can be stored in Paperless using GnuPG encryption.
!!! warning
!!! warning
Encryption is deprecated since [paperless-ng 0.9](/changelog#paperless-ng-090) and doesn't really
Encryption is deprecated since [paperless-ng 0.9](changelog.md#paperless-ng-090) and doesn't really
provide any additional security, since you have to store the passphrase
provide any additional security, since you have to store the passphrase
in a configuration file on the same system as the encrypted documents
in a configuration file on the same system as the encrypted documents
for paperless to work. Furthermore, the entire text content of the
for paperless to work. Furthermore, the entire text content of the
@@ -543,9 +580,30 @@ Enabling encryption is no longer supported.
Basic usage to disable encryption of your document store:
Basic usage to disable encryption of your document store:
(Note: If `PAPERLESS_PASSPHRASE` isn't set already, you need to specify
(Note: If [`PAPERLESS_PASSPHRASE`](configuration.md#PAPERLESS_PASSPHRASE) isn't set already, you need to specify
it here)
it here)
```
```
decrypt_documents [--passphrase SECR3TP4SSPHRA$E]
decrypt_documents [--passphrase SECR3TP4SSPHRA$E]
```
```
### Detecting duplicates {#fuzzy_duplicate}
Paperless already catches and prevents upload of exactly matching documents,
however a new scan of an existing document may not produce an exact bit for bit
duplicate. But the content should be exact or close, allowing detection.
This tool does a fuzzy match over document content, looking for
those which look close according to a given ratio.
At this time, other metadata (such as correspondent or type) is not
| --ratio | No | 85.0 | a number between 0 and 100, setting how similar a document must be for it to be reported. Higher numbers mean more similarity. |
| --processes | No | 1/4 of system cores | Number of processes to use for matching. Setting 1 disables multiple processes |
Paperless offers a couple features that automate certain tasks and make
Paperless offers a couple of features that automate certain tasks and make
your life easier.
your life easier.
## Matching tags, correspondents, document types, and storage paths {#matching}
## Matching tags, correspondents, document types, and storage paths {#matching}
@@ -35,9 +35,10 @@ The following algorithms are available:
(i.e. preserve ordering) in the PDF.
(i.e. preserve ordering) in the PDF.
- **Regular expression:** Parses the match as a regular expression and
- **Regular expression:** Parses the match as a regular expression and
tries to find a match within the document.
tries to find a match within the document.
- **Fuzzy match:** I don't know. Look at the source.
- **Fuzzy match:** Uses a partial matching based on locating the tag text
inside the document, using a [partial ratio](https://maxbachmann.github.io/RapidFuzz/Usage/fuzz.html#partial-ratio)
- **Auto:** Tries to automatically match new documents. This does not
- **Auto:** Tries to automatically match new documents. This does not
require you to set a match. See the notes below.
require you to set a match. See the [notes below](#automatic-matching).
When using the _any_ or _all_ matching algorithms, you can search for
When using the _any_ or _all_ matching algorithms, you can search for
terms that consist of multiple words by enclosing them in double quotes.
terms that consist of multiple words by enclosing them in double quotes.
@@ -92,7 +93,7 @@ when using this feature:
decide when not to assign a certain tag, correspondent, document
decide when not to assign a certain tag, correspondent, document
type, or storage path. This will usually be the case as you start
type, or storage path. This will usually be the case as you start
filling up paperless with documents. Example: If all your documents
filling up paperless with documents. Example: If all your documents
are either from "Webshop" and "Bank", paperless will assign one
are either from "Webshop" or "Bank", paperless will assign one
of these correspondents to ANY new document, if both are set to
of these correspondents to ANY new document, if both are set to
automatic matching.
automatic matching.
@@ -101,12 +102,12 @@ when using this feature:
Sometimes you may want to do something arbitrary whenever a document is
Sometimes you may want to do something arbitrary whenever a document is
consumed. Rather than try to predict what you may want to do, Paperless
consumed. Rather than try to predict what you may want to do, Paperless
lets you execute scripts of your own choosing just before or after a
lets you execute scripts of your own choosing just before or after a
document is consumed using a couple simple hooks.
document is consumed using a couple of simple hooks.
Just write a script, put it somewhere that Paperless can read & execute,
Just write a script, put it somewhere that Paperless can read & execute,
and then put the path to that script in `paperless.conf` or
and then put the path to that script in `paperless.conf` or
`docker-compose.env` with the variable name of either
`docker-compose.env` with the variable name of either
`PAPERLESS_PRE_CONSUME_SCRIPT` or `PAPERLESS_POST_CONSUME_SCRIPT`.
[`PAPERLESS_PRE_CONSUME_SCRIPT`](configuration.md#PAPERLESS_PRE_CONSUME_SCRIPT) or [`PAPERLESS_POST_CONSUME_SCRIPT`](configuration.md#PAPERLESS_POST_CONSUME_SCRIPT).
!!! info
!!! info
@@ -126,6 +127,7 @@ script can access the following relevant environment variables set:
-`main` always represents the latest release and will only see
-`main` always represents the latest release and will only see
changes when a new release is made.
changes when a new release is made.
-`dev` contains the code that will be in the next release.
-`dev` contains the code that will be in the next release.
-`feature-X` contain bigger changes that will be in some release, but
-`feature-X` contains bigger changes that will be in some release, but
not necessarily the next one.
not necessarily the next one.
When making functional changes to Paperless-ngx, _always_ make your changes
When making functional changes to Paperless-ngx, _always_ make your changes
@@ -58,10 +58,10 @@ first-time setup.
!!! note
!!! note
Every command is executed directly from the root folder of the project unless specified otherwise.
Every command is executed directly from the root folder of the project unless specified otherwise.
1. Install prerequisites + pipenv as mentioned in
1. Install prerequisites + pipenv as mentioned in
[Bare metal route](/setup#bare_metal).
[Bare metal route](setup.md#bare_metal).
2. Copy `paperless.conf.example` to `paperless.conf` and enable debug
2. Copy `paperless.conf.example` to `paperless.conf` and enable debug
mode within the file via `PAPERLESS_DEBUG=true`.
mode within the file via `PAPERLESS_DEBUG=true`.
@@ -177,69 +177,69 @@ The front end is built using AngularJS. In order to get started, you need Node.j
The following commands are all performed in the `src-ui`-directory. You will need a running back end (including an active session) to connect to the back end API. To spin it up refer to the commands under the section [above](#back-end-development).
The following commands are all performed in the `src-ui`-directory. You will need a running back end (including an active session) to connect to the back end API. To spin it up refer to the commands under the section [above](#back-end-development).
1. Install the Angular CLI. You might need sudo privileges
1. Install the Angular CLI. You might need sudo privileges to perform this command:
to perform this command:
```bash
```bash
$ npm install -g @angular/cli
$ npm install -g @angular/cli
```
```
2. Make sure that it's on your path.
2. Make sure that it's on your path.
3. Install all neccessary modules:
3. Install all necessary modules:
```bash
```bash
$ npm install
$ npm install
```
```
4. You can launch a development server by running:
4. You can launch a development server by running:
```bash
```bash
$ ng serve
$ ng serve
```
```
This will automatically update whenever you save. However, in-place
This will automatically update whenever you save. However, in-place
compilation might fail on syntax errors, in which case you need to
compilation might fail on syntax errors, in which case you need to
restart it.
restart it.
By default, the development server is available on `http://localhost:4200/` and is configured to access the API at
By default, the development server is available on `http://localhost:4200/` and is configured to access the API at
`http://localhost:8000/api/`, which is the default of the backend. If you enabled `DEBUG` on the back end, several security overrides for allowed hosts, CORS and X-Frame-Options are in place so that the front end behaves exactly as in production.
`http://localhost:8000/api/`, which is the default of the backend. If you enabled `DEBUG` on the back end, several security overrides for allowed hosts, CORS and X-Frame-Options are in place so that the front end behaves exactly as in production.
### Testing and code style
### Testing and code style
- The front end code (.ts, .html, .scss) use `prettier` for code
The front end code (.ts, .html, .scss) use `prettier` for code
formatting via the Git `pre-commit` hooks which run automatically on
formatting via the Git `pre-commit` hooks which run automatically on
commit. See [above](#code-formatting-with-pre-commit-hooks) for installation instructions. You can also run this via the CLI with a
commit. See [above](#code-formatting-with-pre-commit-hooks) for installation instructions. You can also run this via the CLI with a
@@ -15,103 +15,161 @@ physical documents into a searchable online archive so you can keep, well, _less
</div>
</div>
<divclass="clear"></div>
<divclass="clear"></div>
## Why This Exists
## Features
Paper is a nightmare. Environmental issues aside, there's no excuse for
-**Organize and index** your scanned documents with tags, correspondents, types, and more.
it in the 21st century. It takes up space, collects dust, doesn't
- Performs **OCR** on your documents, adding searchable and selectable text, even to documents scanned with only images.
support any form of a search feature, indexing is tedious, it's heavy
- Utilizes the open-source Tesseract engine to recognize more than 100 languages.
and prone to damage & loss.
- Documents are saved as PDF/A format which is designed for long term storage, alongside the unaltered originals.
- Uses machine-learning to automatically add tags, correspondents and document types to your documents.
- Supports PDF documents, images, plain text files, Office documents (Word, Excel, Powerpoint, and LibreOffice equivalents)[^1] and more.
- Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and their format can be configured freely with different configurations assigned to different documents.
-**Beautiful, modern web application** that features:
- Customizable dashboard with statistics.
- Filtering by tags, correspondents, types, and more.
- Bulk editing of tags, correspondents, types and more.
- Drag-and-drop uploading of documents throughout the app.
- Customizable views can be saved and displayed on the dashboard and / or sidebar.
- Support for custom fields of various data types.
- Shareable public links with optional expiration.
-**Full text search** helps you find what you need:
- Auto completion suggests relevant words from your documents.
- Results are sorted by relevance to your search query.
- Highlighting shows you which parts of the document matched the query.
- Searching for similar documents ("More like this")
-**Email processing**[^1]: import documents from your email accounts:
- Configure multiple accounts and rules for each account.
- After processing, paperless can perform actions on the messages such as marking as read, deleting and more.
- A built-in robust **multi-user permissions** system that supports 'global' permissions as well as per document or object.
- A powerful templating system that gives you more control over the consumption pipeline.
-**Optimized** for multi core systems: Paperless-ngx consumes multiple documents in parallel.
- The integrated sanity checker makes sure that your document archive is in good health.
This software is designed to make "going paperless" easier. No more worrying
[^1]: Office document and email consumption support is optional and provided by Apache Tika (see [configuration](https://docs.paperless-ngx.com/configuration/#tika))
about finding stuff again, feed documents right from the post box into
the scanner and then shred them. Perhaps you might find it useful too.
## Paperless, a history
## Paperless, a history
Paperless is a simple Django application running in two parts: a
Paperless-ngx is the official successor to the original [Paperless](https://github.com/the-paperless-project/paperless) & [Paperless-ng](https://github.com/jonaswinkler/paperless-ng) projects and is designed to distribute the responsibility of advancing and supporting the project among a team of people. [Consider joining us!](https://github.com/paperless-ngx/paperless-ngx#community-support)
_Consumer_ (the thing that does the indexing) and the _Web server_ (the
part that lets you search & download already-indexed documents). If you
want to learn more about its functions keep on reading after the
installation section.
Paperless-ngx is a document management system that transforms your
Further discussion of the transition between these projects can be found at
physical documents into a searchable online archive so you can keep,
[ng#1599](https://github.com/jonaswinkler/paperless-ng/issues/1599) and [ng#1632](https://github.com/jonaswinkler/paperless-ng/issues/1632).
well, _less paper_.
Paperless-ngx forked from paperless-ng to continue the great work and
distribute responsibility of supporting and advancing the project among
a team of people.
NG stands for both Angular (the framework used for the Frontend) and
next-gen. Publishing this project under a different name also avoids
confusion between paperless and paperless-ngx.
If you want to learn about what's different in paperless-ngx from
Paperless, check out these resources in the documentation:
- [Some screenshots](#screenshots) of the new UI are available.
- Read [this section](/advanced_usage#automatic-matching) if you want to learn about how paperless automates all
tagging using machine learning.
- Paperless now comes with a [proper email consumer](/usage#usage-email) that's fully tested and production ready.
- Paperless creates searchable PDF/A documents from whatever you put into the consumption directory. This means
that you can select text in image-only documents coming from your scanner.
- See [this note](/administration#encryption) about GnuPG encryption in paperless-ngx.
- Paperless is now integrated with a
[task processing queue](/setup#task_processor) that tells you at a glance when and why something is not working.
- The [changelog](/changelog) contains a detailed list of all changes in paperless-ngx.
## Screenshots
## Screenshots
This is what Paperless-ngx looks like.
Paperless-ngx aims to be as nice to use as it is useful. Check out some screenshots below.
The dashboard shows customizable views on your document and allows
<divclass="grid-flipped-left"markdown>
document uploads:

</div>
<divclass="grid-flipped-right"markdown>
The dashboard shows saved views which can be sorted. Documents can be uploaded with the button or dropped anywhere in the application.
@@ -131,7 +189,7 @@ People interested in continuing the work on paperless-ngx are encouraged to reac
### Translation
### Translation
Paperless-ngx is available in many languages that are coordinated on [Crowdin](https://crwd.in/paperless-ngx). If you want to help out by translating paperless-ngx into your language, please head over to https://crwd.in/paperless-ngx, and thank you!
Paperless-ngx is available in many languages that are coordinated on [Crowdin](https://crwd.in/paperless-ngx). If you want to help out by translating paperless-ngx into your language, please head over to the [Paperless-ngx project at Crowdin](https://crwd.in/paperless-ngx), and thank you!
c) Set the environment variable `PAPERLESS_REDIS` so it points to
c) Set the environment variable [`PAPERLESS_REDIS`](configuration.md#PAPERLESS_REDIS) so it points to
the new Redis container
the new Redis container
4. Update user mapping
4. Update user mapping
a) If set, change the environment variable `PUID` to `USERMAP_UID`
a) If set, change the environment variable `PUID` to `USERMAP_UID`
b) If set, change the environment variable `PGID` to `USERMAP_GID`
b) If set, change the environment variable `PGID` to `USERMAP_GID`
5. Update configuration paths
5. Update configuration paths
a) Set the environment variable `PAPERLESS_DATA_DIR` to `/config`
a) Set the environment variable [`PAPERLESS_DATA_DIR`](configuration.md#PAPERLESS_DATA_DIR) to `/config`
6. Update media paths
6. Update media paths
a) Set the environment variable `PAPERLESS_MEDIA_ROOT` to
a) Set the environment variable [`PAPERLESS_MEDIA_ROOT`](configuration.md#PAPERLESS_MEDIA_ROOT) to
`/data/media`
`/data/media`
7. Update timezone
7. Update timezone
a) Set the environment variable `PAPERLESS_TIME_ZONE` to the same
a) Set the environment variable [`PAPERLESS_TIME_ZONE`](configuration.md#PAPERLESS_TIME_ZONE) to the same
value as `TZ`
value as `TZ`
8. Modify the `image:` to point to
8. Modify the `image:` to point to
`ghcr.io/paperless-ngx/paperless-ngx:latest` or a specific version
`ghcr.io/paperless-ngx/paperless-ngx:latest` or a specific version
if preferred.
if preferred.
9. Start the containers as before, using `docker-compose`.
9. Start the containers as before, using `dockercompose`.
## Moving data from SQLite to PostgreSQL or MySQL/MariaDB {#sqlite_to_psql}
## Moving data from SQLite to PostgreSQL or MySQL/MariaDB {#sqlite_to_psql}
@@ -712,7 +709,7 @@ below use PostgreSQL, but are applicable to MySQL/MariaDB with the
!!! warning
!!! warning
MySQL is case insensitive by default, treating values like "Name" and
MySQL is case insensitive by default, treating values like "Name" and
"NAME" as identical. See [MySQL caveats](/advanced_usage#mysql-caveats) for details.
"NAME" as identical. See [MySQL caveats](advanced_usage.md#mysql-caveats) for details.
!!! warning
!!! warning
@@ -733,7 +730,7 @@ below use PostgreSQL, but are applicable to MySQL/MariaDB with the
file to `docker-compose.yml`. Remember to adjust the consumption
file to `docker-compose.yml`. Remember to adjust the consumption
directory, if necessary.
directory, if necessary.
b) Without docker, configure the database in your `paperless.conf`
b) Without docker, configure the database in your `paperless.conf`
file. See [configuration](/configuration) for
file. See [configuration](configuration.md) for
details.
details.
3. Open a shell and initialize the database:
3. Open a shell and initialize the database:
@@ -743,7 +740,7 @@ below use PostgreSQL, but are applicable to MySQL/MariaDB with the
``` shell-session
``` shell-session
$ cd /path/to/paperless
$ cd /path/to/paperless
$ docker-compose run --rm webserver /bin/bash
$ dockercompose run --rm webserver /bin/bash
```
```
This will launch the container and initialize the PostgreSQL
This will launch the container and initialize the PostgreSQL
@@ -796,7 +793,7 @@ Execute this:
```shell-session
```shell-session
$ cd /path/to/paperless
$ cd /path/to/paperless
$ docker-compose run --rm webserver migrate documents 0023
$ dockercompose run --rm webserver migrate documents 0023
```
```
Or without docker:
Or without docker:
@@ -817,36 +814,36 @@ the Pi and configuring some options in paperless can help improve
performance immensely:
performance immensely:
- Stick with SQLite to save some resources.
- Stick with SQLite to save some resources.
- Consider setting `PAPERLESS_OCR_PAGES` to 1, so that paperless will
- Consider setting [`PAPERLESS_OCR_PAGES`](configuration.md#PAPERLESS_OCR_PAGES) to 1, so that paperless will
only OCR the first page of your documents. In most cases, this page
only OCR the first page of your documents. In most cases, this page
contains enough information to be able to find it.
contains enough information to be able to find it.
- `PAPERLESS_TASK_WORKERS` and `PAPERLESS_THREADS_PER_WORKER` are
- [`PAPERLESS_TASK_WORKERS`](configuration.md#PAPERLESS_TASK_WORKERS) and [`PAPERLESS_THREADS_PER_WORKER`](configuration.md#PAPERLESS_THREADS_PER_WORKER) are
configured to use all cores. The Raspberry Pi models 3 and up have 4
configured to use all cores. The Raspberry Pi models 3 and up have 4
cores, meaning that paperless will use 2 workers and 2 threads per
cores, meaning that paperless will use 2 workers and 2 threads per
worker. This may result in sluggish response times during
worker. This may result in sluggish response times during
consumption, so you might want to lower these settings (example: 2
consumption, so you might want to lower these settings (example: 2
workers and 1 thread to always have some computing power left for
workers and 1 thread to always have some computing power left for
other tasks).
other tasks).
- Keep `PAPERLESS_OCR_MODE` at its default value `skip` and consider
- Keep [`PAPERLESS_OCR_MODE`](configuration.md#PAPERLESS_OCR_MODE) at its default value `skip` and consider
OCR'ing your documents before feeding them into paperless. Some
OCR'ing your documents before feeding them into paperless. Some
scanners are able to do this!
scanners are able to do this!
- Set `PAPERLESS_OCR_SKIP_ARCHIVE_FILE` to `with_text` to skip archive
- Set [`PAPERLESS_OCR_SKIP_ARCHIVE_FILE`](configuration.md#PAPERLESS_OCR_SKIP_ARCHIVE_FILE) to `with_text` to skip archive
file generation for already ocr'ed documents, or `always` to skip it
file generation for already ocr'ed documents, or `always` to skip it
for all documents.
for all documents.
- If you want to perform OCR on the device, consider using
- If you want to perform OCR on the device, consider using
`PAPERLESS_OCR_CLEAN=none`. This will speed up OCR times and use
`PAPERLESS_OCR_CLEAN=none`. This will speed up OCR times and use
less memory at the expense of slightly worse OCR results.
less memory at the expense of slightly worse OCR results.
- If using docker, consider setting `PAPERLESS_WEBSERVER_WORKERS` to 1. This will save some memory.
- If using docker, consider setting [`PAPERLESS_WEBSERVER_WORKERS`](configuration.md#PAPERLESS_WEBSERVER_WORKERS) to 1. This will save some memory.
- Consider setting `PAPERLESS_ENABLE_NLTK` to false, to disable the
- Consider setting [`PAPERLESS_ENABLE_NLTK`](configuration.md#PAPERLESS_ENABLE_NLTK) to false, to disable the
more advanced language processing, which can take more memory and
more advanced language processing, which can take more memory and
processing time.
processing time.
For details, refer to [configuration](/configuration).
For details, refer to [configuration](configuration.md).
!!! note
!!! note
Updating the
Updating the
[automatic matching algorithm](/advanced_usage#automatic-matching) takes quite a bit of time. However, the update mechanism
[automatic matching algorithm](advanced_usage.md#automatic-matching) takes quite a bit of time. However, the update mechanism
checks if your data has changed before doing the heavy lifting. If you
checks if your data has changed before doing the heavy lifting. If you
experience the algorithm taking too much cpu time, consider changing the
experience the algorithm taking too much cpu time, consider changing the
schedule in the admin interface to daily. You can also manually invoke
schedule in the admin interface to daily. You can also manually invoke
@@ -857,45 +854,8 @@ For details, refer to [configuration](/configuration).
# Using nginx as a reverse proxy {#nginx}
# Using nginx as a reverse proxy {#nginx}
If you want to expose paperless to the internet, you should hide it
Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Using-a-Reverse-Proxy-with-Paperless-ngx#nginx) for user-maintained documentation of using nginx with Paperless-ngx.
behind a reverse proxy with SSL enabled.
In addition to the usual configuration for SSL, the following
# Enhancing security {#security}
configuration is required for paperless to operate:
```nginx
Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Using-Security-Tools-with-Paperless-ngx) for user-maintained documentation of how to configure security tools like Fail2ban with Paperless-ngx.
http {
# Adjust as required. This is the maximum size for file uploads.
# The default value 1M might be a little too small.
client_max_body_size 10M;
server {
location / {
# Adjust host and port as required.
proxy_pass http://localhost:8000/;
# These configuration options are required for WebSockets to work.
This can happen during heavy consumption when using polling. Paperless will handle it correctly and the file
This can happen during heavy consumption when using polling. Paperless will handle it correctly and the file
will still be consumed
will still be consumed
## Consumption fails with "Ghostscript PDF/A rendering failed"
Newer versions of OCRmyPDF will fail if it encounters errors during processing.
This is intentional as the output archive file may differ in unexpected or undesired
ways from the original. As the logs indicate, if you encounter this error you can set
`PAPERLESS_OCR_USER_ARGS: '{"continue_on_soft_render_error": true}'` to try to 'force'
processing documents with this issue.
## Platform-Specific Deployment Troubleshooting
A user-maintained wiki page is available to help troubleshoot issues that may arise when trying to deploy Paperless-ngx on specific platforms, for example SELinux. Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Platform%E2%80%90Specific-Troubleshooting).
@@ -62,14 +62,16 @@ following operations on your documents:
paperless to create archived versions for digital documents, you can
paperless to create archived versions for digital documents, you can
configure that by configuring
configure that by configuring
`PAPERLESS_OCR_SKIP_ARCHIVE_FILE=with_text`. Please read the
`PAPERLESS_OCR_SKIP_ARCHIVE_FILE=with_text`. Please read the
[relevant section in the documentation](/configuration#ocr).
[relevant section in the documentation](configuration.md#ocr).
!!! note
!!! note
No matter which options you choose, Paperless will always store the
No matter which options you choose, Paperless will always store the
original document that it found in the consumption directory or in the
original document that it found in the consumption directory or in the
mail and will never overwrite that document. Archived versions are
mail and will never overwrite that document. Archived versions are
stored alongside the original versions.
stored alongside the original versions. Any files found in the
consumption directory will stored inside the Paperless-ngx file
structure and will not be retained in the consumption directory.
### The consumption directory
### The consumption directory
@@ -77,7 +79,9 @@ The primary method of getting documents into your database is by putting
them in the consumption directory. The consumer waits patiently, looking
them in the consumption directory. The consumer waits patiently, looking
for new additions to this directory. When it finds them,
for new additions to this directory. When it finds them,
the consumer goes about the process of parsing them with the OCR,
the consumer goes about the process of parsing them with the OCR,
indexing what it finds, and storing it in the media directory.
indexing what it finds, and storing it in the media directory. You should
think of this folder as a temporary location, as files will be re-created
inside Paperless-ngx and removed from the consumption folder.
Getting stuff into this directory is up to you. If you're running
Getting stuff into this directory is up to you. If you're running
Paperless on your local computer, you might just want to drag and drop
Paperless on your local computer, you might just want to drag and drop
@@ -88,27 +92,25 @@ Typically, you're looking at an FTP server like
[Proftpd](http://www.proftpd.org/) or a Windows folder share with
[Proftpd](http://www.proftpd.org/) or a Windows folder share with
[Samba](https://www.samba.org/).
[Samba](https://www.samba.org/).
!!! warning
Files found in the consumption directory that are consumed will be
removed from the consumption directory and stored inside the
Paperless-ngx file structure using any settings / storage paths
you have specified. This action is performed as safely as possible
but this means it is expected that files in the consumption
directory will no longer exist (there) after being consumed.
### Web UI Upload
### Web UI Upload
The dashboard has a file drop field to upload documents to paperless.
The dashboard has a button to upload documents to paperless or you
Simply drag a file onto this field or select a file with the file
can simply drag a file anywhere into the app to initiate the consumption
dialog. Multiple files are supported.
process.
You can also upload documents on any other page of the web UI by
dragging-and-dropping files into your browser window.
### Mobile upload {#usage-mobile_upload}
### Mobile upload {#usage-mobile_upload}
The mobile app over at [https://github.com/qcasey/paperless_share](https://github.com/qcasey/paperless_share)
Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Affiliated-Projects) for a user-maintained list of affiliated projects and
allows Android users to share any documents with paperless. This can be
software (e.g. for mobile devices) that is compatible with Paperless-ngx.
combined with any of the mobile scanning apps out there, such as Office
Lens.
Furthermore, there is the [Paperless
App](https://github.com/bauerj/paperless_app) as well, which not only
has document upload, but also document browsing and download features.
Another option is [Paperless Mobile](https://github.com/astubenbord/paperless-mobile), an Android app that supports document upload, scanning, management of labels and more.
### IMAP (Email) {#usage-email}
### IMAP (Email) {#usage-email}
@@ -132,9 +134,9 @@ These rules perform the following:
5. If documents were consumed from a mail, the rule action is performed
5. If documents were consumed from a mail, the rule action is performed
on that mail.
on that mail.
Paperless will completely ignore mails that do not match your filters.
Paperless will check all emails only once and completely ignore messages
It will also only perform the action on mails that it has consumed
that do not match your filters. It will also only perform the rule action
documents from.
on e-mails that it has consumed documents from.
The actions all ensure that the same mail is not consumed twice by
The actions all ensure that the same mail is not consumed twice by
different means. These are as follows:
different means. These are as follows:
@@ -195,46 +197,167 @@ different means. These are as follows:
them further.
them further.
Paperless is set up to check your mails every 10 minutes. This can be
Paperless is set up to check your mails every 10 minutes. This can be
configured via `PAPERLESS_EMAIL_TASK_CRON` (see [software tweaks](/configuration#software_tweaks))
configured via [`PAPERLESS_EMAIL_TASK_CRON`](configuration.md#PAPERLESS_EMAIL_TASK_CRON)
### REST API
### REST API
You can also submit a document using the REST API, see [POSTing documents](/api#file-uploads)
You can also submit a document using the REST API, see [POSTing documents](api.md#file-uploads)
for details.
for details.
## Permissions
## Permissions
As of version 1.13.0 Paperless-ngx added core support for user / group permissions. Permissions is
As of version 1.14.0 Paperless-ngx added core support for user / group permissions. Permissions is
based around an object 'owner' and 'view' and 'edit' permissions can be granted to other users
based around 'global' permissions as well as 'object-level' permissions. Global permissions designate
or groups.
which parts of the application a user can access (e.g. Documents, Tags, Settings) and object-level
determine which objects are visible or editable. All objects have an 'owner' and 'view' and 'edit'
permissions which can be granted to other users or groups. The paperless-ngx permissions system uses
the built-in user model of the backend framework, Django.
Permissions uses the built-in user model of the backend framework, Django.
!!! tip
!!! note
Object-level permissions only apply to the object itself. In other words, setting permissions
for a Tag will _not_ affect the permissions of documents that have the Tag.
After migration to version 1.13.0 all existing documents, tags etc. will have no explicit owner
set which means they will be visible / editable by all users. Once an object has an owner set,
only the owner can explicitly grant / revoke permissions.
!!! note
When first migrating to permissions it is recommended to user a 'superuser' account (which
would usually have been setup during installation) to ensure you have full permissions.
Note that superusers have access to all objects.
Permissions can be set using the new "Permissions" tab when editing documents, or bulk-applied
Permissions can be set using the new "Permissions" tab when editing documents, or bulk-applied
in the UI by selecting documents and choosing the "Permissions" button. Owner can also optionally
in the UI by selecting documents and choosing the "Permissions" button. Owner can also optionally
be set for documents uploaded via the API. Documents consumed via the consumption dir currently
be set for documents uploaded via the API. Documents consumed via the consumption dir currently
do not have an owner set.
do not have an owner set.
!!! note
After migration to version 1.14.0 all existing documents, tags etc. will have no explicit owner
set which means they will be visible / editable by all users. Once an object has an owner set,
only the owner can explicitly grant / revoke permissions.
!!! note
When first migrating to permissions it is recommended to use a 'superuser' account (which
would usually have been setup during installation) to ensure you have full permissions.
Note that superusers have access to all objects.
### Default permissions
Default permissions for documents can be set using consumption templates.
For objects created via the web UI (tags, doc types, etc.) the default is to set the current user
as owner and no extra permissions, but you explicitly set these under Settings > Permissions.
### Users and Groups
### Users and Groups
Paperless-ngx versions after 1.13.0 allow creating and editing users and groups via the 'frontend' UI.
Paperless-ngx versions after 1.14.0 allow creating and editing users and groups via the 'frontend' UI.
These can be found under Settings > Users & Groups, assuming the user has access. If a user is designated
These can be found under Settings > Users & Groups, assuming the user has access. If a user is designated
as a member of a group those permissions will be inherited and this is reflected in the UI. Explicit
as a member of a group those permissions will be inherited and this is reflected in the UI. Explicit
permissions can be granted to limit access to certain parts of the UI (and corresponding API endpoints).
permissions can be granted to limit access to certain parts of the UI (and corresponding API endpoints).
### Password reset
In order to enable the password reset feature you will need to setup an SMTP backend, see
Consumption templates were introduced in v2.0 and allow for finer control over what metadata (tags, doc
types) and permissions (owner, privileges) are assigned to documents during consumption. In general,
templates are applied sequentially (by sort order) but subsequent templates will never override an
assignment from a preceding template. The same is true for mail rules, e.g. if you set the correspondent
in a mail rule any subsequent consumption templates that are applied _will not_ overwrite this. The
exception to this is assignments that can be multiple e.g. tags and permissions, which will be merged.
Consumption templates allow you to filter by:
- Source, e.g. documents uploaded via consume folder, API (& the web UI) and mail fetch
- File name, including wildcards e.g. \*.pdf will apply to all pdfs
- File path, including wildcards. Note that enabling `PAPERLESS_CONSUMER_RECURSIVE` would allow, for
example, automatically assigning documents to different owners based on the upload directory.
- Mail rule. Choosing this option will force 'mail fetch' to be the template source.
!!! note
You must include a file name filter, a path filter or a mail rule filter. Use * for either to apply
to all files.
Consumption templates can assign:
- Title, see [title placeholders](usage.md#title-placeholders) below
- Tags, correspondent, document types
- Document owner
- View and / or edit permissions to users or groups
- Custom fields. Note that no value for the field will be set
### Consumption template permissions
All users who have application permissions for editing consumption templates can see the same set
of templates. In other words, templates themselves intentionally do not have an owner or permissions.
Given their potentially far-reaching capabilities, you may want to restrict access to templates.
Upon migration, existing installs will grant access to consumption templates to users who can add
documents (and superusers who can always access all parts of the app).
### Title placeholders
Consumption template titles can include placeholders, _only for items that are assigned within the template_.
This is because at the time of consumption (when the title is to be set), no automatic tags etc. have been
applied. You can use the following placeholders:
-`{correspondent}`: assigned correspondent name
-`{document_type}`: assigned document type name
-`{owner_username}`: assigned owner username
-`{added}`: added datetime
-`{added_year}`: added year
-`{added_year_short}`: added year
-`{added_month}`: added month
-`{added_month_name}`: added month name
-`{added_month_name_short}`: added month short name
-`{added_day}`: added day
## Custom Fields {#custom-fields}
Paperless-ngx supports the use of custom fields for documents as of v2.0, allowing a user
to optionally attach data to documents which does not fit in the existing set of fields
Paperless-ngx provides.
1. First, create a custom field (under "Manage"), with a given name and data type. This could be something like "Invoice Number" or "Date Paid", with a data type of "Number", "Date", "String", etc.
2. Once created, a field can be used with documents and data stored. To do so, use the "Custom Fields" menu on the document detail page, choose your existing field and click "Add". Once the field is visible in the form you can enter the appropriate
data which will be validated according to the custom field "data type".
3. Fields can be removed by hovering over the field name revealing a "Remove" button.
!!! important
Added / removed fields, as well as any data is not saved to the document until you
actually hit the "Save" button, similar to other changes on the document details page.
!!! note
Once the data type for a field is set, it cannot be changed.
Multiple fields may be attached to a document but the same field name cannot be assigned multiple times to the a single document.
The following custom field types are supported:
-`Text`: any text
-`Boolean`: true / false (check / unchecked) field
-`Date`: date
-`URL`: a valid url
-`Integer`: integer number e.g. 12
-`Number`: float number e.g. 12.3456
-`Monetary`: float number with exactly two decimals, e.g. 12.30
-`Document Link`: reference(s) to other document(s), displayed as links
## Share Links
Paperless-ngx added the abiltiy to create shareable links to files in version 2.0. You can find the button for this on the document detail screen.
- Share links do not require a user to login and thus link directly to a file.
- Links are unique and are of the form `{paperless-url}/share/{randomly-generated-slug}`.
- Links can optionally have an expiration time set.
- After a link expires or is deleted users will be redirected to the regular paperless-ngx login.
!!! tip
If your paperless-ngx instance is behind a reverse-proxy you may want to create an exception to bypass any authentication layers that are part of your setup in order to make links truly publicly-accessible. Of course, do so with caution.
## Best practices {#basic-searching}
## Best practices {#basic-searching}
Paperless offers a couple tools that help you organize your document
Paperless offers a couple tools that help you organize your document
@@ -443,7 +566,7 @@ Once you have scanned in a document, proceed in paperless as follows.
paperless will assign them automatically. After consuming a couple
paperless will assign them automatically. After consuming a couple
documents, you can even ask paperless to *learn* when to assign tags and
documents, you can even ask paperless to *learn* when to assign tags and
correspondents by itself. For details on this feature, see
correspondents by itself. For details on this feature, see
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.