Error starting Authentik app

While trying to install Authentik, I recieved this error. I have actual-budget, immich, jellyfin, rust-desk (although, having issue getting this working too.) here is the error log in the pop-up:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 515, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 562, in __run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 599, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 596, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/service/crud_service.py”, line 294, in nf
rv = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py”, line 96, in wrapped
result = func(*args)
^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 148, in do_create
return self.create_internal(job, app_name, version, data[‘values’], complete_app_details)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 193, in create_internal
raise e from None
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 186, in create_internal
compose_action(app_name, version, ‘up’, force_recreate=True, remove_orphans=True)
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py”, line 61, in compose_action
raise CallError(err_msg)
middlewared.service_exception.CallError: [EFAULT] Failed ‘up’ action for ‘authentik’ app. Please check /var/log/app_lifecycle.log for more details

…and have you done this? What does it say?

I appologize, I though I had already attached it to my draft. here is the error:

[2025/05/28 14:11:26] (ERROR) app_lifecycle.compose_action():56 - Failed ‘up’ action for ‘authentik’ app: Network ix-authentik_default Creating\n Network ix-authentik_default Created\n Container ix-authentik-permissions-1 Creating\n Container ix-authentik-redis-1 Creating\n Container ix-authentik-redis-1 Created\n Container ix-authentik-permissions-1 Created\n Container ix-authentik-postgres_upgrade-1 Creating\n Container ix-authentik-postgres_upgrade-1 Created\n Container ix-authentik-postgres-1 Creating\n Container ix-authentik-postgres-1 Created\n Container ix-authentik-authentik-worker-1 Creating\n Container ix-authentik-authentik-server-1 Creating\n Container ix-authentik-authentik-worker-1 Created\n Container ix-authentik-authentik-server-1 Created\n Container ix-authentik-permissions-1 Starting\n Container ix-authentik-redis-1 Starting\n Container ix-authentik-redis-1 Started\n Container ix-authentik-permissions-1 Started\n Container ix-authentik-permissions-1 Waiting\n Container ix-authentik-permissions-1 Exited\n Container ix-authentik-postgres_upgrade-1 Starting\n Container ix-authentik-postgres_upgrade-1 Started\n Container ix-authentik-permissions-1 Waiting\n Container ix-authentik-postgres_upgrade-1 Waiting\n Container ix-authentik-permissions-1 Exited\n Container ix-authentik-postgres_upgrade-1 Exited\n Container ix-authentik-postgres-1 Starting\n Container ix-authentik-postgres-1 Started\n Container ix-authentik-postgres-1 Waiting\n Container ix-authentik-redis-1 Waiting\n Container ix-authentik-permissions-1 Waiting\n Container ix-authentik-permissions-1 Waiting\n Container ix-authentik-postgres-1 Waiting\n Container ix-authentik-redis-1 Waiting\n Container ix-authentik-permissions-1 Exited\n Container ix-authentik-permissions-1 Exited\n Container ix-authentik-redis-1 Healthy\n Container ix-authentik-redis-1 Healthy\n Container ix-authentik-postgres-1 Error\n Container ix-authentik-postgres-1 Error\ndependency failed to start: container ix-authentik-postgres-1 is unhealthy\n

it appears as though its an issue with postgres. however, I have no experience with running multiple truenas apps all using posrgres or other sql databases.

Thank you for any help!

FWIW - I had to enable “Automatic Permissions” below the PostGres hostpath volume configuration to get this to work.

Specifically …

Postgres runs as non-root user.
Group:** 999
User:** 999

So, if you created a Postgres DB data share with default settings, it won’t have the correct permissions.

I’ve added the 999 user and group to the postgress folder, and I’m still getting the same error

It’s almost as if its two users with the same ID may be competing for permissions?

Okay, so… I was the problem… The PG Data directory needs to be owned by user 999, but group 0.