Paperless-ngx deployment fails

Hello there,

I try to install paperless-ngx and I got installed on hostpaths, but it won’t deploy. It hangs itself and in the log it states the following:

django.db.utils.OperationalError: connection failed: connection to server at "172.16.1.5", port 5432 failed: FATAL: password authentication failed for user "paperless"

warning: unable to start service init-migrations: command exited 1

/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.

/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

I honestly have no clue what to do. I tried all sorts of different password combinations during installation setup, from all different to all the same to all “paperless”. As far as I know 1000:1000 has read/write rights on all datasets. Anyone a clue?

Installing it on ixVolumes works fine.

paperless-ngx v1.3.3
truenas scale v25.04.1

Logs

2025-06-04 09:54:50.168429+00:00[init-start] paperless-ngx docker container starting…2025-06-04 09:54:50.171216+00:00[init-start] paperless-ngx docker container starting init as root2025-06-04 09:54:50.174901+00:00[env-init] Checking for environment from files2025-06-04 09:54:50.176349+00:00[env-init] No *_FILE environment found2025-06-04 09:54:50.182177+00:00[init-redis-wait] Waiting for Redis to report ready2025-06-04 09:54:50.182232+00:00[init-tesseract-langs] Checking if additional teseract languages needed2025-06-04 09:54:50.182246+00:00[init-tesseract-langs] No additional installs requested2025-06-04 09:54:50.182608+00:00[init-db-wait] Waiting for postgresql to report ready2025-06-04 09:54:50.182631+00:00[init-db-wait] Waiting for PostgreSQL to start…2025-06-04 09:54:50.186825+00:00[init-user] Mapping UID for paperless to 5682025-06-04 09:54:50.973279+00:00Waiting for Redis…2025-06-04 09:54:50.980893+00:00Connected to Redis broker.2025-06-04 09:54:51.022887+00:00[init-redis-wait] Redis ready2025-06-04 09:54:55.227341+00:00Connected to PostgreSQL2025-06-04 09:54:55.227490+00:00[init-db-wait] Database is ready2025-06-04 09:55:36.882848+00:00[init-user] Mapping GID for paperless to 5682025-06-04 09:55:36.943853+00:00[init-folders] Running with root privileges, adjusting directories and permissions2025-06-04 09:55:36.948292+00:00mkdir: created directory '/tmp/paperless’2025-06-04 09:55:36.950993+00:00changed ownership of ‘/usr/src/paperless/export’ from paperless:1000 to paperless:paperless2025-06-04 09:55:36.957921+00:00changed ownership of ‘/tmp/paperless’ from root:root to paperless:paperless2025-06-04 09:55:36.962370+00:00[init-migrations] Apply database migrations…2025-06-04 09:55:40.598280+00:00Traceback (most recent call last):2025-06-04 09:55:40.598343+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 279, in ensure_connection2025-06-04 09:55:40.598862+00:00self.connect()2025-06-04 09:55:40.598890+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.599102+00:00return func(*args, **kwargs)2025-06-04 09:55:40.599316+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.599339+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 256, in connect2025-06-04 09:55:40.599386+00:00self.connection = self.get_new_connection(conn_params)2025-06-04 09:55:40.599406+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.599427+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.599438+00:00return func(*args, **kwargs)2025-06-04 09:55:40.599447+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.599457+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py”, line 332, in get_new_connection2025-06-04 09:55:40.599521+00:00connection = self.Database.connect(**conn_params)2025-06-04 09:55:40.599554+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.599583+00:00File “/usr/local/lib/python3.12/site-packages/psycopg/connection.py”, line 117, in connect2025-06-04 09:55:40.600390+00:00raise last_ex.with_traceback(None)2025-06-04 09:55:40.600410+00:00psycopg.OperationalError: connection failed: connection to server at “172.16.1.5”, port 5432 failed: FATAL: password authentication failed for user "paperless"2025-06-04 09:55:40.600421+00:002025-06-04T09:55:40.600421185Z2025-06-04 09:55:40.600429+00:00The above exception was the direct cause of the following exception:2025-06-04 09:55:40.600512+00:002025-06-04T09:55:40.600512277Z2025-06-04 09:55:40.600528+00:00Traceback (most recent call last):2025-06-04 09:55:40.600538+00:00File “/usr/src/paperless/src/manage.py”, line 10, in 2025-06-04 09:55:40.600548+00:00execute_from_command_line(sys.argv)2025-06-04 09:55:40.600648+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/init.py”, line 442, in execute_from_command_line2025-06-04 09:55:40.600665+00:00utility.execute()2025-06-04 09:55:40.600676+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/init.py”, line 436, in execute2025-06-04 09:55:40.600691+00:00self.fetch_command(subcommand).run_from_argv(self.argv)2025-06-04 09:55:40.600746+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/base.py”, line 413, in run_from_argv2025-06-04 09:55:40.600893+00:00self.execute(*args, **cmd_options)2025-06-04 09:55:40.600941+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/base.py”, line 459, in execute2025-06-04 09:55:40.601264+00:00output = self.handle(*args, **options)2025-06-04 09:55:40.601355+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.601371+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/base.py”, line 107, in wrapper2025-06-04 09:55:40.601479+00:00res = handle_func(*args, **kwargs)2025-06-04 09:55:40.601553+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.601603+00:00File “/usr/local/lib/python3.12/site-packages/django/core/management/commands/migrate.py”, line 118, in handle2025-06-04 09:55:40.601711+00:00executor = MigrationExecutor(connection, self.migration_progress_callback)2025-06-04 09:55:40.602052+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.602079+00:00File “/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py”, line 18, in __init__2025-06-04 09:55:40.602089+00:00self.loader = MigrationLoader(self.connection)2025-06-04 09:55:40.602169+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.602191+00:00File “/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py”, line 58, in __init__2025-06-04 09:55:40.602325+00:00self.build_graph()2025-06-04 09:55:40.602343+00:00File “/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py”, line 235, in build_graph2025-06-04 09:55:40.602478+00:00self.applied_migrations = recorder.applied_migrations()2025-06-04 09:55:40.602594+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.602616+00:00File “/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py”, line 89, in applied_migrations2025-06-04 09:55:40.602729+00:00if self.has_table():2025-06-04 09:55:40.602794+00:00^^^^^^^^^^^^^^^^2025-06-04 09:55:40.602808+00:00File “/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py”, line 63, in has_table2025-06-04 09:55:40.602930+00:00with self.connection.cursor() as cursor:2025-06-04 09:55:40.603007+00:00^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.603023+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.603156+00:00return func(*args, **kwargs)2025-06-04 09:55:40.603229+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.603272+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 320, in cursor2025-06-04 09:55:40.603495+00:00return self._cursor()2025-06-04 09:55:40.603519+00:00^^^^^^^^^^^^^^2025-06-04 09:55:40.603531+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 296, in _cursor2025-06-04 09:55:40.603700+00:00self.ensure_connection()2025-06-04 09:55:40.603739+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.603866+00:00return func(*args, **kwargs)2025-06-04 09:55:40.603957+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.603976+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 278, in ensure_connection2025-06-04 09:55:40.604123+00:00with self.wrap_database_errors:2025-06-04 09:55:40.604206+00:00^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.604290+00:00File “/usr/local/lib/python3.12/site-packages/django/db/utils.py”, line 91, in __exit__2025-06-04 09:55:40.604613+00:00raise dj_exc_value.with_traceback(traceback) from exc_value2025-06-04 09:55:40.604651+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 279, in ensure_connection2025-06-04 09:55:40.604665+00:00self.connect()2025-06-04 09:55:40.604674+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.604683+00:00return func(*args, **kwargs)2025-06-04 09:55:40.604725+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.604738+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py”, line 256, in connect2025-06-04 09:55:40.604881+00:00self.connection = self.get_new_connection(conn_params)2025-06-04 09:55:40.605014+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.605047+00:00File “/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py”, line 26, in inner2025-06-04 09:55:40.605130+00:00return func(*args, **kwargs)2025-06-04 09:55:40.605234+00:00^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.605277+00:00File “/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py”, line 332, in get_new_connection2025-06-04 09:55:40.605457+00:00connection = self.Database.connect(**conn_params)2025-06-04 09:55:40.605562+00:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^2025-06-04 09:55:40.605579+00:00File “/usr/local/lib/python3.12/site-packages/psycopg/connection.py”, line 117, in connect2025-06-04 09:55:40.605696+00:00raise last_ex.with_traceback(None)2025-06-04 09:55:40.605759+00:00django.db.utils.OperationalError: connection failed: connection to server at “172.16.1.5”, port 5432 failed: FATAL: password authentication failed for user "paperless"2025-06-04 09:55:40.862101+00:00s6-rc: warning: unable to start service init-migrations: command exited 12025-06-04 09:55:40.862286+00:00/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.2025-06-04 09:55:40.862338+00:00/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

Did you create datasets and assign host paths for all storage? The dataset for postgres needs to be owned by 999:999.

HTH,
Patrick

I just ran chown once again, yet no different result while deploying

Works for me, sorry.

Recreated all datasets from scratch. Solved it. Thanks for the help nevertheless!