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! 🤷🏻‍♂️

  • asbestos@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    7 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
      ·
      7 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.

    • lorentz@feddit.it
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 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.

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

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

    • hperrin@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 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
        ·
        7 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
      ·
      7 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.