this post was submitted on 31 Jul 2026
26 points (93.3% liked)

Selfhosted

61070 readers
935 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Crossposted from https://thebrainbin.org/m/linux@lemmy.ml/t/1840283

Which approach do you think is better, and why?

  1. FIDO2
  2. HMAC-SHA1
  3. OpenPGP (alternative guide)

Or do you think there is an even better way to use a hardware security token to unlock drives having LUKS full disk encryption?

you are viewing a single comment's thread
view the rest of the comments
[–] modem_down@thebrainbin.org 4 points 1 day ago (1 children)

Yes. Here are some common self-hosting scenarios:

  • Home server containing family files: scans, photos, device backups, ...
  • Office server containing business files: sensitive documents, device backups, ...
  • Web or email server containing websites, Fediverse instances, emails, etc

In all those cases, full disk encryption (FDE) is a sensible precaution to protect the data in case the server is physically stolen.

Linux is probably the most common OS kernel for self-hosting. On Linux, LUKS (Linux Unified Key Setup) is probably the best FDE system. It's mature and reliable. But anyone self-hosting a Linux server with LUKS FDE is faced with the question of where to store the keys.

Hardware security tokens (HSTs) are widely considered a safer place for keys than SSDs, HDDs, or USB storage. They follow the smartcard principle: a private key can be written to an HST but not read from it (security vulnerabilities excepted). Instead, they implement cryptographic algorithms to prove possession of the private key. So, anyone self-hosting a Linux server with LUKS FDE should strongly consider storing their private key(s) on an HST.

However, there is more than one way to do that. Hence the question in my OP.

[–] talkingpumpkin@lemmy.world 1 points 16 hours ago (4 children)

If it's a server for self hosting you definitely don't want anything that requires interaction at boot.

There's a project that allows unlocking LUKS with a decryption key retrieved from another machine in your network. I don't recall the name but someone hopefully will.

The idea is that put the key on, say, a raspberry pi zero w that you hide somewhere in your house so that if someone steals your server they don't have the key.

[–] JustEnoughDucks@slrpnk.net 3 points 8 hours ago

Some people are fine with down time/inconvenience in exchange for security.

I have my boot drive on a secured USB and LUKS keyfile with the rest of the partitions on an encrypted SSD and data on encrypted HDDs.

In a smash and grab (or fascist government gestapo smash and grab), the server is pretty impossible to steal information from (inject illegal content to in order to fabricate evidence) without the USB and they can't simply inject boot malware either. A network device is almost always findable either by cables or WiFi broadcast analyzing.

[–] superglue@lemmy.dbzer0.com 1 points 6 hours ago

I haven't actually tried it yet, but on that note, if you have an OpenWRT router you can configure dropbear to unlock it.

[–] modem_down@thebrainbin.org 2 points 10 hours ago

If it's a server for self hosting you definitely don't want anything that requires interaction at boot.

Depends on use-case. If you only plan to boot it when you're physically present, it's fine.

[–] esc@piefed.social 3 points 15 hours ago (1 children)
[–] modem_down@thebrainbin.org 2 points 10 hours ago

tang

Thanks. TIL about Clevis/Tang.