Encryption for ssh uploaded files or local storage

Hello! Sorry if it’ll be any mistakes, I’m user from Russia.

I’ve got trouble with encrypting files, that been uploaded to the server.
Every 1-2 minutes I’ve upload new backup of pc’s via SSH to NC folder.
After every file loads, i’ve got script, that do chmod www-data and sync it with NC.
But after sync, no one of them has done encryption.
It’s all ok if I upload smth via Webpage, or via App

What should I run to do encryption for certain files? I’ve found only encrypt-all, and nothing for my problem
Hope you can help me.
Thank you.


For performance reasons, when you enable encryption on an Nextcloud server only new and changed files are encrypted. This command gives you the option to encrypt all files. You must first put your Nextcloud server into maintenance mode to prevent any user activity until encryption is completed

AFAIK it´s suggested to upload files only with WebGUI and NC-Clients.

That’s not for perfomance, that’s against perfomance because instead of making load for 1 second every 1-2 minute with sync end ecryption for just one file, I have to do sync and re-encryption for ALL files loaded, that will cause load like for 7-10 minutes every 30 minutes.
That is not OK because of safety reason and also will make server lagging for long time.

Are there any way to make it working normally?

First and foremost… NC is not a backup solution - it’s a sync solution. The dataflow is intended to go through it’s various clients (Web, local, mobile). If you are uploading data sideways to NC, then you’re simply doing it wrong and you should consider some other option or, as you already noticed, live with the implied consequences of having to encrypt your data after the fact of performing a rsync.

Btw, this also brings up some other issue… if you rsync files to your NC account and perform the encryption later on, how will you keep rsync from determining any file in the MC folder from being different? This also doesn’t seem to be a very good idea…