Official Nextcloud App Cannot Download Files > 512MB on SMB External Storage

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Nextcloud App Version: 27.1.0_1.6.48

I've checked the "install smbclient" checkbox for the app and was able to mount SMB shares as external storage. However, Downloading large files from the SMB external storage stops at 512MB. I found this issue on Nextcloud Github suggests libsmbclient-dev should be installed. Therefore, I referenced official example and ran the following inside the Nextcloud container:
Code:
apt install smbclient libsmbclient-dev
pecl install smbclient
docker-php-ext-enable smbclient
apachectl graceful

Problem solved........for now.
Obviously it is not persistent after restarting the container.

My questions are:
1. Is this the expected behavior of this app? Are there some configuration options that can fix this?
2. Is there a way to execute these commands automatically after starting the container?
 

Lepelot

Dabbler
Joined
Dec 13, 2020
Messages
21
Hello, I just upgraded from Core to Scale and I am running into this same 512K limit. A 2Gb file will synchronize nicely in a regular nextcloud folder, but it gets stuck if it is in and SMB external storage folder. I am surprised no one reacted to your post, did you find a solution?
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Hello, I just upgraded from Core to Scale and I am running into this same 512K limit. A 2Gb file will synchronize nicely in a regular nextcloud folder, but it gets stuck if it is in and SMB external storage folder. I am surprised no one reacted to your post, did you find a solution?
Unfortunately no. Right now I just run the code I mentioned after every reboot/upgrade. I've never tried this but maybe you can ditch the app and deploy a NextCloud container from scratch. Write the docker file according to the official documentation.
I hope this post will get some attention so it gets fixed on the official app:frown:.
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Is there a way to submit a ticket or something? I think the best solution is to have the official app to be updated to include the libsmbclient-dev installation. However, I don't know who I shall talk to (TrueNAS? NextCloud?) and how.
 

Lepelot

Dabbler
Joined
Dec 13, 2020
Messages
21
I am not sure either, but you could start with "report a bug" button on this forum.

I am new to scale and wondering how you get inside the Nextcloud container to run this code. Can you please explain?

Also, do you think this is something you could do with a "Init/Shutdown Scripts" in system setting/advanced?

Thanks for your help
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
I am not sure either, but you could start with "report a bug" button on this forum.

I am new to scale and wondering how you get inside the Nextcloud container to run this code. Can you please explain?

Also, do you think this is something you could do with a "Init/Shutdown Scripts" in system setting/advanced?

Thanks for your help
1. Click the three dots, select shell
2. In pod, select the pod with the name nextcloud-[somerandom stuff]
3. Click choose
4. Now you are in the shell and you can paste the code line by line
Note that it must be fully started before you run the commands
1702655503729.png

1702655528595.png


As for the "Init/Shutdown Scripts", short answer is no. Long answer is that those are executed only when TrueNAS is booted. You can't predict when NextCloud will be fully started, and making matters worse, every time you restart TrueNAS the pods get a different name, then you have to get its name in k8s to run commands in the containers with docker run.
 

li_chang

Dabbler
Joined
May 31, 2017
Messages
35
As for the "Init/Shutdown Scripts", short answer is no. Long answer is that those are executed only when TrueNAS is booted. You can't predict when NextCloud will be fully started, and making matters worse, every time you restart TrueNAS the pods get a different name, then you have to get its name in k8s to run commands in the containers with docker run.
Hi,

Not sure if this works for TrueNAS Charts version, but when I deployed nextcloud with docker image (without charts) there're hook folders that I can mount and run some shell scripts after container starts.
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Hi,

Not sure if this works for TrueNAS Charts version, but when I deployed nextcloud with docker image (without charts) there're hook folders that I can mount and run some shell scripts after container starts.
Hi, thank you for the suggestion. I’ve tried that but there is a permission issue. The script will be run as user www-data, and apt install requires root. Did you find a way to get around that? There is a discussion on GitHub about that.
 

jace92

Dabbler
Joined
Dec 14, 2021
Messages
46
I too would love for the official app from IXSystems to have the appropriate items included already. Nextcloud is already a super convoluted process to install other ways and this is the only one that has "just worked"... relatively speaking...

Thank you @lailakas for your "fix". I can confirm that it worked for me as well and makes me want to use NC again. Even with the limitation of my changes not persisting, it's still better than it being in a non-usable state.

I just wish the pre-made versions didn't have some inherent limitations to them. Snap didn't have smb at all and at the time I couldn't figure out how to install it (ironically, this post might have helped me with that but I just need to find time to test it), AIO requires a domain, and IXSystems didn't support smb usably.
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
I too would love for the official app from IXSystems to have the appropriate items included already. Nextcloud is already a super convoluted process to install other ways and this is the only one that has "just worked"... relatively speaking...

Thank you @lailakas for your "fix". I can confirm that it worked for me as well and makes me want to use NC again. Even with the limitation of my changes not persisting, it's still better than it being in a non-usable state.

I just wish the pre-made versions didn't have some inherent limitations to them. Snap didn't have smb at all and at the time I couldn't figure out how to install it (ironically, this post might have helped me with that but I just need to find time to test it), AIO requires a domain, and IXSystems didn't support smb usably.
I am glad it helped! And it just happened that the ticket I submitted to ixsystems also got some attention form their team today. Maybe we will see an official fix soon. Thank you jace92 for bringing us luck (or attention).
 

jace92

Dabbler
Joined
Dec 14, 2021
Messages
46
I am glad it helped! And it just happened that the ticket I submitted to ixsystems also got some attention form their team today. Maybe we will see an official fix soon. Thank you jace92 for bringing us luck (or attention).
Oh, I sure didn't do anything! I barely had time to test your fix in between "breaks" at work. :cool: I certainly didn't have time to submit anything on my own.
 

jace92

Dabbler
Joined
Dec 14, 2021
Messages
46
I am glad it helped! And it just happened that the ticket I submitted to ixsystems also got some attention form their team today. Maybe we will see an official fix soon. Thank you jace92 for bringing us luck (or attention).
So, when I pull up the ticket you referenced, it shows it was closed on January 26. Can you see something I can't?
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
So, when I pull up the ticket you referenced, it shows it was closed on January 26. Can you see something I can't?
Ah, yes. I got a email today saying they changed the status to Todo, and another one just now saying it has been done. Here is the GitHub link
Screenshot_20240216-134806.png
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Oh I guess it is not actually resolved. Nvm. I hope there will be some progress in the future.
 

jace92

Dabbler
Joined
Dec 14, 2021
Messages
46

jace92

Dabbler
Joined
Dec 14, 2021
Messages
46
I just wish the pre-made versions didn't have some inherent limitations to them. Snap didn't have smb at all and at the time I couldn't figure out how to install it (ironically, this post might have helped me with that but I just need to find time to test it), AIO requires a domain, and IXSystems didn't support smb usably.
Well... can confirm that Snap Nextcloud actually can't even have smbclient added to it... So my only real chance is for the IXSystems app.
 
Top