Skip to content

Commit

Permalink
docs(paperless-ngx) Update How to Guide & remove TrueNAS reference (#…
Browse files Browse the repository at this point in the history
…32926)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Update Paperless-ngx How to Guide & remove TrueNAS references.

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code
- [x] 📜 Documentation Changes

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [x] 📄 I have made changes to the documentation
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or
`fix(docs):`

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Alfred Göppel <43101280+alfi0812@users.noreply.github.com>
Co-authored-by: Alfred Göppel <43101280+alfi0812@users.noreply.github.com>
  • Loading branch information
itconstruct and alfi0812 authored Mar 6, 2025
1 parent 90f14b3 commit 570d476
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 81 deletions.
116 changes: 35 additions & 81 deletions charts/stable/paperless-ngx/docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,12 @@ title: Setup Guide
---

**Paperless-ngx** is an open-source document management system that transforms your physical documents into a searchable
online archive. Our app is a simple way to install it on your TrueNAS SCALE server.

## Requirements

- Installation of the TrueCharts Catalog, starting [here](/ and the required operators (Prometheus-Operator and Cloudnative-PG).
- Paperless-ngx TrueCharts Chart
online archive.

## Media Storage

- If you plan on importing documents into Paperless-ngx via a network share, for example from a computer or scanner, it
is recommended to set up an `NFS Share` for the shared folder. See the [NFS Shares
guide](/ for further information.

## Install Paperless inside TrueNAS SCALE

- Select `Apps` inside the TrueNAS menu.
- Choose the `Available Applications` tab.
- Search for `paperless-ngx`.

![Search paperless-ngx](./img/search_paperless-ngx.png)

- Click the `Install` button, you'll be prompted to set up Paperless-ngx. You can leave most options at their default
values, but:
- Check that the `Timezone` is set correctly for this app.
- Provide `PAPERLESS_ADMIN_USER`, `PAPERLESS_ADMIN_PASSWORD` and `PAPERLESS_ADMIN_MAIL`, those will only apply on
installation, you can change them later in the app.
- Enter the URL your Paperless-ngx will be accessible under in `PAPERLESS_URL` if you plan on making your app
accessible from the web.
- If you have set up Traefik for ingress click `Enable Ingress` and enter your
Paperless-ngx domain in the Hosts section.

![Configure paperless-ngx](./img/configure_paperless-ngx.png)

Scroll to the bottom of the window and click `Save`. Once you hit Save Paperless-ngx will be donwloaded and configured.

Switch back to the `Installed Applications` tab, and wait for the application to switch from `Deploying` to `Active`.
Once `paperless-ngx` shows `Active` you can click its `Open` button to launch to its login screen. Use the initial Admin
credentials you provided in the configuration to login.
is recommended to set up an `NFS Share` for the shared folder.

### Configure additional OCR languages

Expand All @@ -58,47 +26,45 @@ information, and note if you need this configured too.

In addition to document uploads via the Web UI, Paperless-ngx can import documents from a [consumption
directory](https://docs.paperless-ngx.com/usage/#the-consumption-directory). This would allow you to move new documents
to a shared folder on your TrueNAS SCALE from your computer or directly from your scanner and Paperless-ngx would pick
to an NFS share from your PC or directly from your scanner and Paperless-ngx would pick
up the documents from there. See the explanation of the feature linked above and its [configuration
options](https://docs.paperless-ngx.com/configuration/#consume_config) for more information.

Due to the [Hast Path Validation Safety](/ checks of TrueNAS
SCALE, using storage for an application on your TrueNAS SCALE and with a network share at the same time requires a bit
of work. See also the [FAQ](/general/faq/) regarding this
topic.

This guide will only describe the Paperless-ngx specific options required to set up importing documents from a network
share. Please refer to Part 1 of the [NFS shares with TrueChart apps guide](/ to prepare
the NFS share you want to use with Paperless-ngx and note its path. Refer to the [TrueNAS SCALE adding SMB shares
guide](https://www.truenas.com/docs/scale/scaletutorials/shares/smb/addsmbshares/) to set up network sharing of that
same folder for Windows computers or scanners offering this functionality.
share. Please refer to your NAS documentation.

In addition to adding the NFS share to the Paperless-ngx application we need to configure polling for the import folder.
The NFS Share and TrueNAS SCALE applications do not support the default polling model Paperless-ngx uses.

Once you have set up the NFS share, configure your Paperless-ngx installation as follows:

- Select `Apps` inside the TrueNAS menu.
- You should be on the `Installed Applications` tab.
- Look for your `paperless-ngx` installation.
- Click the 3-button menu in its box and select `Edit`. This will open the application configuration pane similar to the
configuration page on installation.
- Scroll down to the `Extra Environment Variables` section and click `Add`.
- Enter the name `PAPERLESS_CONSUMER_POLLING` and the value `120`, Paperless-ngx will then look for new documents in
the import share every 120 seconds (2 minutes).
- Scroll further down to the `To-be consumed Document Storage` section and set `Type of Storage` to `NFS Share`, `NFS Server` to `localhost` and `Path on NFS Server` to the path you configured above.

![Consumer polling configuration for paperless-ngx](./img/consumer_polling_configuration_for_paperless-ngx.png)
![To-be consumed document storage configuration for paperless-ngx](./img/to-be_consumed_document_storage_configuration_for_paperless-ngx.png)

Scroll to the bottom of the window and click `Save`. This will reconfigure and restart Paperless-ngx. Documents added to
shared folder will be automatically imported by Paperless-ngx. Those options can be changed at any time, documents still
in the import share will not be imported anymore though.
The NFS Share do not support the default polling model Paperless-ngx uses.

## Example Values for Paperless-ngx

```yaml

workload:
main:
podSpec:
containers:
main:
env:
PAPERLESS_ADMIN_USER: "admin"
PAPERLESS_ADMIN_PASSWORD: "changeme"
PAPERLESS_ADMIN_MAIL: "admin@admin.com"
PAPERLESS_OCR_LANGUAGE: "eng"
PAPERLESS_OCR_LANGUAGES: "eng fra deu spa ita"
PAPERLESS_CONSUMER_POLLING: 120
persistence:
consume:
type: nfs
# Example NFS Share
server: "192.168.0.10"
path: "/mnt/paperless/"

```

### Configure ForwardAuth authentication

Users that have set up [Traefik with ForwardAuth, for example with Authelia](/charts/premium/authelia/setup-guide/)
can take advantage of authentication through Authelia for their Paperless-ngx installation. Paperless-ngx will honor
can take advantage of authentication through Authelia for their Paperless-ngx installation. Paperless-ngx will honour
logins passed from Authelia but not the e-mail address nor the groups of the logged-in user, those will be internal to
Paperless-ngx and separate from those in Authelia. ForwardAuth can be added to an existing Paperless-ngx installation as
long as the logins of Authelia users match the logins of Paperless-ngx users.
Expand All @@ -108,18 +74,11 @@ This guide will only describe the Paperless-ngx specific options required to set

Once you have set up ForwardAuth in your Traefik installation, configure ForwardAuth in Paperless-ngx as follows:

- Select `Apps` inside the TrueNAS menu.
- You should be on the `Installed Applications` tab.
- Look for your `paperless-ngx` installation.
- Click the 3-button menu in its box and select `Edit`. This will open the application configuration pane similar to the
configuration page on installation.
- Scroll down to the `Extra Environment Variables` section and click `Add` twice.
- Enter the name `PAPERLESS_ENABLE_HTTP_REMOTE_USER` and set its value to true, and `PAPERLESS_LOGOUT_REDIRECT_URL`
and your logout URL (`https://auth.mydomain.com/logout` as per the above guide's example domain) in the second box.

![ForwardAuth configuration for paperless-ngx](./img/forwardauth_configuration_for_paperless-ngx.png)
- Add the following environment variables in the values for paperless.
- Enter `PAPERLESS_ENABLE_HTTP_REMOTE_USER` and set its value to true, and
- `PAPERLESS_LOGOUT_REDIRECT_URL` and your logout URL (`https://auth.mydomain.com/logout` as per the above guide's example domain) in the second box.

Scroll to the bottom of the window and click `Save`. This will reconfigure and restart Paperless-ngx. Authentication to
This will reconfigure and restart Paperless-ngx. Authentication to
your Paperless-ngx installation will be handled by Authelia now. Those options can be removed at any time,
authentication to your Paperless-ngx installation will then revert to the Paperless-ngx built-in authentication
mechanism.
Expand All @@ -128,8 +87,3 @@ mechanism.

Paperless-ngx offers a helpful [best practices guide](https://docs.paperless-ngx.com/usage/#basic-searching) as a
starting point, as well as a recommended workflow a little further along on that same page.

## Support

- You can reach us using [Discord](https://discord.gg/tVsPTHWTtr) for real-time feedback and support.
- If you found a bug in our chart, open a [GitHub issue](https://github.com/truecharts/apps/issues/new/choose).
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 570d476

Please sign in to comment.