Merge branch 'dev' into feature-permissions

This commit is contained in:
Michael Shamoon
2023-01-25 09:58:36 -08:00
24 changed files with 97 additions and 552 deletions

View File

@@ -152,9 +152,11 @@ following:
```shell-session
$ cd src
$ python3 manage.py migrate
$ python3 manage.py migrate # (1)
```
1. Including `sudo -Hu <paperless_user>` may be required
This might not actually do anything. Not every new paperless version
comes with new database migrations.
@@ -210,9 +212,11 @@ Bare metal:
```shell-session
$ cd /path/to/paperless/src
$ python3 manage.py <command> <arguments>
$ python3 manage.py <command> <arguments> # (1)
```
1. Including `sudo -Hu <paperless_user>` may be required
All commands have built-in help, which can be accessed by executing them
with the argument `--help`.

View File

@@ -217,6 +217,11 @@ not include a trailing slash. E.g. <https://paperless.domain.com>
Defaults to empty string, leaving the other settings unaffected.
!!! note
This value cannot contain a path (e.g. domain.com/path), even if
you are installing paperless-ngx at a subpath.
`PAPERLESS_CSRF_TRUSTED_ORIGINS=<comma-separated-list>`
: A list of trusted origins for unsafe requests (e.g. POST). As of
@@ -711,7 +716,7 @@ for details on how to set it.
: Enables or disables the advanced natural language processing
used during automatic classification. If disabled, paperless will
still preform some basic text pre-processing before matching.
still perform some basic text pre-processing before matching.
: See also `PAPERLESS_NLTK_DIR`.

View File

@@ -248,7 +248,7 @@ Testing and code style:
In order to build the front end and serve it as part of django, execute
```shell-session
$ ng build --prod
$ ng build --configuration production
```
This will build the front end and put it in a location from which the

View File

@@ -46,7 +46,7 @@ steps described in [Docker setup](#docker_hub) automatically.
page](https://github.com/paperless-ngx/paperless-ngx/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`. If you want to enable
file to `docker-compose.yml`. 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
@@ -64,8 +64,7 @@ steps described in [Docker setup](#docker_hub) automatically.
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
version **1.17.0**. To check do: `docker-compose -v` or
`docker -v`
version **1.17.0**. To check do: `docker-compose -v` or `docker -v`
See the [Docker installation guide](https://docs.docker.com/engine/install/) on how to install the current
version of Docker for your operating system or Linux distribution of
@@ -144,7 +143,7 @@ steps described in [Docker setup](#docker_hub) automatically.
!!! note
You can copy any setting from the file `paperless.conf.example` and
paste it here. Have a look at [configuration](/configuration] to see what's available.
paste it here. Have a look at [configuration](/configuration) to see what's available.
!!! note
@@ -306,14 +305,34 @@ supported.
extension](https://code.djangoproject.com/wiki/JSON1Extension) is
enabled. This is usually the case, but not always.
4. Get the release archive from
<https://github.com/paperless-ngx/paperless-ngx/releases>. Extract the
archive to a place from where you wish to execute it, such as
`/opt/paperless`. If you clone the git repo as it is, you also have to
4. Create a system user with a new home folder under which you wish
to run paperless.
```shell-session
adduser paperless --system --home /opt/paperless --group
```
5. Get the release archive from
<https://github.com/paperless-ngx/paperless-ngx/releases> for example with
```shell-session
curl -O -L https://github.com/paperless-ngx/paperless-ngx/releases/download/v1.10.2/paperless-ngx-v1.10.2.tar.xz
```
Extract the archive with
```shell-session
tar -xf paperless-ngx-v1.10.2.tar.xz
```
and copy the contents to the
home folder of the user you created before (`/opt/paperless`).
Optional: If you cloned the git repo, you will have to
compile the frontend yourself, see [here](/development#front-end-development)
and use the `build` step, not `serve`.
5. Configure paperless. See [configuration](/configuration) for details.
6. Configure paperless. See [configuration](/configuration) for details.
Edit the included `paperless.conf` and adjust the settings to your
needs. Required settings for getting
paperless running are:
@@ -346,20 +365,27 @@ supported.
documents are written in.
- Set `PAPERLESS_TIME_ZONE` to your local time zone.
6. Create a system user under which you wish to run paperless.
```shell-session
adduser paperless --system --home /opt/paperless --group
```
7. Ensure that these directories exist and that the paperless user has
write permissions to the following directories:
7. Create the following directories if they are missing:
- `/opt/paperless/media`
- `/opt/paperless/data`
- `/opt/paperless/consume`
Adjust as necessary if you configured different folders.
Ensure that the paperless user has write permissions for every one
of these folders with
```shell-session
ls -l -d /opt/paperless/media
```
If needed, change the owner with
```shell-session
sudo chown paperless:paperless /opt/paperless/media
sudo chown paperless:paperless /opt/paperless/data
sudo chown paperless:paperless /opt/paperless/consume
```
8. Install python requirements from the `requirements.txt` file. It is
up to you if you wish to use a virtual environment or not. First you
@@ -389,11 +415,15 @@ supported.
10. Optional: Test that paperless is working by executing
```bash
# This collects static files from paperless and django.
# Manually starts the webserver
sudo -Hu paperless python3 manage.py runserver
```
and pointing your browser to <http://localhost:8000/>.
and pointing your browser to http://localhost:8000 if
accessing from the same devices on which paperless is installed.
If accessing from another machine, set up systemd services. You may need
to set `PAPERLESS_DEBUG=true` in order for the development server to work
normally in your browser.
!!! warning
@@ -444,6 +474,14 @@ supported.
For instructions on how to use nginx for that,
[see the instructions below](/setup#nginx).
!!! warning
If celery won't start (check with
`sudo systemctl status paperless-task-queue.service` for
paperless-task-queue.service and paperless-scheduler.service
) you need to change the path in the files. Example:
`ExecStart=/opt/paperless/.local/bin/celery --app paperless worker --loglevel INFO`
12. Optional: Install a samba server and make the consumption folder
available as a network share.
@@ -738,7 +776,9 @@ with a few simple steps.
Paperless-ngx modified the database schema slightly, however, these
changes can be reverted while keeping your current data, so that your
current data will be compatible with original Paperless.
current data will be compatible with original Paperless. Thumbnails
were also changed from PNG to WEBP format and will need to be
re-generated.
Execute this:
@@ -754,9 +794,9 @@ $ cd /path/to/paperless/src
$ python3 manage.py migrate documents 0023
```
After that, you need to clear your cookies (Paperless-ngx comes with
updated dependencies that do cookie-processing differently) and probably
your cache as well.
After regenerating thumbnails, you'll need to clear your cookies
(Paperless-ngx comes with updated dependencies that do cookie-processing
differently) and probably your cache as well.
# Considerations for less powerful devices {#less-powerful-devices}
@@ -835,6 +875,7 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
add_header P3P 'CP=""'; # may not be required in all setups
}
}
}

View File

@@ -108,6 +108,8 @@ 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}
You can tell paperless-ngx to consume documents from your email