Fellow selfhoster, do you encrypt your drives where you put data to avoid privacy problems in case of theft? If yes, how? How much does that impact performances? I selfhost (amongst other services) NextCloud where I keep my pictures, medical staff, …in short, private stuff and I know that it’s pretty difficult that a thief would steal my server, buuut, you never know! 🤷🏻‍♂️

  • d3Xt3r@lemmy.nz
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    1
    ·
    6 months ago

    This shouldn’t even be a question lol. Even if you aren’t worried about theft, encryption has a nice bonus: you don’t have to worry about secure erasing your drives when you want to get rid of them. I mean, sure it’s not that big of a deal to wipe a drive, but sometimes you’re unable to do so - for instance, the drive could fail and you may not be able to do the wipe. So you end up getting rid of the drive as-is, but an opportunist could get a hold of that drive and attempt to repair it and recover your data. Or maybe the drive fails, but it’s still under warranty and you want to RMA it - with encryption on, you don’t have to worry about some random accessing your data.

    • kabi@lemm.ee
      link
      fedilink
      English
      arrow-up
      24
      arrow-down
      1
      ·
      6 months ago

      If you’re getting rid of a (rusty) drive and it leaves your hands with the cool magnets and shiny frisbees still inside, you’re doing something wrong.

    • peregus@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Do you insert the key/password manually every time (it’s a server, so not so many times, but could happen) you boot the server?

  • brygphilomena@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    ·
    6 months ago

    Nope. This isn’t part of my threat model.

    I don’t have sensitive data and stealing a drive would be inconvenient for a thief.

    • Jediwan@lemy.lol
      link
      fedilink
      English
      arrow-up
      5
      ·
      6 months ago

      You don’t have sensitive data? Would you mind expanding on that a bit for me? Just curious how you like, live, and stuff.

      • Pika@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 months ago

        I’m surprized as well, like I guess I would understand if it’s a no log DNS server but, what else wouldn’t have sensitive information.

      • brygphilomena@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 months ago

        Plex data, pi hole, and home assistant don’t contain anything meaningful. No credentials are stored in a form that can be reused.

        The most sensitive is immich, which I’m more concerned about backups than I am someone might steal my nudes. Their online anyway.

        Email is hosted off-site and I still have physical files for a lot of my documents. If someone stole hdds out of my server, they’d get a lot of Linux isos, pictures of cars, porn, tons of versioned software and games installers, etc.

        Maybe my definition of sensitive is different than yours though.

  • asbestos@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    6 months ago

    How do you even encrypt a server so that it doesn’t require human intervention every time it goes down/restarts?

    • Björn Tantau@swg-empire.de
      link
      fedilink
      English
      arrow-up
      9
      ·
      6 months ago

      I’m too lazy to look up the details. But you can have a small ssh server running as part of initrd. I think it’s dropbear. I log into that and unlock the root drive from there.

      Of course that necessitates an unencrypted /boot/.

      Did it on Debian and it was relatively easy to set up.

    • ClemaX@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      Files could be decrypted by the end user. The OS itself could remain unencrypted.

    • lorentz@feddit.it
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      I remember this blog post (I cannot find right now) where the person split the decryption password in two: half stored on the server itself and half on a different http server. And there was an init script which downloaded the second half to decrypt the drive. There is a small window of time between when you realize that the server is stolen and when you take off the other half of the password where an attacker could decrypt your data. But if you want to protect from random thieves this should be safe enough as long as the two servers are in different locations and not likely to be stolen toghether.

    • hperrin@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      TPM, but it’s a pain in the ass and breaks a lot. The new version of Ubuntu should handle it better, but if you’re not on Ubuntu, that won’t help you.

      • lorentz@feddit.it
        link
        fedilink
        English
        arrow-up
        4
        ·
        6 months ago

        TPM solves a sigthly different threat model: if you dispose the hd or if someone takes it out from your computer it is fully encrypted and safe. But if someone steals your whole server it can start and decrypt the drive. So you have to trust you have good passwords and protection for each service you run. depending on what you want to protect for this is either great solution or sub optimal

    • Pika@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      TPM is a good way, Mine is setup to have encryption of / via TPM with luks so it can boot no issues, then actual sensitive data like the /home/my user is encrypted using my password and the backup system + fileserver is standard luks with password.

      This setup allows for unassisted boot up of main systems (such as SSH) which let’s you sign in to manually unlock more sensative drives.

  • BastingChemina@slrpnk.net
    link
    fedilink
    English
    arrow-up
    12
    ·
    6 months ago

    No,

    There is all the backup of all my family pictures in the drives.

    If something happens to me I want to make due that they will have access to it.

  • Avid Amoeba@lemmy.ca
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    Have you tried secure-erasing a disk?

    Absolutely yes, I do enctypt my drives so I don’t have to ever do that again. This isn’t as critical for SSDs but it’s still a good idea. Even if you keep the key stored on the same system, securely deleting a tiny file is way easier than a whole disk.

    • MonkderDritte@feddit.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      Have you tried secure-erasing a disk?

      Once /dev/urandom is enough. Who cares if a state actor could theoretically recover your media library in an expensive lab.

        • h3ndrik@feddit.de
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 months ago

          And it has other benefits. For example a dying disk. You can just throw that out. I once tried to wipe such a disk and it’s a chore. It makes weird clicking noises and slows down to the point where it’d take years to overwrite it. Occasionally the SATA controller resets etc. And it won’t succeed at overwriting stuff. Sure I could go to the garage, get the power tools, put the hdd into a vise and delete everything with a combination of hammer and drill… But it’s much more convenient to have it encrypted and not care.

  • A Mouse@midwest.social
    link
    fedilink
    English
    arrow-up
    10
    ·
    6 months ago

    It’s a relatively low performance hit and it benefits me when having to replace a failing/old disk. I can just toss the drive without having to erase the data first, that is as long as the key is a secure length.

  • markstos@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 months ago

    In addition to “encryption at rest”, also consider that your devices might be exploited over the internet, so attackers may be able to access the decrypted state that way. To guard against that, you may wish to encrypt certain documents with an additional password, even if they are sitting on an encrypted file system.

    Recall that within a month, the widely SSH was exploited and a backdoor added to every machine. I had upgraded to that SSH version. I didn’t run an SSH server on that box, but it goes to show that even those who take precautions can end up exploited!

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      The XZ vulnerability was stopped in its tracks and did not really affect the majority of systems.

      I also have a hard time believing local file encryption can be that effective. All they need to do is capture your keystrokes.

      • markstos@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        It’s defense in depth. If I encrypt a rarely used file, capturing my keystrokes will eventually work, but it might be weeks or months before I return to decrypt that file. In the meantime, I might have realized I was hacked and restore the system.

  • JoeKrogan@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    6 months ago

    On laptops yes, on my server no. Most of the data is photo backups and linux ISOs form over the years.

  • Gooey0210@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    6 months ago

    Yes, all, no matter what data is, it’s not hard and doesn’t have any consequences, but protects from many inconvenient accidents

  • h3ndrik@feddit.de
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    6 months ago

    Yes.

    I encrypt everything. Laptop, server, backups, external hdds that are just for me. (Only thing I don’t encrypt is a VPS. It’s hosted on somebody else’s hardware and they’d be able to break the encryption anyways if they wanted.)

    I just put LUKS on it before formatting a filesystem. For the OS I use the good old approach with LUKS and a LVM inside.

    I mean if you don’t encrypt the backups, the encrytion of the system is kind of meaningless, isn’t it?