{
    "mode": "man",
    "parameter": "systemd-cryptsetup",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/systemd-cryptsetup/8/json",
    "generated": "2026-06-12T11:18:25Z",
    "synopsis": "systemd-cryptsetup@.service\nsystem-systemd\\x2dcryptsetup.slice\n/lib/systemd/systemd-cryptsetup",
    "sections": {
        "NAME": {
            "content": "systemd-cryptsetup@.service, systemd-cryptsetup - Full disk decryption logic\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "systemd-cryptsetup@.service\n\nsystem-systemd\\x2dcryptsetup.slice\n\n/lib/systemd/systemd-cryptsetup\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "systemd-cryptsetup@.service is a service responsible for setting up encrypted block devices.\nIt is instantiated for each device that requires decryption for access.\n\nsystemd-cryptsetup@.service instances are part of the system-systemd\\x2dcryptsetup.slice\nslice, which is destroyed only very late in the shutdown procedure. This allows the encrypted\ndevices to remain up until filesystems have been unmounted.\n\nsystemd-cryptsetup@.service will ask for hard disk passwords via the password agent logic[1],\nin order to query the user for the password using the right mechanism at boot and during\nruntime.\n\nAt early boot and when the system manager configuration is reloaded, /etc/crypttab is\ntranslated into systemd-cryptsetup@.service units by systemd-cryptsetup-generator(8).\n\nIn order to unlock a volume a password or binary key is required.\nsystemd-cryptsetup@.service tries to acquire a suitable password or binary key via the\nfollowing mechanisms, tried in order:\n\n1. If a key file is explicitly configured (via the third column in /etc/crypttab), a key\nread from it is used. If a PKCS#11 token, FIDO2 token or TPM2 device is configured (using\nthe pkcs11-uri=, fido2-device=, tpm2-device= options) the key is decrypted before use.\n\n2. If no key file is configured explicitly this way, a key file is automatically loaded from\n/etc/cryptsetup-keys.d/volume.key and /run/cryptsetup-keys.d/volume.key, if present. Here\ntoo, if a PKCS#11/FIDO2/TPM2 token/device is configured, any key found this way is\ndecrypted before use.\n\n3. If the try-empty-password option is specified it is then attempted to unlock the volume\nwith an empty password.\n\n4. The kernel keyring is then checked for a suitable cached password from previous attempts.\n\n5. Finally, the user is queried for a password, possibly multiple times, unless the headless\noption is set.\n\nIf no suitable key may be acquired via any of the mechanisms describes above, volume\nactivation fails.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemd-cryptsetup-generator(8), crypttab(5), systemd-cryptenroll(1),\ncryptsetup(8)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. password agent logic\nhttps://systemd.io/PASSWORDAGENTS/\n\n\n\nsystemd 249                                                           SYSTEMD-CRYPTSETUP@.SERVICE(8)",
            "subsections": []
        }
    },
    "summary": "systemd-cryptsetup@.service, systemd-cryptsetup - Full disk decryption logic",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemd-cryptsetup-generator",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-cryptsetup-generator/8/json"
        },
        {
            "name": "crypttab",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/crypttab/5/json"
        },
        {
            "name": "systemd-cryptenroll",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-cryptenroll/1/json"
        },
        {
            "name": "cryptsetup",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cryptsetup/8/json"
        }
    ]
}