Nextcloud does not start and cannot reinstall after Electric Eel update

The issue I had with Tailscale was that the auth key was not valid. If you regenerate a new auth key and redeploy it should be fine.

That’s not the problem with nextcloud.

I have to agree with @Nordlicht-13 there isn’t a auth key involved with the deployment of Nextcloud.

@rush2sk8 Very adversed with Tailscale and a common issue upon upgrades. However I run mine directly through pfSense Plus to allow access across my entire network and Vlans. Thank you though I’m sure if someone reads this and has the same issue it will be beneficial for them.

Wanted to throw my hat into this ring, I never used Nextcloud before, fresh install of Truenas Scale back in March 2024, upgraded whenever an update has come out, moved to Electric Eel yesterday.

I now wanted to give Nextcloud a try, can’t even install it fresh, and i’ve never had it before, I’ve triple checked permissions on the datasets (including to just allowing everything as a test) and nothing made a difference, same errors i’m seeing as you guys:

File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 248, in create_internal
raise e from None
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 241, 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 57, in compose_action
raise CallError(
middlewared.service_exception.CallError: [EFAULT] Failed ‘up’ action for ‘nextcloud’ app, please check /var/log/app_lifecycle.log for more details

I installed Collabora for the first time ever absolutely fine, I’ve always used Host Paths for storage, I don’t think i’m doing anything wrong, I just think something’s broken with the compose file potentially?

@Burty101s Good to know (in a sense) that your having the same issue on a clean install.

I can stop digging around thinking something got corrupted on my system during the Electric Eel upgrade.

Appreciate you including the python errors as well - i saw them myself during hte installation. But just referenced the app_lifecycle.log

IMPORTANT: As of the latest version of the Truenas Apps Nextcloud App Version 30.0.1 my fix needs to be rolled back by removing the /data from the host path.

This is a return to the previous behavior so not unexpected.


When I updated the app to v30.0.1, the update failed with this output:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 488, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 535, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1364, 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 1361, 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/schema/processor.py", line 183, in nf
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 55, in nf
    res = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/app_scale.py", line 51, in start
    compose_action(app_name, app_config['version'], 'up', force_recreate=True, remove_orphans=True)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py", line 57, in compose_action
    raise CallError(
middlewared.service_exception.CallError: [EFAULT] Failed 'up' action for 'nextcloud' app, please check /var/log/app_lifecycle.log for more details

I checked the /var/log/app_lifecycle.log and got this output:

 Container ix-nextcloud-permissions-1  Created
 Container ix-nextcloud-redis-1  Creating
 Container ix-nextcloud-postgres-1  Creating
 Container ix-nextcloud-postgres-1  Created
 Container ix-nextcloud-redis-1  Created
 Container ix-nextcloud-nextcloud-1  Creating
time="2024-11-01T14:51:01-07:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
time="2024-11-01T14:51:01-07:00" level=warning msg="config `uid`, `gid` and `mode` are not supported, they will be ignored"
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /mnt/tank/Nextcloud_Data/data/data

After removing the extra /data from the config in the hostpath (Storage Configuration > Nextcloud User Data Storage > Host Path), the app starts up as expected.

@Process42 An this was with the prior existing Dataset’s i gather?

I’ve tried a clean installation after removing mine - Since, i didn’t have that but just a little bit of information inside it during testing. So, i figured it wasn’t a lose at the time.

On the clean install I just pointed to the host location of /mnt/myrootname/nextcloud_data - still fails on the installtion.

An still keep getting the same errors

yeah i found this solution as well

I have this same login issue as well.

Install completely from scratch, with a new dataset, i get to the login page, and it states my login is invalid when its 100% correct, any ideas on how to fix this?

Fault is in TrueNas and directly in POSTGRES.
Set in dataset on Host path ACL to give full rights to user 999 (should be ‘netdata’ user - if missing, create him)
Then all works.

1 Like

@dawidmachon Have the user account in the system and still cannot deploy a fresh instance of it.

Been Through a number of different combination for the settings and same results.

Frustrating to say the least. I want to run it on my Turenas server for the storage space - but might just create a Debian VM on Proxmox and spin it up there instead. SInce, IA-Systems has not input into things.

I think I try to set up nextcloud under dockge.
Can anyone recommend a nextcloud-yaml for dockge?

Hi,
I had a similar error when trying to modify the installed nextcloud app from using the default “ixVolume (Dataset created automatically by the system)” directories to a custom “Host Path” directory.

error:
chmod: changing permissions of ‘/var/lib/postgresql/data’: Operation not permitted

I discovered that the permissions on the default directory was different than the permissions on the target directories. It even had the group for the pgData (postgres database directory) owned by a user that does not exist on my system, “docker”.
When I copied the files over, using the archive flag (-a), which retains the permissions on the directories and files being copied over, this worked.

I opened the Shell in “System Settings” and ran the following commands, some of which are specific to how I set up my hard drives and “Datasets”. These, you may need to change to reflect your datasets and directories.

#switch from the admin user to the root user, to be able to run subsequent commands
sudo -i

#change to the directory where I want all of the nextcloud stuff installed to.
cd /mnt/pool1/app/nextcloud

#change the permissions of this directory to be read/write/execute by all users, to eliminate permissions issues. For me, no other user will have shell access to this trueNas, so this is not a security concern for me.
chmod go+rwx *

#show a listing of the directories and default permissions on the default install
ls -al /mnt/pool1/ix-applications/releases/nextcloud/volumes/ix_volumes

#copy over the data while preserving permissions for all of the directories.
cp -ra /mnt/pool1/ix-applications/releases/nextcloud/volumes/ix_volumes/* .

I hope this helps someone else.

The one config that I still don’t understand, is the directory for:
Nextcloud data directory*: /var/www/html/data

I have no such directory when logging in as root, on the “System Settings” shell. It’s almost as this is a default placeholder directory, or a default that’s not used/not relevant for trueNas scale Dragonfish-24.04.2.3, or maybe something else that I don’t understand.

I recently saw a reply on another thread that specifying an ACL (access control list) of 999:999 for these host paths should work, when installing from scratch, but I have not tried that out.

Hello I’m new to Truenas and have been a windows person for years. I tried to install a new install and mine would not work along with Collabora. But I installed Nginx Proxy Manager no problem. The other two failed with no install.

My nextcloud is now installed and running:

@Nordlicht-13 Glad you were able to get yours working.

Still struggling here to even get a clean installation. Hopefully, a update or something will help with resolving the issue.

I installed it from scratch.
Created my new datasets for the nextcloud:

  • nextcloud-app-data → user: www-data - group: www.data
  • nextcloud-user-data → user: www-data - group: www.data
  • nextcloud-postgres-data → user: netdata - group: docker

all three dataset-type: app

For the installation of the app I used the standard
User: ncadmin and password: nextcloud

2 Likes

@Nordlicht-13 Greatly appreciate that information! Used the information you mentioned for the datasets and it successfully installed!

Man what a pain in the ass - Thank you again for the information!

I encountered the same problem after updating from Dragonfish to Electric Eel. My current Nextcloud installation kept saying it was “Deploying”. After waiting several hours it was still saying Deploying. At this point, I was sure it was hung up. What I did was select my current NextCloud Installation and then click on Edit. Verified all my entries scrolled all the way down to the very bottom and clicked on the blue “UPDATE” button. Let it do the update. It was completed successfully and the status went from a yellow Deploying to a green Running. However, I still could not get to the NextCloud login page. Waited about 10 minutes and the login page finally came up. I was able to log in with my current account and all my data and folders were still intact. :+1:

Thank you a lot, this was really helpful!