SYSTEMD.SYSTEM-CREDENTIALS(7)
๐ SYSTEMD.SYSTEM-CREDENTIALS(7) ๐
okay bestie, gather round ๐ this is the manual page for systemd.system-credentials โ aka System Credentials. It's a long one, so buckle up, we're doing this in parts.
โจ NAME โจ
systemd.system-credentials โ System Credentials ๐๏ธ
๐ธ DESCRIPTION ๐ธ
System and Service Credentials[1] are data objects that can get passed into booted systems or into system services as they're invoked. Think of them like lil care packages ๐ฆ that show up exactly when something needs them.
They can be acquired from all kinds of external sources, and they get propagated into the system and from there into system services. Credentials can optionally be encrypted with a machine-specific key and/or locked to the local TPM2 device ๐ โ and they're only decrypted when the consuming service is invoked. So they stay locked up till the last possible second. Iconic behaviour honestly.
System credentials can be used to provision and configure various aspects of the system. Depending on which component is consuming them, credentials are either only used on initial invocations, or they're needed for all invocations.
Credentials can be used for any kind of data, binary or text โ passwords, secrets, certificates, cryptographic key material, identity information, configuration, and more. no cap, whatever you need to smuggle in there ๐
๐ WELL KNOWN SYSTEM CREDENTIALS ๐
These are the credentials that have a defined meaning, so if you use these names, things actually happen. Let's go one by one.
firstboot.keymapโ the console key mapping to set (like"de"). Read bysystemd-firstboot(1), and only honoured if no console keymap has been configured before.
Added in version 252.
firstboot.hostnameโ this credential says what static system hostname to set during first boot. The user won't get prompted for the hostname. Heads up tho: this controls the static hostname, not the transient hostname, and it only has an effect on first boot โ unlikesystem.hostname(which you'll meet further down ๐). Read bysystemd-firstboot(1), and only honoured if no static hostname has been configured before. The value may use the wildcard patterns documented inhostname(5)(like"$-$"or"foo-????"). When the credential is applied on the running system (which is the usual case, done bysystemd-firstboot.serviceon first boot), the wildcards get resolved against the machine ID and the resulting concrete name is written to/etc/hostname. So the name is persisted once at first boot and does not change on subsequent boots โ even if the word lists get updated later or the pattern is changed (for example to add more"?"/"$"tokens for extra entropy). And that's actually the recommended way to get a stable, per-machine generated hostname. ๐ (But whensystemd-firstboot(1)operates on an offline image via--root=/--image=, the target's machine ID isn't known yet, so the pattern gets written verbatim and, just like a pattern placed directly in/etc/hostname, it's re-derived on every boot instead of persisted.)
Added in version 261.
firstboot.locale,firstboot.locale-messagesโ the system locale to set (like"de_DE.UTF-8"). Read bysystemd-firstboot(1), and only honoured if no locale has been configured before.firstboot.localesets"LANG", whilefirstboot.locale-messagesets"LC_MESSAGES".
Added in version 252.
firstboot.timezoneโ the system timezone to set (like"Europe/Berlin"). Read bysystemd-firstboot(1), and only honoured if no system timezone has been configured before. ๐
Added in version 252.
firstboot.machine-tagsโ the machine tags to set, as a colon-separated list (like"webserver:frontend:berlin"). Read bysystemd-firstboot(1), and only honoured if/etc/machine-infohasn't been configured before. It gets written into theTAGS=field of that file โ seemachine-info(5)for the deets.
Added in version 261.
login.issueโ the data of this credential gets written to/etc/issue.d/50-provision.conf, if that file doesn't exist yet.agetty(8)reads this file and shows its contents at the login prompt of terminal logins. Seeissue(5)for details.
Consumed by /usr/lib/tmpfiles.d/provision.conf, see tmpfiles.d(5).
Added in version 252.
login.motdโ the data of this credential gets written to/etc/motd.d/50-provision.conf, if that file doesn't exist yet.pam_motd(8)reads this file and shows its contents as the "message of the day" during terminal logins. Seemotd(5)for details.
Consumed by /usr/lib/tmpfiles.d/provision.conf, see tmpfiles.d(5).
Added in version 252.
network.hostsโ the data of this credential gets written to/etc/hosts, if that file doesn't exist yet. Seehosts(5)for details.
Consumed by /usr/lib/tmpfiles.d/provision.conf, see tmpfiles.d(5).
Added in version 252.
network.dns,network.search_domainsโ DNS server information and search domains. Read bysystemd-resolved.service(8). ๐ฆ
Added in version 253.
network.conf.*,network.link.*,network.netdev.*,network.network.*โ configures network devices. Read bysystemd-network-generator.service(8). These credentials should contain validnetworkd.conf(5),systemd.link(5),systemd.netdev(5),systemd.network(5)configuration data. From each matching credential, a separate file gets created. Example: the contents of a credentialnetwork.link.50-foobarwill be copied into a file50-foobar.link.
Heads up bestie โ ๏ธ the resulting files are created world-readable, so it's recommended to not put secrets in these credentials. Instead, supply those via separate credentials directly tosystemd-networkd.service, e.g.network.wireguard.*as described below.
Added in version 256.
network.wireguard.*โ configures secrets for WireGuard netdevs. Read bysystemd-networkd.service(8). For more information, refer to the[WireGuard]section ofsystemd.netdev(5).
Added in version 256.
passwd.hashed-password.root,passwd.plaintext-password.rootโ may contain the password (either in UNIX hashed format, or in plaintext) for the root users. Read by bothsystemd-firstboot(1)andsystemd-sysusers(8), and only honoured if no root password has been configured before.
Added in version 252.
passwd.shell.rootโ the path to the shell program (like"/bin/bash") for the root user. Read by bothsystemd-firstboot(1)andsystemd-sysusers(8), and only honoured if no root shell has been configured before.
Added in version 252.
ssh.ephemeral-authorized_keys-allโ provides additional public keys, given in the customaryauthorized_keysformat, for all users, for incoming connections via the generatedAF_VSOCKandAF_UNIXsocket units.
The intended use of this is for a host system (in either VM or container configurations) to generate a keypair and inject the public key into the guest, using the private key to connect to any user account on the guest via ssh, without further authentication. ๐
Consumed by systemd-ssh-generator(8).
Added in version 256.
ssh.authorized_keys.rootโ the data of this credential gets written to/root/.ssh/authorized_keys, if that file doesn't exist yet. This lets you provision SSH access for the system's root user.
Consumed by /usr/lib/tmpfiles.d/provision.conf, see tmpfiles.d(5).
Added in version 252.
ssh.listenโ may be used to configure the SSH sockets the system shall be reachable on. Seesystemd-ssh-generator(8)for details.
Added in version 256.
sysusers.extraโ additionalsysusers.d(5)lines to process during boot.
Added in version 252.
sysctl.extraโ additionalsysctl.d(5)lines to process during boot.
Added in version 252.
tmpfiles.extraโ additionaltmpfiles.d(5)lines to process during boot.
Added in version 252.
fstab.extraโ additional mounts to establish at boot. For details, seesystemd-fstab-generator(8).
Added in version 254.
vconsole.keymap,vconsole.keymap_toggle,vconsole.font,vconsole.font_map,vconsole.font_unimap,vconsole.font_scaleโ console settings to apply, seesystemd-vconsole-setup.service(8)for details.
vconsole.font_scale was added in version 262.
Added in version 253.
getty.autoโ used for controlling the execution mode ofsystemd-getty-generator. Seesystemd-getty-generator(8)for details.
Added in version 258.
getty.ttys.serial,getty.ttys.containerโ used for spawning additional login prompts, seesystemd-getty-generator(8)for details.
Added in version 254.
journal.forward_to_socketโ used bysystemd-journald(8)to determine where to forward log messages for socket forwarding, seejournald.conf(5)for details.
Added in version 256.
journal.storageโ used bysystemd-journald(8)to determine where to store journal files, seejournald.conf(5)for details.
Added in version 256.
vmm.notify_socketโ configures ansd_notify(3)compatibleAF_VSOCKsocket that the service manager will report status information, ready notification and exit status on. For details seesystemd(1).
Added in version 253.
shell.prompt.prefix,shell.prompt.suffixโ defines strings to prefix and suffix any interactive UNIX shell prompt with. For details seepam_systemd(8). โจ
Added in version 257.
shell.welcomeโ defines a string to print when an interactive UNIX shell initializes. For details seepam_systemd(8).
Added in version 257.
system.machine_idโ takes a 128bit ID to initialize the machine ID from (if it isn't set yet). Interpreted by the service manager (PID 1). For details seesystemd(1).
Added in version 254.
system.hostnameโ accepts a (transient) hostname to configure during early boot. The static hostname specified in/etc/hostname, if configured, takes precedence over this setting. Interpreted by the service manager (PID 1). For details seesystemd(1). Also seefirstboot.hostnameabove. The value may use the wildcard patterns documented inhostname(5)("?"and"$"), which are expanded deterministically from the machine ID when the credential is applied. Since this is a transient hostname that gets re-applied on every boot, a wildcard value is re-derived each boot (and may change if the word lists change) and is never persisted โ so pass an already-resolved name if you need a stable hostname. Note also that the word-list tokens require the word lists to be present, which is generally not the case in the initrd, so during initrd the default hostname is used and in late boot the resolved one becomes available. ๐ซ
Added in version 254.
home.add-signing-key.*โ drops a brand new signing key for user records into the system. The credential contents should hold a user signing key, like the one you'd get back fromhomectl get-signing-key. You can pass multiple keys, and they all get put in place under the name of the credential-name suffix โ and that suffix must itself carry the.publicsuffix, no exceptions bestie. Full details are inhomectl(1).- Added in version 258.
home.create.*โ makes a whole new home area for the user you specify, using the user record data you pass in. The tea is inhomectl(1).- Added in version 256.
home.register.*โ registers a home area that already exists for the user you specify, with the user record data you pass in. Again,homectl(1)has the lore.- Added in version 258.
cryptsetup.passphrase,cryptsetup.tpm2-pin,cryptsetup.fido2-pin,cryptsetup.pkcs11-pin,cryptsetup.luks2-pinโ the passphrase/PINs used to unlock encrypted storage volumes ๐โจ. Details over insystemd-cryptsetup(8).- Added in version 256.
systemd.extra-unit.*,systemd.unit-dropin.*โ extra units and drop-ins you wanna add to the system.systemd-debug-generator(8)has the whole rundown.- Added in version 256.
udev.conf.*,udev.rules.*โ configures the udev configuration file and udev rules ๐ฆ. These get read bysystemd-udev-load-credentials.service, which invokesudevadm control --load-credentials. Every one of these credentials translates directly into a matchingudev.conf(5)orudev(7)rules file. Example, since examples ate: the contents of a credentialudev.conf.50-foobarget copied into a file/run/udev/udev.conf.d/50-foobar.conf, andudev.rules.50-foobargets copied into a file/run/udev/rules.d/50-foobar.rules. Peepudev(7),udev.conf(5), andudevadm(8)for the details.- Added in version 256.
import.pullโ the disk images (tarballs and DDIs) you want to automatically download and install at boot ๐ซถ. Details insystemd-import-generator(8).- Added in version 257.
userdb.user.*,userdb.group.*,userdb.transient.user.*,userdb.transient.group.*โ configures JSON user and group records ๐. Read bysystemd-userdb-load-credentials.service, which invokesuserdbctl load-credentials. Each of these credentials translates directly into a matching JSON User[2] and JSON Group[3] record. Example: the contents of a credentialuserdb.user.foobarget copied into a file/etc/userdb/foobar.user, anduserdb.group.foobargets copied into a file/etc/userdb/foobar.group. Symlinks for the uid/gid also get created in/etc/userdb/, plus the corresponding.membershipfiles. Seesystemd-userdbd.service(8),nss-systemd(8), anduserdbctl(1)for the details.- Any user records you pass must contain
uidandgidfields. Any group records you pass must contain agidfield. For both user and group records, the credential suffix (for"userdb.user.foobar"the suffix is"foobar") has to match the user or group name field from the user or group record. - Lowkey important: records created for
userdb.user.*anduserdb.group.*credentials land in/etc/userdb/, while records created foruserdb.transient.user.*anduserdb.transient.group.*land in/run/userdb/. And no,/etc/passwdand/etc/groupdo not get modified ๐. - Added in version 258.
- Any user records you pass must contain
fsck.*โ read bysystemd-fsck@.service,systemd-fsck-root.service, andsystemd-fsck-usr.service.systemd-fsck@.service(8)has more for you.- Added in version 258.
quotacheck.*โ read bysystemd-quotacheck@.serviceandsystemd-quotacheck-root.service. More details insystemd-quotacheck(8).- Added in version 258.
imds.*โ read bysystemd-imdsd@.service(8)โจ.- Added in version 261.
๐ SEE ALSO ๐
systemd(1), kernel-command-line(7), smbios-type-11(7)
๐ NOTES ๐
- System and Service Credentials โ https://systemd.io/CREDENTIALS
- JSON User โ https://systemd.io/USER_RECORD
- JSON Group โ https://systemd.io/GROUP_RECORD
And that's the whole page bestie, we did it ๐
This was the SYSTEMD.SYSTEM-CREDENTIALS(7) manual, and the footer told us it came from systemd 262.1 โ so if you're running something way older, some of these credentials literally didn't exist yet, iykyk. Go credential responsibly ๐๐ฆ๐ธ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms