External storage - recommended setup - SFTP or SMB/CIFS?

I ran into issues with my external storage setup using SFTP and encryption enabled. The errors in the log are:

Can't get app storage, app files_external, user not logged in: "remoteAddr":"","user":"--","app":"core","method":"","url":"/cron.php","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"","data":{"app":"core"}}


Failed to open stream: \"OCA\\Files_External\\Lib\\Storage\\SFTPReadStream::stream_open\" call failed at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#392","userAgent":"--","version":"","data":{"app":"PHP"}}

With this setup I ended up with encrypted files on the external storage and some of the previously uploaded files not visible anymore at the desktop client side. Enabling Check for changes made the files visible again but of course the encrypted version of the file.

My setup is:
Nextcloud Hub 7 (28.0.6)
Operating System: Linux 5.10.0-28-amd64 x86_64
CPU: Common KVM processor (2 cores)
Memory: 3.83 GB

I want to keep the external storage, but change to a different protocol and more reliable setup. Which setup is the most reliable? I am now considering these 2 options:

  1. External storage with SMB/CIFS in Nextcloud without server side encryption (I would probably switch to client side encryption using Cryptomator)

  2. Local external storage in Nextcloud without server side encryption connected to a locally automounted cifs folder in Debian:

//<username>.your-storagebox.de/backup /mnt/backup-server cifs iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=<system account>,gid=<system group>,file_mode=0660,dir_mode=0770 0 0

Based on your description, it seems to me that you are using your own Nextcloud and want to use the extended storage of a Hetzner Storage Box, e.g. for backups.

Server-side encryption:
This is useful if you don’t trust Hetzner, for example. The data in the extended storage can only be viewed by Hetzner in encrypted form. Do you host your Nextcloud at home or do you trust any provider more than Hetzner that you don’t host your Nextcloud at home?

I am a friend of sftp and since Hetzner offers it, I would also use it.

Does extended storage make sense in principle?
If you want to use Hetzner Storage only as a backup, you should consider whether you could simply transfer your Nextcloud (Nextcloud, Nextcloud configuration, database dump and files) (incrementally) to Hetzner Storage Box via sftp/rsync, for example, and save yourself the hassle of Nextcloud’s extended storage. Or do you really want to make manual backups using the Nextcloud functions? That’s garbage.

Managed Nextcloud
If you don’t run your Nextcloud yourself, you might want to get a Managed Nextcloud such as Hetzner Storage Share with sufficient storage and backup by Hetzner. 1 TB for 5 euro a month and maybe some money for a backup. This will save you all the hassle.