Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab04817bea | ||
|
|
8dde7fa043 | ||
|
|
edfebe18a2 | ||
|
|
0b07c3bd8f | ||
|
|
1483f450ad | ||
|
|
600c13204e | ||
|
|
2073279473 | ||
|
|
d126ecfa4d | ||
|
|
944aaf5438 | ||
|
|
277bf0eb83 | ||
|
|
d57c237980 | ||
|
|
37ade0c6b2 | ||
|
|
28a2479f24 | ||
|
|
6e688a5b82 | ||
|
|
2104e65462 | ||
|
|
c0882e74e2 | ||
|
|
ced6a61869 | ||
|
|
25a0845efd |
No files matched your search
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Something is not working
|
||||||
|
title: "[BUG] Concise description of the issue"
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!---
|
||||||
|
=> Before opening an issue, please check the documentation and see if it helps you resolve your issue: https://paperless-ng.readthedocs.io/en/latest/troubleshooting.html
|
||||||
|
=> Please also make sure that you followed the installation instructions.
|
||||||
|
=> Please search the issues and look for similar issues before opening a bug report.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Webserver logs**
|
||||||
|
```
|
||||||
|
If available, post any logs from the web server related to your issue.
|
||||||
|
```
|
||||||
|
|
||||||
|
**Relevant information**
|
||||||
|
- Host OS of the machine running paperless: [e.g. Archlinux / Ubuntu 20.04]
|
||||||
|
- Browser [e.g. chrome, safari]
|
||||||
|
- Version [e.g. 1.0.0]
|
||||||
|
- Installation method: [docker / bare metal]
|
||||||
|
- Any configuration changes you made in `docker-compose.yml`, `docker-compose.env` or `paperless.conf`.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: "[Feature Request] Consice and clear description of your feature request"
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
=> We already have lots of feature requests open. Please search the existing requests first and look for feature requests similar to yours.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: Other
|
||||||
|
about: Anything that is not a feature request or bug.
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
=> Discussions, Feedback and other suggestions belong in the "Disussion" section and not on the issue tracker.
|
||||||
|
|
||||||
|
-->
|
||||||
@@ -1,4 +1,4 @@
|
|||||||

|
[](https://github.com/jonaswinkler/paperless-ng/actions)
|
||||||
[](https://paperless-ng.readthedocs.io/en/latest/?badge=latest)
|
[](https://paperless-ng.readthedocs.io/en/latest/?badge=latest)
|
||||||
[](https://gitter.im/paperless-ng/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/paperless-ng/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://hub.docker.com/r/jonaswinkler/paperless-ng)
|
[](https://hub.docker.com/r/jonaswinkler/paperless-ng)
|
||||||
@@ -33,6 +33,8 @@ Here's what you get:
|
|||||||
# Features
|
# Features
|
||||||
|
|
||||||
* Performs OCR on your documents, adds selectable text to image only documents and adds tags, correspondents and document types to your documents.
|
* 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://paperless-ng.readthedocs.io/en/latest/configuration.html#tika-settings))
|
||||||
* Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and can be configured freely.
|
* Paperless stores your documents plain on disk. Filenames and folders are managed by paperless and can be configured freely.
|
||||||
* Single page application front end. Should be pretty snappy. Will be mobile friendly in the future.
|
* Single page application front end. Should be pretty snappy. Will be mobile friendly in the future.
|
||||||
* Includes a dashboard that shows basic statistics and has document upload.
|
* Includes a dashboard that shows basic statistics and has document upload.
|
||||||
@@ -54,25 +56,6 @@ If you want to see some screenshots of paperless-ng in action, [some are availab
|
|||||||
|
|
||||||
For a complete list of changes from paperless, check out the [changelog](https://paperless-ng.readthedocs.io/en/latest/changelog.html)
|
For a complete list of changes from paperless, check out the [changelog](https://paperless-ng.readthedocs.io/en/latest/changelog.html)
|
||||||
|
|
||||||
# Roadmap for 1.0
|
|
||||||
|
|
||||||
- Make the front end nice (except mobile).
|
|
||||||
- Fix whatever bugs I and you find.
|
|
||||||
- Make the documentation nice.
|
|
||||||
|
|
||||||
## On the chopping block.
|
|
||||||
|
|
||||||
- **GnuPG encrypion.** [Here's a note about encryption in paperless](https://paperless-ng.readthedocs.io/en/latest/administration.html#managing-encryption). The gist of it is that I don't see which attacks this implementation protects against. It gives a false sense of security to users who don't care about how it works.
|
|
||||||
|
|
||||||
## Wont-do list.
|
|
||||||
|
|
||||||
These features will probably never make it into paperless, since paperless is meant to be an easy to use set-and-forget solution.
|
|
||||||
|
|
||||||
- **Document versions.** I might consider adding the ability to update a document with a newer version, but that's about it. The kind of documents that get added to paperless usually don't change at all.
|
|
||||||
- **Workflows.** I don't see a use case for these, yet.
|
|
||||||
- **Folders.** Tags are superior in just about every way.
|
|
||||||
- **Apps / extension support.** Again, paperless is meant to be simple.
|
|
||||||
|
|
||||||
# Getting started
|
# Getting started
|
||||||
|
|
||||||
The recommended way to deploy paperless is docker-compose. The files in the /docker/hub directory are configured to pull the image from Docker Hub.
|
The recommended way to deploy paperless is docker-compose. The files in the /docker/hub directory are configured to pull the image from Docker Hub.
|
||||||
|
|||||||
+5
-16
@@ -121,27 +121,19 @@ After grabbing the new release and unpacking the contents, do the following:
|
|||||||
dependencies. The dependencies required are listed in the section about
|
dependencies. The dependencies required are listed in the section about
|
||||||
:ref:`bare metal installations <setup-bare_metal>`.
|
:ref:`bare metal installations <setup-bare_metal>`.
|
||||||
|
|
||||||
2. Update python requirements. If you use Pipenv, this is done with the following steps.
|
2. Update python requirements. Keep in mind to activate your virtual environment
|
||||||
|
before that, if you use one.
|
||||||
|
|
||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ pip install --upgrade pipenv
|
$ pip install -r requirements.txt
|
||||||
$ cd /path/to/paperless
|
|
||||||
$ pipenv clean
|
|
||||||
$ pipenv install
|
|
||||||
|
|
||||||
This creates a new virtual environment (or uses your existing environment)
|
|
||||||
and installs all dependencies into it.
|
|
||||||
|
|
||||||
You can also use the included ``requirements.txt`` file instead and create the virtual
|
|
||||||
environment yourself. This file includes exactly the same dependencies.
|
|
||||||
|
|
||||||
3. Migrate the database.
|
3. Migrate the database.
|
||||||
|
|
||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd src
|
$ cd src
|
||||||
$ pipenv run python3 manage.py migrate
|
$ python3 manage.py migrate
|
||||||
|
|
||||||
This might not actually do anything. Not every new paperless version comes with new
|
This might not actually do anything. Not every new paperless version comes with new
|
||||||
database migrations.
|
database migrations.
|
||||||
@@ -195,7 +187,7 @@ or
|
|||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd /path/to/paperless/src
|
$ cd /path/to/paperless/src
|
||||||
$ pipenv run python manage.py <command> <arguments>
|
$ python3 manage.py <command> <arguments>
|
||||||
|
|
||||||
depending on whether you use docker or not.
|
depending on whether you use docker or not.
|
||||||
|
|
||||||
@@ -462,6 +454,3 @@ Basic usage to disable encryption of your document store:
|
|||||||
.. code::
|
.. code::
|
||||||
|
|
||||||
decrypt_documents [--passphrase SECR3TP4SSPHRA$E]
|
decrypt_documents [--passphrase SECR3TP4SSPHRA$E]
|
||||||
|
|
||||||
|
|
||||||
.. _Pipenv: https://pipenv.pypa.io/en/latest/
|
|
||||||
@@ -376,25 +376,24 @@ PAPERLESS_THREADS_PER_WORKER=<num>
|
|||||||
use a higher thread per worker count.
|
use a higher thread per worker count.
|
||||||
|
|
||||||
The default is a balance between the two, according to your CPU core count,
|
The default is a balance between the two, according to your CPU core count,
|
||||||
with a slight favor towards threads per worker, and leaving at least one core
|
with a slight favor towards threads per worker:
|
||||||
free for other tasks:
|
|
||||||
|
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| CPU core count | Workers | Threads |
|
| CPU core count | Workers | Threads |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 1 | 1 | 1 |
|
| 1 | 1 | 1 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 2 | 1 | 1 |
|
| 2 | 2 | 1 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 4 | 1 | 3 |
|
| 4 | 2 | 2 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 6 | 2 | 2 |
|
| 6 | 2 | 3 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 8 | 2 | 3 |
|
| 8 | 2 | 4 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 12 | 3 | 3 |
|
| 12 | 3 | 4 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
| 16 | 3 | 5 |
|
| 16 | 4 | 4 |
|
||||||
+----------------+---------+---------+
|
+----------------+---------+---------+
|
||||||
|
|
||||||
If you only specify PAPERLESS_TASK_WORKERS, paperless will adjust
|
If you only specify PAPERLESS_TASK_WORKERS, paperless will adjust
|
||||||
|
|||||||
+71
-52
@@ -20,45 +20,45 @@ Paperless consists of the following components:
|
|||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd /path/to/paperless/src/
|
$ cd /path/to/paperless/src/
|
||||||
$ pipenv run gunicorn -c /usr/src/paperless/gunicorn.conf.py -b 0.0.0.0:8000 paperless.wsgi
|
$ gunicorn -c ../gunicorn.conf.py -b 0.0.0.0:8000 paperless.wsgi
|
||||||
|
|
||||||
or by any other means such as Apache ``mod_wsgi``.
|
or by any other means such as Apache ``mod_wsgi``.
|
||||||
|
|
||||||
* **The consumer:** This is what watches your consumption folder for documents.
|
* **The consumer:** This is what watches your consumption folder for documents.
|
||||||
However, the consumer itself does not consume really consume your documents anymore.
|
However, the consumer itself does not really consume your documents.
|
||||||
It rather notifies a task processor that a new file is ready for consumption.
|
Now it notifies a task processor that a new file is ready for consumption.
|
||||||
I suppose it should be named differently.
|
I suppose it should be named differently.
|
||||||
This also used to check your emails, but that's now gone elsewhere as well.
|
This was also used to check your emails, but that's now done elsewhere as well.
|
||||||
|
|
||||||
Start the consumer with the management command ``document_consumer``:
|
Start the consumer with the management command ``document_consumer``:
|
||||||
|
|
||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd /path/to/paperless/src/
|
$ cd /path/to/paperless/src/
|
||||||
$ pipenv run python3 manage.py document_consumer
|
$ python3 manage.py document_consumer
|
||||||
|
|
||||||
.. _setup-task_processor:
|
.. _setup-task_processor:
|
||||||
|
|
||||||
* **The task processor:** Paperless relies on `Django Q <https://django-q.readthedocs.io/en/latest/>`_
|
* **The task processor:** Paperless relies on `Django Q <https://django-q.readthedocs.io/en/latest/>`_
|
||||||
for doing much of the heavy lifting. This is a task queue that accepts tasks from
|
for doing most of the heavy lifting. This is a task queue that accepts tasks from
|
||||||
multiple sources and processes tasks in parallel. It also comes with a scheduler that executes
|
multiple sources and processes these in parallel. It also comes with a scheduler that executes
|
||||||
certain commands periodically.
|
certain commands periodically.
|
||||||
|
|
||||||
This task processor is responsible for:
|
This task processor is responsible for:
|
||||||
|
|
||||||
* Consuming documents. When the consumer finds new documents, it notifies the task processor to
|
* Consuming documents. When the consumer finds new documents, it notifies the task processor to
|
||||||
start a consumption task.
|
start a consumption task.
|
||||||
* Consuming emails. It periodically checks your configured accounts for new mails and
|
|
||||||
produces consumption tasks for any documents it finds.
|
|
||||||
* The task processor also performs the consumption of any documents you upload through
|
* The task processor also performs the consumption of any documents you upload through
|
||||||
the web interface.
|
the web interface.
|
||||||
* Maintain the search index and the automatic matching algorithm. These are things that paperless
|
* Consuming emails. It periodically checks your configured accounts for new emails and
|
||||||
|
notifies the task processor to consume the attachment of an email.
|
||||||
|
* Maintaining the search index and the automatic matching algorithm. These are things that paperless
|
||||||
needs to do from time to time in order to operate properly.
|
needs to do from time to time in order to operate properly.
|
||||||
|
|
||||||
This allows paperless to process multiple documents from your consumption folder in parallel! On
|
This allows paperless to process multiple documents from your consumption folder in parallel! On
|
||||||
a modern multi core system, consumption with full ocr is blazing fast.
|
a modern multi core system, this makes the consumption process with full OCR blazingly fast.
|
||||||
|
|
||||||
The task processor comes with a built-in admin interface that you can use to see whenever any of the
|
The task processor comes with a built-in admin interface that you can use to check whenever any of the
|
||||||
tasks fail and inspect the errors (i.e., wrong email credentials, errors during consuming a specific
|
tasks fail and inspect the errors (i.e., wrong email credentials, errors during consuming a specific
|
||||||
file, etc).
|
file, etc).
|
||||||
|
|
||||||
@@ -67,11 +67,11 @@ Paperless consists of the following components:
|
|||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd /path/to/paperless/src/
|
$ cd /path/to/paperless/src/
|
||||||
$ pipenv run python3 manage.py qcluster
|
$ python3 manage.py qcluster
|
||||||
|
|
||||||
* A `redis <https://redis.io/>`_ message broker: This is a really lightweight service that is responsible
|
* A `redis <https://redis.io/>`_ message broker: This is a really lightweight service that is responsible
|
||||||
for getting the tasks from the webserver and consumer to the task scheduler. These run in different
|
for getting the tasks from the webserver and the consumer to the task scheduler. These run in a different
|
||||||
processes (maybe even on different machines!), and therefore, this is necessary.
|
process (maybe even on different machines!), and therefore, this is necessary.
|
||||||
|
|
||||||
* Optional: A database server. Paperless supports both PostgreSQL and SQLite for storing its data.
|
* Optional: A database server. Paperless supports both PostgreSQL and SQLite for storing its data.
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ Paperless consists of the following components:
|
|||||||
Installation
|
Installation
|
||||||
############
|
############
|
||||||
|
|
||||||
You can go multiple routes with setting up and running Paperless:
|
You can go multiple routes to setup and run Paperless:
|
||||||
|
|
||||||
* :ref:`Pull the image from Docker Hub <setup-docker_hub>`
|
* :ref:`Pull the image from Docker Hub <setup-docker_hub>`
|
||||||
* :ref:`Build the Docker image yourself <setup-docker_build>`
|
* :ref:`Build the Docker image yourself <setup-docker_build>`
|
||||||
@@ -87,26 +87,31 @@ You can go multiple routes with setting up and running Paperless:
|
|||||||
* :ref:`Use ansible to install Paperless on your system automatically (bare metal) <setup-ansible>`
|
* :ref:`Use ansible to install Paperless on your system automatically (bare metal) <setup-ansible>`
|
||||||
|
|
||||||
The Docker routes are quick & easy. These are the recommended routes. This configures all the stuff
|
The Docker routes are quick & easy. These are the recommended routes. This configures all the stuff
|
||||||
from above automatically so that it just works and uses sensible defaults for all configuration options.
|
from the above automatically so that it just works and uses sensible defaults for all configuration options.
|
||||||
|
Here you find a cheat-sheet for docker beginners: `CLI Basics <https://sehn.tech/post/devops-with-docker/>`_
|
||||||
|
|
||||||
The bare metal route is more complicated to setup but makes it easier
|
The bare metal route is complicated to setup but makes it easier
|
||||||
should you want to contribute some code back. You need to configure and
|
should you want to contribute some code back. You need to configure and
|
||||||
run the above mentioned components yourself.
|
run the above mentioned components yourself.
|
||||||
|
|
||||||
The ansible route cobines benefits from both options:
|
The ansible route combines benefits of both options:
|
||||||
the setup process is fully automated, reproducible and idempotent,
|
the setup process is fully automated, reproducible and `idempotent <https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#Idempotency>`_,
|
||||||
it includes the same sensible defaults,
|
it includes the same sensible defaults, and it simultaneously provides the flexibility of a bare metal installation.
|
||||||
and it simultaneously provides the flexibility of a bare metal installation.
|
|
||||||
|
.. _CLI Basics: https://sehn.tech/post/devops-with-docker/
|
||||||
|
.. _idempotent: https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#Idempotency
|
||||||
|
|
||||||
.. _setup-docker_hub:
|
.. _setup-docker_hub:
|
||||||
|
|
||||||
Install Paperless from Docker Hub
|
Install Paperless from Docker Hub
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
1. Go to the `/docker/compose directory on the project page <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/compose>`_
|
1. Login with your user and create a folder in your home-directory `mkdir -v ~/paperless-ng` to have a place for your configuration files and consumption directory.
|
||||||
and download one of the ``docker-compose.*.yml`` files, depending on which database backend you
|
|
||||||
|
2. Go to the `/docker/compose directory on the project page <https://github.com/jonaswinkler/paperless-ng/tree/master/docker/compose>`_
|
||||||
|
and download one of the `docker-compose.*.yml` files, depending on which database backend you
|
||||||
want to use. Rename this file to `docker-compose.yml`.
|
want to use. Rename this file to `docker-compose.yml`.
|
||||||
If you want to enable optional support for Office documents, download a file with ``-tika`` in its name.
|
If you want to enable optional support for Office documents, download a file with `-tika` in the file name.
|
||||||
Download the ``docker-compose.env`` file and the ``.env`` file as well and store them
|
Download the ``docker-compose.env`` file and the ``.env`` file as well and store them
|
||||||
in the same directory.
|
in the same directory.
|
||||||
|
|
||||||
@@ -115,25 +120,26 @@ Install Paperless from Docker Hub
|
|||||||
For new installations, it is recommended to use PostgreSQL as the database
|
For new installations, it is recommended to use PostgreSQL as the database
|
||||||
backend.
|
backend.
|
||||||
|
|
||||||
2. Install `Docker`_ and `docker-compose`_.
|
3. Install `Docker`_ and `docker-compose`_.
|
||||||
|
|
||||||
.. caution::
|
.. caution::
|
||||||
|
|
||||||
If you want to use the included ``docker-compose.*.yml`` file, you
|
If you want to use the included ``docker-compose.*.yml`` file, you
|
||||||
need to have at least Docker version **17.09.0** and docker-compose
|
need to have at least Docker version **17.09.0** and docker-compose
|
||||||
version **1.17.0**.
|
version **1.17.0**.
|
||||||
|
To check do: `docker-compose -v` or `docker -v`
|
||||||
|
|
||||||
See the `Docker installation guide`_ on how to install the current
|
See the `Docker installation guide`_ on how to install the current
|
||||||
version of Docker for your operating system or Linux distribution of
|
version of Docker for your operating system or Linux distribution of
|
||||||
choice. To get an up-to-date version of docker-compose, follow the
|
choice. To get the latest version of docker-compose, follow the
|
||||||
`docker-compose installation guide`_ if your package repository doesn't
|
`docker-compose installation guide`_ if your package repository doesn't
|
||||||
include it.
|
include it.
|
||||||
|
|
||||||
.. _Docker installation guide: https://docs.docker.com/engine/installation/
|
.. _Docker installation guide: https://docs.docker.com/engine/installation/
|
||||||
.. _docker-compose installation guide: https://docs.docker.com/compose/install/
|
.. _docker-compose installation guide: https://docs.docker.com/compose/install/
|
||||||
|
|
||||||
3. Modify ``docker-compose.yml`` to your preferences. You may want to change the path
|
4. Modify ``docker-compose.yml`` to your preferences. You may want to change the path
|
||||||
to the consumption directory in this file. Find the line that specifies where
|
to the consumption directory. Find the line that specifies where
|
||||||
to mount the consumption directory:
|
to mount the consumption directory:
|
||||||
|
|
||||||
.. code::
|
.. code::
|
||||||
@@ -149,31 +155,35 @@ Install Paperless from Docker Hub
|
|||||||
Don't change the part after the colon or paperless wont find your documents.
|
Don't change the part after the colon or paperless wont find your documents.
|
||||||
|
|
||||||
|
|
||||||
4. Modify ``docker-compose.env``, following the comments in the file. The
|
5. Modify ``docker-compose.env``, following the comments in the file. The
|
||||||
most important change is to set ``USERMAP_UID`` and ``USERMAP_GID``
|
most important change is to set ``USERMAP_UID`` and ``USERMAP_GID``
|
||||||
to the uid and gid of your user on the host system. This ensures that
|
to the uid and gid of your user on the host system. This ensures that
|
||||||
both the docker container and you on the host machine have write access
|
both the docker container and you on the host machine have write access
|
||||||
to the consumption directory. If your UID and GID on the host system is
|
to the consumption directory. If your UID and GID on the host system is
|
||||||
1000 (the default for the first normal user on most systems), it will
|
1000 (the default for the first normal user on most systems), it will
|
||||||
work out of the box without any modifications.
|
work out of the box without any modifications. `id "username"` to check.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
You can use any settings from the file ``paperless.conf.example`` in this file.
|
You can copy any setting from the file ``paperless.conf.example`` and paste it here.
|
||||||
Have a look at :ref:`configuration` to see whats available.
|
Have a look at :ref:`configuration` to see what's available.
|
||||||
|
|
||||||
.. caution::
|
.. caution::
|
||||||
|
|
||||||
Certain file systems such as NFS network shares don't support file system
|
Some file systems such as NFS network shares don't support file system
|
||||||
notifications with ``inotify``. When storing the consumption directory
|
notifications with ``inotify``. When storing the consumption directory
|
||||||
on such a file system, paperless will be unable to pick up new files
|
on such a file system, paperless will not pick up new files
|
||||||
with the default configuration. You will need to use ``PAPERLESS_CONSUMER_POLLING``,
|
with the default configuration. You will need to use ``PAPERLESS_CONSUMER_POLLING``,
|
||||||
which will disable inotify. See :ref:`here <configuration-polling>`.
|
which will disable inotify. See :ref:`here <configuration-polling>`.
|
||||||
|
|
||||||
|
6. Now head over to: https://hub.docker.com/r/jonaswinkler/paperless-ng and choose your preferred
|
||||||
|
image and copy the link. To download this image do a `docker pull` followed by the link. Do this within the directory with the .yml files.
|
||||||
|
Depending on your network connection and CPU this will take a while. You have time to get a beverage.
|
||||||
|
|
||||||
5. Run ``docker-compose up -d``. This will create and start the necessary
|
7. Run ``docker-compose up -d``. This will create and start the necessary
|
||||||
containers.
|
containers, but your are not done yet!
|
||||||
|
|
||||||
6. To be able to login, you will need a super user. To create it, execute the
|
8. To be able to login, you will need a super user. To create it, execute the
|
||||||
following command:
|
following command:
|
||||||
|
|
||||||
.. code-block:: shell-session
|
.. code-block:: shell-session
|
||||||
@@ -181,12 +191,12 @@ Install Paperless from Docker Hub
|
|||||||
$ docker-compose run --rm webserver createsuperuser
|
$ docker-compose run --rm webserver createsuperuser
|
||||||
|
|
||||||
This will prompt you to set a username, an optional e-mail address and
|
This will prompt you to set a username, an optional e-mail address and
|
||||||
finally a password.
|
finally a password (at least 8 characters).
|
||||||
|
|
||||||
7. The default ``docker-compose.yml`` exports the webserver on your local port
|
9. The default ``docker-compose.yml`` exports the webserver on your local port
|
||||||
8000. If you haven't adapted this, you should now be able to visit your
|
8000. If you haven't adapted this, you should now be able to visit your
|
||||||
Paperless instance at ``http://127.0.0.1:8000``. You can login with the
|
Paperless instance at ``http://127.0.0.1:8000`` or your servers IP-Address:8000.
|
||||||
user and password you just created.
|
Use the login credentials you have created with the previous step.
|
||||||
|
|
||||||
.. _Docker: https://www.docker.com/
|
.. _Docker: https://www.docker.com/
|
||||||
.. _docker-compose: https://docs.docker.com/compose/install/
|
.. _docker-compose: https://docs.docker.com/compose/install/
|
||||||
@@ -245,7 +255,7 @@ writing. Windows is not and will never be supported.
|
|||||||
1. Install dependencies. Paperless requires the following packages.
|
1. Install dependencies. Paperless requires the following packages.
|
||||||
|
|
||||||
* ``python3`` 3.6, 3.7, 3.8 (3.9 is untested).
|
* ``python3`` 3.6, 3.7, 3.8 (3.9 is untested).
|
||||||
* ``python3-pip``, optionally ``pipenv`` for package installation
|
* ``python3-pip``
|
||||||
* ``python3-dev``
|
* ``python3-dev``
|
||||||
|
|
||||||
* ``fonts-liberation`` for generating thumbnails for plain text files
|
* ``fonts-liberation`` for generating thumbnails for plain text files
|
||||||
@@ -314,8 +324,13 @@ writing. Windows is not and will never be supported.
|
|||||||
|
|
||||||
Adjust as necessary if you configured different folders.
|
Adjust as necessary if you configured different folders.
|
||||||
|
|
||||||
7. Install python requirements. Paperless comes with both Pipfiles for ``pipenv`` as well as with a ``requirements.txt``.
|
7. Install python requirements from the ``requirements.txt`` file.
|
||||||
Both will install exactly the same requirements. It is up to you if you wish to use a virtual environment or not.
|
It is up to you if you wish to use a virtual environment or not.
|
||||||
|
|
||||||
|
.. code:: shell-session
|
||||||
|
|
||||||
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
8. Go to ``/opt/paperless/src``, and execute the following commands:
|
8. Go to ``/opt/paperless/src``, and execute the following commands:
|
||||||
|
|
||||||
@@ -339,7 +354,8 @@ writing. Windows is not and will never be supported.
|
|||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
This is a development server which should not be used in
|
This is a development server which should not be used in
|
||||||
production.
|
production. It is not audited for security and performance
|
||||||
|
is inferior to production ready web servers.
|
||||||
|
|
||||||
.. hint::
|
.. hint::
|
||||||
|
|
||||||
@@ -354,6 +370,11 @@ writing. Windows is not and will never be supported.
|
|||||||
``consumer`` script to watch the input folder, and the ``scheduler``
|
``consumer`` script to watch the input folder, and the ``scheduler``
|
||||||
script to run tasks such as email checking and document consumption.
|
script to run tasks such as email checking and document consumption.
|
||||||
|
|
||||||
|
You may need to adjust the path to the ``gunicorn`` executable. This
|
||||||
|
will be installed as part of the python dependencies, and is either located
|
||||||
|
in the ``bin`` folder of your virtual environment, or in ``~/.local/bin/`` if
|
||||||
|
no virtual environment is used.
|
||||||
|
|
||||||
These services rely on redis and optionally the database server, but
|
These services rely on redis and optionally the database server, but
|
||||||
don't need to be started in any particular order. The example files
|
don't need to be started in any particular order. The example files
|
||||||
depend on redis being started. If you use a database server, you should
|
depend on redis being started. If you use a database server, you should
|
||||||
@@ -638,14 +659,12 @@ management commands as below.
|
|||||||
|
|
||||||
This will launch the container and initialize the PostgreSQL database.
|
This will launch the container and initialize the PostgreSQL database.
|
||||||
|
|
||||||
b) Without docker, open a shell in your virtual environment, switch to
|
b) Without docker, remember to activate any virtual environment, switch to
|
||||||
the ``src`` directory and create the database schema:
|
the ``src`` directory and create the database schema:
|
||||||
|
|
||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
$ cd /path/to/paperless
|
$ cd /path/to/paperless/src
|
||||||
$ pipenv shell
|
|
||||||
$ cd src
|
|
||||||
$ python3 manage.py migrate
|
$ python3 manage.py migrate
|
||||||
|
|
||||||
This will not copy any data yet.
|
This will not copy any data yet.
|
||||||
@@ -662,7 +681,7 @@ management commands as below.
|
|||||||
|
|
||||||
$ python3 manage.py loaddata data.json
|
$ python3 manage.py loaddata data.json
|
||||||
|
|
||||||
6. Exit the shell.
|
6. If operating inside Docker, you may exit the shell now.
|
||||||
|
|
||||||
.. code:: shell-session
|
.. code:: shell-session
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,22 @@ Consumer fails to pickup any new files
|
|||||||
######################################
|
######################################
|
||||||
|
|
||||||
If you notice that the consumer will only pickup files in the consumption
|
If you notice that the consumer will only pickup files in the consumption
|
||||||
directory at startup, but won't find any other files added later, check out
|
directory at startup, but won't find any other files added later, you will need to
|
||||||
the configuration file and enable filesystem polling with the setting
|
enable filesystem polling with the configuration option
|
||||||
``PAPERLESS_CONSUMER_POLLING``.
|
``PAPERLESS_CONSUMER_POLLING``, see :ref:`here <configuration-polling>`.
|
||||||
|
|
||||||
This will disable listening to filesystem changes with inotify and paperless will
|
This will disable listening to filesystem changes with inotify and paperless will
|
||||||
manually check the consumption directory for changes instead.
|
manually check the consumption directory for changes instead.
|
||||||
|
|
||||||
|
|
||||||
|
Paperless always redirects to /admin
|
||||||
|
####################################
|
||||||
|
|
||||||
|
You probably had the old paperless installed at some point. Paperless installed
|
||||||
|
a permanent redirect to /admin in your browser, and you need to clear your
|
||||||
|
browsing data / cache to fix that.
|
||||||
|
|
||||||
|
|
||||||
Operation not permitted
|
Operation not permitted
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
@@ -64,6 +73,24 @@ This may have two reasons:
|
|||||||
with Inbox tags. Verify that there are documents in your archive without inbox tags.
|
with Inbox tags. Verify that there are documents in your archive without inbox tags.
|
||||||
The algorithm will only learn from documents not in your inbox.
|
The algorithm will only learn from documents not in your inbox.
|
||||||
|
|
||||||
|
UserWarning in sklearn on every single document
|
||||||
|
###############################################
|
||||||
|
|
||||||
|
You may encounter warnings like this:
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
/usr/local/lib/python3.7/site-packages/sklearn/base.py:315:
|
||||||
|
UserWarning: Trying to unpickle estimator CountVectorizer from version 0.23.2 when using version 0.24.0.
|
||||||
|
This might lead to breaking code or invalid results. Use at your own risk.
|
||||||
|
|
||||||
|
This happens when certain dependencies of paperless that are responsible for the auto matching algorithm are
|
||||||
|
updated. After updating these, your current training data *might* not be compatible anymore. This can be ignored
|
||||||
|
in most cases. This warning will disappear automatically when paperless updates the training data.
|
||||||
|
|
||||||
|
If you want to get rid of the warning or actually experience issues with automatic matching, delete
|
||||||
|
the file ``classification_model.pickle`` in the data directory and let paperless recreate it.
|
||||||
|
|
||||||
Permission denied errors in the consumption directory
|
Permission denied errors in the consumption directory
|
||||||
#####################################################
|
#####################################################
|
||||||
|
|
||||||
@@ -78,3 +105,47 @@ Ensure that ``USERMAP_UID`` and ``USERMAP_GID`` are set to the user id and group
|
|||||||
different from ``1000``. See :ref:`setup-docker_hub`.
|
different from ``1000``. See :ref:`setup-docker_hub`.
|
||||||
|
|
||||||
Also ensure that you are able to read and write to the consumption directory on the host.
|
Also ensure that you are able to read and write to the consumption directory on the host.
|
||||||
|
|
||||||
|
Web-UI stuck at "Loading..."
|
||||||
|
############################
|
||||||
|
|
||||||
|
This might have multiple reasons.
|
||||||
|
|
||||||
|
|
||||||
|
1. If you built the docker image yourself or deployed using the bare metal route,
|
||||||
|
make sure that there are files in ``<paperless-root>/static/frontend/<lang-code>/``.
|
||||||
|
If there are no files, make sure that you executed ``collectstatic`` successfully, either
|
||||||
|
manually or as part of the docker image build.
|
||||||
|
|
||||||
|
If the front end is still missing, make sure that the front end is compiled (files present in
|
||||||
|
``src/documents/static/frontend``). If it is not, you need to compile the front end yourself
|
||||||
|
or download the release archive instead of cloning the repository.
|
||||||
|
|
||||||
|
2. Check the output of the web server. You might see errors like this:
|
||||||
|
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
[2021-01-25 10:08:04 +0000] [40] [ERROR] Socket error processing request.
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 134, in handle
|
||||||
|
self.handle_request(listener, req, client, addr)
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 190, in handle_request
|
||||||
|
util.reraise(*sys.exc_info())
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 625, in reraise
|
||||||
|
raise value
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 178, in handle_request
|
||||||
|
resp.write_file(respiter)
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/http/wsgi.py", line 396, in write_file
|
||||||
|
if not self.sendfile(respiter):
|
||||||
|
File "/usr/local/lib/python3.7/site-packages/gunicorn/http/wsgi.py", line 386, in sendfile
|
||||||
|
sent += os.sendfile(sockno, fileno, offset + sent, count)
|
||||||
|
OSError: [Errno 22] Invalid argument
|
||||||
|
|
||||||
|
To fix this issue, add
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
SENDFILE=0
|
||||||
|
|
||||||
|
to your `docker-compose.env` file.
|
||||||
@@ -20,7 +20,7 @@ class TestSettings(TestCase):
|
|||||||
self.assertEqual(default_threads, 1)
|
self.assertEqual(default_threads, 1)
|
||||||
|
|
||||||
def test_workers_threads(self):
|
def test_workers_threads(self):
|
||||||
for i in range(2, 64):
|
for i in range(1, 64):
|
||||||
with mock.patch("paperless.settings.multiprocessing.cpu_count") as cpu_count:
|
with mock.patch("paperless.settings.multiprocessing.cpu_count") as cpu_count:
|
||||||
cpu_count.return_value = i
|
cpu_count.return_value = i
|
||||||
|
|
||||||
@@ -31,4 +31,4 @@ class TestSettings(TestCase):
|
|||||||
self.assertTrue(default_workers >= 1)
|
self.assertTrue(default_workers >= 1)
|
||||||
self.assertTrue(default_threads >= 1)
|
self.assertTrue(default_threads >= 1)
|
||||||
|
|
||||||
self.assertTrue(default_workers * default_threads < i, f"{i}")
|
self.assertTrue(default_workers * default_threads <= i, f"{i}")
|
||||||
@@ -354,8 +354,10 @@ LOGGING = {
|
|||||||
|
|
||||||
def default_task_workers():
|
def default_task_workers():
|
||||||
# always leave one core open
|
# always leave one core open
|
||||||
available_cores = max(multiprocessing.cpu_count() - 1, 1)
|
available_cores = max(multiprocessing.cpu_count(), 1)
|
||||||
try:
|
try:
|
||||||
|
if available_cores < 4:
|
||||||
|
return available_cores
|
||||||
return max(
|
return max(
|
||||||
math.floor(math.sqrt(available_cores)),
|
math.floor(math.sqrt(available_cores)),
|
||||||
1
|
1
|
||||||
@@ -376,7 +378,7 @@ Q_CLUSTER = {
|
|||||||
|
|
||||||
def default_threads_per_worker(task_workers):
|
def default_threads_per_worker(task_workers):
|
||||||
# always leave one core open
|
# always leave one core open
|
||||||
available_cores = max(multiprocessing.cpu_count() - 1, 1)
|
available_cores = max(multiprocessing.cpu_count(), 1)
|
||||||
try:
|
try:
|
||||||
return max(
|
return max(
|
||||||
math.floor(available_cores / task_workers),
|
math.floor(available_cores / task_workers),
|
||||||
|
|||||||
Reference in new issue
Block a user