this post was submitted on 01 Jan 2024
67 points (93.5% liked)

Selfhosted

40165 readers
895 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

What is everyone doing? SELinux? AppArmor? Something else?

I currently leave my nextcloud exposed to the Internet. It runs in a VM behind an nginx reverse proxy on the VM itself, and then my OPNSense router runs nginx with WAF rules. I enforce 2fa and don't allow sign-ups.

My goal is protecting against ransomware and zerodays (as much as possible). I don't do random clicking on links in emails or anything like that, but I'm not sure how people get hit with ransomware. I keep nextcloud updated (subscribed to RSS update feed) frequently and the VM updates everyday and reboots when necessary. I'm running the latest php-fpm and that just comes from repos so it gets updated too. HTTPS on the lan with certificates maintained by my router, and LE certs for the Internet side.

Beside hiding this thing behind a VPN (which I'm not prepared to do currently), is there anything else I'm overlooking?

you are viewing a single comment's thread
view the rest of the comments
[–] thisisawayoflife@lemmy.world 5 points 10 months ago (5 children)

Good call. I do some backups now but I should formalize that process. Any recommendations on selfhost packages that can handle the append only functionality?

[–] Rootiest@lemmy.world 6 points 10 months ago* (last edited 10 months ago)

I use and love Kopia for all my backups: local, LAN, and cloud.

Kopia creates snapshots of the files and directories you designate, then encrypts these snapshots before they leave your computer, and finally uploads these encrypted snapshots to cloud/network/local storage called a repository. Snapshots are maintained as a set of historical point-in-time records based on policies that you define.

Kopia uses content-addressable storage for snapshots, which has many benefits:

Each snapshot is always incremental. This means that all data is uploaded once to the repository based on file content, and a file is only re-uploaded to the repository if the file is modified. Kopia uses file splitting based on rolling hash, which allows efficient handling of changes to very large files: any file that gets modified is efficiently snapshotted by only uploading the changed parts and not the entire file.

Multiple copies of the same file will be stored once. This is known as deduplication and saves you a lot of storage space (i.e., saves you money).

After moving or renaming even large files, Kopia can recognize that they have the same content and won’t need to upload them again.

Multiple users or computers can share the same repository: if different users have the same files, the files are uploaded only once as Kopia deduplicates content across the entire repository.

There's a ton of other great features but that's most relevant to what you asked.

[–] patchexempt@lemmy.zip 3 points 10 months ago (1 children)

I've used rclone with backblaze B2 very successfully. rclone is easy to configure and can encrypt everything locally before uploading, and B2 is dirt cheap and has retention policies so I can easily manage (per storage pool) how long deleted/changed files should be retained. works well.

also once you get something set up. make sure to test run a restore! a backup solution is only good if you make sure it works :)

[–] thisisawayoflife@lemmy.world 2 points 10 months ago

As a person who used to be "the backup guy" at a company, truer words are rarely spoken. Always test the backups otherwise it's an exercise in futility.

[–] bjoern_tantau@swg-empire.de 3 points 10 months ago

No, I'd actually be interested in that myself. I currently just rsync to another server.

[–] tuhriel@infosec.pub 2 points 10 months ago

Restic can do append-only when you use their rest server (easily deployed in a docker container)