After About 20 Trials, We finally Have some Success.
Defining Hostname works great
[root@ns8 ~]# api-cli run module/paperlessngx20/configure-module --data '{"host": "paper.bybiz.link"}'
Warning: using user "cluster" credentials from the environment
<7>dump_env() is deprecated and implemented as a no-op
<7>dump_env() is deprecated and implemented as a no-op
_acontrol_task request attempt failed (WS reached EOF while waiting for module/traefik1/task/a925a513-9695-4dac-ad00-135ada352a55). Retrying...
Created symlink /home/paperlessngx20/.config/systemd/user/default.target.wants/paperlessngx-pod.service â /home/paperlessngx20/.config/systemd/user/paperlessngx-pod.service.
""
login Page works fine:
Logging into the app currently presents a CSRF error
I suspect its because the variable below has not yet been defined for the app
Based on this link here: Configuration - Paperless-ngx
i think it is Very necessary to define that one as well as Allowed hosts and Trusted Origins, for preventing Cross Site Request forgery and XSRF
LEt me Figure that one Out.
After Adding all relevant values, and updating the env configs, i am still unable to resolve the CSRF page issue after login
api-cli run module/paperlessngx22/configure-module --data '{"host": "paperless.bybiz.link"}'
lets_encrypt
api-cli run module/paperlessngx26/configure-module --data '{"host": "paperless.bybiz.link","PAPERLESS_URL": "https://paperless.bybiz.link","PAPERLESS_ALLOWED_HOSTS": "paperless.bybiz.link","PAPERLESS_CSRF_TRUSTED_ORIGINS": "paperless.bybiz.link","PAPERLESS_CORS_ALLOWED_HOSTS": "paperless.bybiz.link","TRAEFIK_LETS_ENCRYPT": "True"}'
I have all the configs together as shown because, i have noticed,
if you run api-cli run module/paperlessngx22/configure-module --data the first time, it works great, but running it consecutive times, yields failure, i am not sure why this is the case, or if there is supposed to be a second command for subsequent times.
[root@ns8 ~]# api-cli run module/paperlessngx22/configure-module --data '{"host": "paperless.bybiz.link"}'
lets_encrypt
api-cli run module/paperlessngx26/configure-module --data '{"host": "paperless.bybiz.link","PAPERLESS_URL": "https://paperless.bybiz.link","PAPERLESS_ALLOWED_HOSTS": "paperless.bybiz.link","PAPERLESS_CSRF_TRUSTED_ORIGINS": "paperless.bybiz.link","PAPERLESS_CORS_ALLOWED_HOSTS": "paperless.bybiz.link","TRAEFIK_LETS_ENCRYPT": "True"}'
Warning: using user "cluster" credentials from the environment
TaskSubmissionCheckFailed: Client "module/paperlessngx22" was not found
Exception ignored in: <function StreamWriter.__del__ at 0x7f93f4a860c0>
Traceback (most recent call last):
File "/usr/lib64/python3.11/asyncio/streams.py", line 396, in __del__
self.close()
File "/usr/lib64/python3.11/asyncio/streams.py", line 344, in close
return self._transport.close()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/asyncio/selector_events.py", line 860, in close
self._loop.call_soon(self._call_connection_lost, None)
File "/usr/lib64/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/usr/lib64/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
-bash: lets_encrypt: command not found
Warning: using user "cluster" credentials from the environment
<7>dump_env() is deprecated and implemented as a no-op
<7>dump_env() is deprecated and implemented as a no-op
Created symlink /home/paperlessngx26/.config/systemd/user/default.target.wants/paperlessngx-pod.service â /home/paperlessngx26/.config/systemd/user/paperlessngx-pod.service.
""
[root@ns8 ~]# api-cli run module/paperlessngx26/configure-module --data '{"host": "paperless.bybiz.link","PAPERLESS_URL": "https://paperless.bybiz.link","PAPERLESS_ALLOWED_HOSTS": "paperless.bybiz.link","PAPERLESS_CSRF_TRUSTED_ORIGINS": "paperless.bybiz.link","PAPERLESS_CORS_ALLOWED_HOSTS": "paperless.bybiz.link","TRAEFIK_LETS_ENCRYPT": "True"}'
Warning: using user "cluster" credentials from the environment
<7>dump_env() is deprecated and implemented as a no-op
<7>dump_env() is deprecated and implemented as a no-op
""
<7>dump_env() is deprecated and implemented as a no-op
<7>dump_env() is deprecated and implemented as a no-op
this is the main message when you try to run the command a second time to change or update the values, after first time