# Unlock luks encrypted usb drive using nitrokey

**URL:** <https://support.nitrokey.com/t/unlock-luks-encrypted-usb-drive-using-nitrokey/7764>\
**Category:** FIDO2 / Nitrokey 3\
**Created:** [October 7, 2026, 6:31pm UTC](https://support.nitrokey.com/t/unlock-luks-encrypted-usb-drive-using-nitrokey/7764 "2026-10-07T18:31:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nk3miniuser](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nk3miniuser](https://support.nitrokey.com/u/nk3miniuser)\
**Post date:** [October 7, 2026, 6:31pm UTC](https://support.nitrokey.com/t/unlock-luks-encrypted-usb-drive-using-nitrokey/7764/1 "2026-10-07T18:31:15Z")

</div>

I have a nitrokey 3 mini and would like to unlock luks partition in an external usb drive using nitrokey.

I find lot of articles about decrypting root luks partition automatically using nitrokey 3. For e.g the [linked script](https://github.com/secureblue/secureblue/blob/81e2b3ada5416bbe10a293bc9abd79d8cd86b0ea/files/system/usr/libexec/luks-enable-fido2-unlock.sh) setups fido2 based unlocking of root partition.

I would like to do something like below

1. Insert usb drive with luks encrypted partition
2. run a command that will prompt to enter user pin
3. Once the user pin is entered the system should prompt to touch the blinking nitrokey 3 mini.
4. Once the nitrokey 3 mini is touched, the luks partition should be unlocked.

Is it possible to do something like above using nitrokey 3 mini. Would be great to know how to set it up.

I am using debian based linux os if that’s not obvious.

---

<div class="post-metadata">

**Author:** ![nk3miniuser](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/n/54ee81/32.png) [@nk3miniuser](https://support.nitrokey.com/u/nk3miniuser)\
**Post date:** [October 7, 2026, 10:10pm UTC](https://support.nitrokey.com/t/unlock-luks-encrypted-usb-drive-using-nitrokey/7764/2 "2026-10-07T22:10:09Z")

</div>

I guess I did not search internet properly. According to the [linked article](https://kudelskisecurity.com/research/luks-disk-encryption-with-fido2) the command `systemd-crypenroll --fido2-device=auto <device>` will add fido2 based key and the command `cryptsetup open --token-only ` will unlock the device.

---

<div class="post-metadata">

**Author:** ![serpent](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@serpent](https://support.nitrokey.com/u/serpent)\
**Post date:** [October 10, 2026, 3:49pm UTC](https://support.nitrokey.com/t/unlock-luks-encrypted-usb-drive-using-nitrokey/7764/3 "2026-10-10T15:49:53Z")

</div>

I’m using such setup daily - LUKS partition decrypted on boot using FIDO2 key on different computers, including amd64 and arm64 (on Debian unstable). Above suggestion is more-or-less correct, you’ll need to use systemd-cryptenroll to add your FIDO2 as additional key to the LUKS partition. One remark: systemd expects encrypted partitions to be named _luks-UUID_ so you might need to edit your /etc/crypttab and/or /etc/fstab. In you want to decrypt your partitions during boot (you mentioned USB drive, but just in case you wan to go a bit further), you’ll need to switch from initramfs-tools to dracut. But I would not do it as first step: first make sure that you configure FIDO2 decryption, only then play with boot.

I’m not giving you commands to execute: messing with partitions is risky business so make backups (including LUKS header backup), make sure you know what you are doing, and read documentation and tutorials.

Have fun!
