Nextcloud 16 on Raspberry too slow

Hello,
I am new here and hope there is someone who can help me.
Sorry for my poor english.

My problem is the following:
I installed Nextcloud on my raspberry. It works, but synchronisation is very very slow (there are 800GB to sync, it already runs for 4 days and actually says it will need 1 month…
Most of the data are jpg and mp3 but also discimages and very small files

Access via my Android is also possible, but also very slow

I installed using this: https://strobelstefan.org/?p=5790
OS is Raspbian Stretch Lite, Kernel 4.14, released 2019-04-08
DB is MariaDB: Server version: 10.1.38-MariaDB-0+deb9u1 Raspbian 9.0
NextCloud is 16.0.0
php is PHP 7.3.4-2 (cli) (built: Apr 13 2019 19:05:48) ( NTS )
HD is an externam 3TB-Drive, outside the http-Folder

I connect to the raspi via SSH

In my Router I can the the raspberry 2 times:

  • in the WLAN with 200MBit/s
  • in the LAN with another IP
    I can reach the Raspberry via both IPs

Using my own ssl-certificate

Also logging in into the raspberry via ssh is sometimes slow: Needs sometimes(!) 5 seconds after typing the password to get the prompt

Does anybody have an idea what could be the reason for the slow performance?

Thank you very much in advance
Ralph

first of all: which rpi (hardware) are you using?

Are you going to use NC as gallery. It is too slow for this on any hardware.

just upload your file with scp to <nc-data>/<your-user>/files or write it directly to the hdd and run php occ files:scan --all when you finished uploading.

a raspi isn’t a killer machine. :wink:

Hi Jimmy,
it’s a Raspberry Pi 3 Modell B+

Hi Gatak,
no, the gallery is not important for me.
I want to use it for automatic backup for my laptop (and casually access to the laptop-files from my mobile). Like google-drive but on private storage.
Later, may be, I would like to use calendar and contacts too.

Hi Reiner,
oh, I do not want to kill anybody with this machine :wink:

I cannot acess the data-directory:
pi@Wolke:/media/HD3TB $ cd NextCloud-Daten-1/
-bash: cd: NextCloud-Daten-1/: Keine Berechtigung

I can not connect the HD directly because the Explorer of Windows10 did not show the HD.

well.

lets start with ls -l /media/HD3TB.

I guess www-data (if that’s the webserver user on your raspi) is the owner of NextCloud-Daten-1/ and not pi

temporary you may add write rights to everyone

sudo chmod o+rwx /media/HD3TB/NextCloud-Daten-1 . probably also to app and app/<user>/files

later revert it.

alternative you could add the user pi to the group www-data. something like sudo usermod -G www-data pi. if the folder is group writeable.

yes sudo chmod o+rwx /media/HD3TB/NextCloud-Daten-1 works.
Now I can access the files inside.
Buit how to copy them from the laptop?

https://winscp.net/eng/docs/lang:de
or
https://filezilla-project.org/

OK, filezilla works;
copying works for a short time. Then someone takes w-right away, so I’ll get an error when writing

andphp occ files:scan --all responds:

pi@Wolke:/media/HD3TB/NextCloud-Daten-1 $ php occ files:scan --all
Could not open input file: occ

the complete line depends again on your installation

sudo -u www-data php /var/www/html/occ  files:scan --all

where /var/www/html should be the folder to your nextcloud installation.

if the command will take a bit longer try to run it in a screen session.

before you execute it type screen.
(if screen is not installed sudo apt install screen -y)

if you you want to dettach this screen session press strg a-d (german keyboard assumed). the occ command will continue running.

to reattach this session type screen -r or screen -rd`. if the occ commands finished you can type exit in the screen session to terminate it.

sorry, I can not copy, because after a while filezilla reports ‘permission denied’ and I lost the rights to write (‘drwxrwx— 5 www-data www-data 4096 Apr 30 22:30 NextCloud-Daten-1’)

add the user pi to the group www-data.
sudo usermod -G www-data pi

did not work:

pi@Wolke:/media/HD3TB $ sudo usermod -G www-data pi
pi@Wolke:/media/HD3TB $ ls -l
insgesamt 20
drwx------ 2 root root 16384 Apr 28 16:49 lost+found
drwxrwx— 5 www-data www-data 4096 Apr 30 22:30 NextCloud-Daten-1
pi@Wolke:/media/HD3TB $ cd NextCloud-Daten-1/
-bash: cd: NextCloud-Daten-1/: Keine Berechtigung

did you look at: https://ownyourbits.com/nextcloudpi/ ?

with this nextcloud distro you would be able to export your data folder via smb and you could mount them directly from your win10.

1 Like

OK, thank you!
I will try this tomorrow.

Forget it. That toy is only for syncing contacts and calendar.

Sorry to say.

800GB is a lot… when you set your sync, you was using Windows and the NC windows client? Did you set it so the address is local or you used the DNS or public ip?

To give you an idea, 4.5 GB of videos will take about 20 minutes to sync using my NC setup (Raspberry 3b+, hooked up to an old USB 2.0 external hard drive with a 1mb/s ISP connection) and the Windows 10 client set to reach my server using the DNS.