{
    "mode": "man",
    "parameter": "systemd-tpm2-setup.service",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/systemd-tpm2-setup.service/8/json",
    "generated": "2026-09-10T20:32:10Z",
    "synopsis": "systemd-tpm2-setup.service\n/usr/lib/systemd/systemd-tpm2-setup",
    "sections": {
        "NAME": {
            "content": "systemd-tpm2-setup.service, systemd-tpm2-setup-early.service, systemd-tpm2-setup - Set up the\nTPM2 Storage Root Key (SRK) at boot\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "systemd-tpm2-setup.service\n\n/usr/lib/systemd/systemd-tpm2-setup\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "systemd-tpm2-setup.service and systemd-tpm2-setup-early.service are services that generate\nthe Storage Root Key (SRK) if it hasn't been generated yet, and stores it in the TPM.\n\nThe services will store the public key of the SRK key pair in a PEM file in\n/run/systemd/tpm2-srk-public-key.pem and /var/lib/systemd/tpm2-srk-public-key.pem. It will\nalso store it in TPM2BPUBLIC format in /run/systemd/tpm2-srk-public-key.tpm2public and\n/var/lib/systemd/tpm2-srk-public-key.tpm2bpublic.\n\nsystemd-tpm2-setup-early.service runs very early at boot (possibly in the initrd), and writes\nthe SRK public key to /run/systemd/tpm2-srk-public-key.*  (as /var/ is generally not\naccessible this early yet), while systemd-tpm2-setup.service runs during a later boot phase\nand saves the public key to /var/lib/systemd/tpm2-srk-public-key.*.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/run/systemd/tpm2-srk-public-key.pem, /run/systemd/tpm2-srk-public-key.tpm2bpublic\nThe SRK public key in PEM and TPM2BPUBLIC format, written during early boot.\n\nAdded in version 255.\n\n/var/lib/systemd/tpm2-srk-public-key.pem, /var/lib/systemd/tpm2-srk-public-key.tpm2public\nThe SRK public key in PEM and TPM2BPUBLIC format, written during later boot (once /var/\nis available).\n\nAdded in version 255.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1)\n\nsystemd 255                                                            SYSTEMD-TPM2-SETUP.SERVICE(8)",
            "subsections": []
        }
    },
    "summary": "systemd-tpm2-setup.service, systemd-tpm2-setup-early.service, systemd-tpm2-setup - Set up the TPM2 Storage Root Key (SRK) at boot",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "SYSTEMD-TPM2-SETUP.SERVICE",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/SYSTEMD-TPM2-SETUP.SERVICE/8/json"
        }
    ]
}