ElectricEel-24.10-RC.2 Nextcloud crashed after migration

Hello, I applied the update and since then my nextcloud app no ​​longer works, I don’t know what to do.
attached is the capture, I noticed that the application no longer had a port
I really need your help I’m lost


root@truenas[~]# cat /var/log/app_lifecycle.log
[2024/10/10 21:06:01] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nextcloud' app:  Network ix-nextcloud_default  Creating
 Network ix-nextcloud_default  Created
 Container ix-nextcloud-permissions-1  Creating
 Container ix-nextcloud-permissions-1  Created
 Container ix-nextcloud-postgres-1  Creating
 Container ix-nextcloud-redis-1  Creating
 Container ix-nextcloud-postgres-1  Created
 Container ix-nextcloud-redis-1  Created
 Container ix-nextcloud-nextcloud-1  Creating
time="2024-10-10T21:05:53+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
time="2024-10-10T21:05:53+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
 Container ix-nextcloud-nextcloud-1  Created
 Container ix-nextcloud-cron-1  Creating
time="2024-10-10T21:05:53+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
 Container ix-nextcloud-cron-1  Created
 Container ix-nextcloud-permissions-1  Starting
 Container ix-nextcloud-permissions-1  Started
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-redis-1  Starting
 Container ix-nextcloud-postgres-1  Starting
 Container ix-nextcloud-postgres-1  Started
 Container ix-nextcloud-redis-1  Started
 Container ix-nextcloud-postgres-1  Waiting
 Container ix-nextcloud-redis-1  Waiting
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-redis-1  Healthy
 Container ix-nextcloud-postgres-1  Healthy
 Container ix-nextcloud-nextcloud-1  Starting
 Container ix-nextcloud-nextcloud-1  Started
 Container ix-nextcloud-nextcloud-1  Waiting
 Container ix-nextcloud-nextcloud-1  Error
dependency failed to start: container ix-nextcloud-nextcloud-1 is unhealthy

[2024/10/10 21:07:30] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nextcloud' app:  Network ix-nextcloud_default  Creating
 Network ix-nextcloud_default  Created
 Container ix-nextcloud-permissions-1  Creating
 Container ix-nextcloud-permissions-1  Created
 Container ix-nextcloud-postgres-1  Creating
 Container ix-nextcloud-redis-1  Creating
 Container ix-nextcloud-redis-1  Created
 Container ix-nextcloud-postgres-1  Created
 Container ix-nextcloud-nextcloud-1  Creating
time="2024-10-10T21:07:19+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
time="2024-10-10T21:07:19+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
 Container ix-nextcloud-nextcloud-1  Created
 Container ix-nextcloud-cron-1  Creating
time="2024-10-10T21:07:19+02:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
 Container ix-nextcloud-cron-1  Created
 Container ix-nextcloud-permissions-1  Starting
 Container ix-nextcloud-permissions-1  Started
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-redis-1  Starting
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-postgres-1  Starting
 Container ix-nextcloud-postgres-1  Started
 Container ix-nextcloud-redis-1  Started
 Container ix-nextcloud-postgres-1  Waiting
 Container ix-nextcloud-redis-1  Waiting
 Container ix-nextcloud-permissions-1  Waiting
 Container ix-nextcloud-permissions-1  Exited
 Container ix-nextcloud-postgres-1  Healthy
 Container ix-nextcloud-redis-1  Healthy
 Container ix-nextcloud-nextcloud-1  Starting
 Container ix-nextcloud-nextcloud-1  Started
 Container ix-nextcloud-nextcloud-1  Waiting
 Container ix-nextcloud-nextcloud-1  Error
dependency failed to start: container ix-nextcloud-nextcloud-1 is unhealthy
2024-10-10 19:36:14.256112+00:00=> Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
2024-10-10 19:36:14.258995+00:00==> Running the script (cwd: /var/www/html): "/docker-entrypoint-hooks.d/before-starting/ix-update-hosts-script.sh"
2024-10-10 19:36:14.270604+00:00Updating database and redis host in config.php
2024-10-10 19:36:14.773781+00:00Your data directory is invalid.
2024-10-10 19:36:14.773853+00:00Ensure there is a file called ".ncdata" in the root of the data directory. It should have the content: "# Nextcloud data directory"
2024-10-10 19:36:14.773873+00:002024-10-10T19:36:14.773873980Z
2024-10-10 19:36:14.773887+00:00Your data directory is readable by other people.
2024-10-10 19:36:14.773901+00:00Please change the permissions to 0770 so that the directory cannot be listed by other people.
2024-10-10 19:36:14.773924+00:002024-10-10T19:36:14.773924897Z
2024-10-10 19:36:14.773939+00:00An unhandled exception has been thrown:
2024-10-10 19:36:14.773953+00:00Exception: Environment not properly prepared. in /var/www/html/lib/private/Console/Application.php:137
2024-10-10 19:36:14.773966+00:00Stack trace:
2024-10-10 19:36:14.773988+00:00#0 /var/www/html/console.php(81): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2024-10-10 19:36:14.774006+00:00#1 /var/www/html/occ(11): require_once('/var/www/html/c...')
2024-10-10 19:36:14.783198+00:00#2 {main}==> Failed at executing "/docker-entrypoint-hooks.d/before-starting/ix-update-hosts-script.sh". Exit code: 1

I would like to understand if this is a known problem or an error on my part. If you need any other information do not hesitate

I’ve got exacly the same problem. Have you resolved it?

Hello, I think I have the same issue with my NextCloud as you. I see the same warning messages. I have been reviewing a lot of resources online. Everything indicates it is an issue with permissions to access files or folders, in my case, to access the PostgreSQL folder (Database). My PostgreSQL version is 13 so I assume it was too old for the current NextCloud version. Consequently, the migration was not successful because could not change permission correctly. I edit the ACL of the pgdata folder with not success.

However, in a previous upgrade I got a similar issue, and I was able to solve it following the instruction from STK in this discussion: Nextcloud doesn't deploy if you follow the TrueNAS scale instructions due to postgres ownership

Take a look at it, it may give you some light

1 Like

Thanks. I kind of gave up on NextCloud due to complexity and so many bugs like this; it’s as if they don’t do any user testing or want to get feedback from customers to fix their product.

Hi Steve, I understand the frustration. I am coming from Truenas Core 13. It was really stable. However, I learned late that using the built-in applications in Core was not the best approach either.

If you use the danb35 scripts for NextCloud and Plex then the maintenance was easy for people like me (newbies) (danb35 · GitHub). Recovery from disaster was extremely easy. But, it is important to take into consideration that TrueNas Core was mature. This is not the case for TrueNas Scale. It is new, so it is still very hard to find help and guides. Why not using Docker from the beginning in Scale is well beyond my comprehension.

Now that we have the option of Electric Eel using Docker I would give to TrueNas a second chance. I am pretty sure the issues are related to the inherent complexity behind the ACL and permissions in TrueNas. So, I good guide for that would be very helpful. With that solved I hope Docker allows TrueNas improve its capabilities to host applications. If not, then a VM will continue to be the best second option to host applications in TrueNas. Something I do not like.

Alternatively, if TrueNas Core is upgraded to FreeBSD 14 then I would go back to Core. What is the future of TrueNAS CORE? | TrueNAS Community

So, if you don’t use the built in apps (I do not), and you use docker compose, you will find nextcloud always works once you set it up and never fails. No issue with updates to Scale or nextcloud. Soooooo much easier than the apps which are constantly changing as you say.

I also decided to use zero ACLs anywhere, and just use normal filesystem permissions, which also makes it easier.

I am doing the same in non Eel (have not migrated yet), though obviously not compose just custom apps. That was a little harder but Eel makes it simple. Never ever have any issues with Nextcloud

Hi Steve,
I would like to know that scripted jails in Core and customs apps in Scale were the best approaches.
I am also looking forward for the final of Eel to build all my apps on it.

Quick question:
What do you mean by “zero ACL” and “normal” filesystem permissions?
Do you have any resource (link) or guide about that?

I would like to learn more about it.
Sorry for my ignorance in this area.

Thanks in advance

Just Linux permissions, no guide, I never have a guide. Just basic Linux admin. chown and chmod.

1 Like