How to install the Nextcloud client on a Synology DSM?

Hi,

Iā€™m just trying to identify, weather itā€™s possible to install a Nextcloud client on a Synology or not. Anyone here having experiences in this or any useful suggestion?

Background: Due to poor internet connectivity I try to mirror my Nextcloud instance, which is hosted at an internet provider, on my local Synology. Iā€™m having about 100.000 files in my Nextcloud (50GB) and I already tried Synologyā€™s CloudSync to keep the local mirror always updated. The point is, that CloudSync takes about 1ā€¦2 hours to get aware about any new file, as the connection is done via WebDAV. I guess WebDAV does not support any notification about changes (new files, updated files, deleted files) and therefore, it seems to me that CloudSync is continiously scanning the whole WebDAV file system of my cloud for changes, which takes such long. The Nextcloud client is using any other mechanism to get aware of changes in the cloud within seconds.

If a Nextcloud client cannot be installed on a Synology, any other suggestion to overcome this long sync time is highly appreciated.

Thanks a lot :slight_smile:

Rgds,
Armin

Nobody here with a good suggestion on this?

Rgds,
Armin

my cloud sync is downloading files at once. but i donā€™ have 100.000 files in the nc.

did you look at the settings of cloud sync? there is a parameter ā€œAbrufzeit = 10 secā€ in general settings. sounds like that triggers the sync cycle each 10 sec.

https://luvis.se/software/install-nextcloud-on-synology-dsm-6/

Iā€™m not sure if Iā€™ve understood what youā€™re trying to do - install NextCloud on your Synology NAS or just a client (I donā€™t understand the latter). If Iā€™ve misunderstood I apologise, but what Iā€™ve written below might help others searching for s Synology installation. If your NextCloud is with an external provider, why not move it to your local DS and use that? I tried NextCloud hosted elsewhere and decided I want my data inside my network.

I used this tutorial and it works perfectly. I needed to add a few extra extensions in step 4 - you will see from NextCloud settings after installation what might be missing for you.

I love the way the auto update feature in NextCloud works so well with the Diskstation install too.

Backups using Hyperbackup work too - I needed to restore because of user error and the restore did everything I hoped for - got me back to where I was. I backup the whole /Volume1/web folder AND the MariaDB app and that catches everything. If your data folder is outside the web folder, backup that too.

I have a DS218+ box with a 4GB memory module and NextCloud flies. I run the NextCloud app on my desktop which syncs all my data to a local folder and the NextCloud iOS app on my phone which allows me to access my NextCloud data folder as part of the accessible filesystem. I use the calendar and contacts app and Itā€™s a perfect replacement for Google Drive, Calendar and Contacts. To sync calendars and contacts with an iOS or MacOS device just use the normal DAV sync service included with iOS or MacOS. For Android you need the DAVDroid app.

I used the Synology DDNS service to create a hostname accessible from both inside and outside my network and port forwarded 63443 -> local 443 on my Diskstation to make sure inbound queries were handled correctly and passed on to my NextCloud install. I needed to create an https certificate using Letā€™s Encrypt - details in the tutorial. I moved it to the top of the list in the DSM control panel, above the default Synology certificate to get it working without errors.

No, the settings there is 10s. I do have several sync jobs there reacting quite fast on any changes. Maybe Iā€™m wrong, but as far as I understood the WebDAV sync mechanism, there is way letting CloudSync know about changes in the cloud except the full scan of the WebDAV system, which takes about 1ā€¦2hrs due to the high amount of files and folders. So, Iā€™m pretty sure that itā€™s because of WebDAV.

The Nectcloud client is using something like file hashes. It is using a hidded meta file and I assume this helps to get aware about the remote changes in the cloud.

Rgds,
Armin

Hi scgf,

thatnks for the reference, but unfortunately Iā€™m not looking for running Nextcloud on my Synology, Iā€™m looking for something, which is able to sync my existing Nextcloud in the internet quite fast with a folder/share hosted on my Synology for the loacal intranet. Therefore, Iā€™m looking for a way getting the Nexcloud CLIENT running on my Synology, not the Nerxtcloud Server installation. As there are versions of the client available running under Linux, I would assume this could somehow work. Any idea on this?

Rgds,
Armin

Ah, I see. I thought I might have been barking up the wrong tree! No, I have no useful expertise to help you, sorry.

one idea would be a nice, little docker-container on your dsm like this:

FROM ubuntu:latest

RUN add-apt-repository -y ppa:nextcloud-devs/client
RUN apt-get update

RUN apt-get install -y xvfb x11vnc fluxbox sudo
RUN apt-get install -y --no-install-recommends nextcloud-client
RUN rm -rf /var/lib/apt/lists/*
RUN apt-get clean

Expose ports.

EXPOSE 5900

RUN useradd -m -u 1027 -p -s /bin/bash user
RUN adduser user users
RUN adduser user adm
RUN adduser user sudo
ADD fluxboxstart.sh /home/user/.fluxbox/startup
RUN chown -R user:user /home/user/.fluxbox
RUN chmod -R 774 /home/user/.fluxbox
ADD fluxbox.sh /home/user/fluxbox.sh
RUN chmod +x /home/user/fluxbox.sh
RUN chown user:user /home/user/fluxbox.sh
RUN mkdir -p /home/user/.local/share/data/Nextcloud
ADD nextcloud.cfg /home/user/.local/share/data/Nextcloud/nextcloud.cfg
ADD nextcloud.cfg /home/user/.config/Nextcloud/nextcloud.cfg
ADD sync-exclude.lst /home/user/.local/share/data/Nextcloud/sync-exclude.lst
ADD sync-exclude.lst /home/user/.config/Nextcloud/sync-exclude.lst
ADD cookies0.db /home/user/.config/Nextcloud/cookies0.db
RUN chown -R user:user /home/user/.local/
RUN chmod 774 -R /home/user/.local/
RUN chown -R user:user /home/user/.config/
RUN chmod 774 -R /home/user/.config/

ENTRYPOINT exec bash
#CMD [ā€œsudo -H -u user ā€˜bash -c /home/user/fluxbox.sh &ā€™ā€ ]

Mounting some volumes via docker run and so onā€¦
it is not really great, but it works for me.

I know this is a bit older but assuming you didnt like the extra steps of installing a direct client maybe you could make the Synology a secondary server and use federation services to sync them?
https://docs.nextcloud.com/server/12/admin_manual/configuration_files/federated_cloud_sharing_configuration.html

HI,

thanks for your proposal. Unfortunately, my root cause for the solution Iā€™m looking for is a very slow internet connectivity of the small office, where Iā€™m using the DSM and thatā€™s the reason why Iā€™m trying to have something like a local mirror of the Nextcloud instance, as some people are working locally and others are working remotely. So, if I would use the Federation feature, this would not solve my root issue and the same files are getting pulled through the slow line multiple times again.

Rgds,
Armin

Just a quick idea:

1 Nextcloud Sync from the Internet Nextcloud to Local Synology (using Webdav)
1 BitTorrent Sync from Synology to LAN Client machine (using the 3rd party Synology Package)

using the same root folder

and maybe you also have BitTorrent Sync on the client machineā€¦

I guess every solution will (hopefully) always check for file hashes and if they match nothing will get copied unnecessarily

is this the only way to run nextcloud client on synology? we canā€™t use appimage directly on it?

If you need to install Nexcloud on Synology first, you need at least 1G memory RAM, to NEXCLOUD work without problems.

  1. Reset NAS to factory configuration
  2. Use https://luvis.se/software/install-nextcloud-on-synology-dsm-6/ from luvis.se
  3. After setup you need to restart synology NAS.
  4. After restart if you can see nextcloud login at https://<ā€œiPā€> - its Working

If need more help, call me.

:slight_smile:

I can also install NextCloud on NAS Synology by using embedded PostgreSQL. NextCloud version 18 Hub is working fine :slight_smile:

You could leave out all the graphical stuff and just use nextcloudcmd in a Debian Docker container called by cron every 15 minutes or so instead:

https://docs.nextcloud.com/desktop/2.3/advancedusage.html#nextcloud-command-line-client

@DigitalBox @Paulomt This is about the Nextcloud client, not the server.

1 Like

hello @Elleven did you find solution? I am looking for same thing to use Nextcloud client on Synology nas (during race weekend in garage with not stable internet connection) and sync. to our cloud serverā€¦

I try to install nextcloud on Synology. I follow totorial step by stet but when I try to acces the page I have the error

Erreur interne du serveur

Le serveur est incapable dā€™exĆ©cuter votre requĆŖte.

Si cela se reproduit, veuillez envoyer les dĆ©tails techniques ci-dessous Ć  lā€™administrateur du serveur.

Le fichier journal du serveur peut fournir plus de renseignements.

Renseignements techniques

  • Adresse distante : 192.168.72.31
  • ID de la demande : 1TysnlusRJudoAGtOtkr

My question where are logs ?
Do I have a better chance to install older version?

Rather than trying to use Nextcloud client for that, I would recommend to use rather an other specialized tool like rsync, rclone or (if you have access to the system of your Nextcloud server) syncthing

This proposal does not fit to the problem. rsync as well as rclone are beatiful tools for creating backups, but they are not useful to keep cloud locations synchronized as they are working on a file-system-level only. But thats not what makes a cloud being a cloud. As initially written I have >100k files and 50k folders keeping synchronized and that takes sometimes hours befor the Synology realizes any file changes on the remote system. rsync will not bring any improvement on this as this tool as well needs to check all files and folders one by one for changes while the Nexcloud client is getting some king of notifications about any changes und can pull the modified file immediately.

Nevertheless I solved my underlaying problem now differently. I installed a local Windows server in the small office running the Nextcloud client.

1 Like

It seems there is no easy solutionā€¦ so rclone.org or other 3rd party tools seem to be the preferred solution. Leaving the links here for anyone else looking for a solution:

1 Like