Hello everyone.
I have been interested in starting to self-host, and I have just been able to set up the first useful thing for myself (apart from a PiHole that I have running).
Since I am very afraid of making security mistakes, I would like to get feedback from you if my setup is secure or not.
The simple use case: I want to be able to back up files from my main computer to a hard disk, without having the hard disk attached to my main computer.
The setup:
- A Raspberry Pi 4 running Raspberry Pi OS Lite (64-bit).
- The Raspberry Pi can only be accessed via
ed25519key. - I configured a firewall on the Raspberry Pi with
ufwto allow only traffic from the local subnet. - I then use
sshfsto mount the hard disk connected with the Raspberry Pi to my main computer. - I plan to use
rsyncto back up my files.
Now I need your help: how secure is this setup? Did I make any major mistake? Is there something I could do better?
I’d be happy to get some feedback… 🙂


You’ve made a great start. How much further you go depends on your needs and threat model.
Rsync is ok as a start but there are dedicated backup tools that will give you access to your files at any point in time. This is important if you delete a file and later need it back after an rsync has already run and deleted it remotely too.
Rsync will not encrypt your backups. If a burglar takes your Pi will they have easy access to all your files too?
With rsync+ssh you are also vulnerable to either yourself (more likely) or a rogue process on your own machine deleting the files over ssh (e.g. ransomware attack).
The answer to that is append-only backups. A backup tool like restic has a backend you can host that does exactly this:
https://github.com/restic/rest-server
Take a look at restic to see what else you gain from switching to a dedicated tool versus rsync:
https://github.com/restic/restic#design-principles
There are others too such as borg.