# Install swtpm with Homebrew

Software TPM Emulator based on libtpms. Version 0.10.1 via Homebrew; verified 2026-07-13.

## Install

```sh
sudo av install brew:swtpm
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install swtpm
```

  Evidence: provider-native install command

## Package facts

- **Package key:** brew:swtpm
- **Package manager:** Homebrew
- **Version:** 0.10.1
- **Source summary:** Software TPM Emulator based on libtpms
- **Homepage:** <https://github.com/stefanberger/swtpm>
- **Repository:** <https://github.com/stefanberger/swtpm>
- **Last updated:** 2026-07-13T17:31:48+09:00
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- swtpm (alias)
- swtpm_bios (alias)
- swtpm_cert (alias)
- swtpm_ioctl (alias)
- swtpm_localca (alias)
- swtpm_setup (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.10.1
## Project history and usage

swtpm is a libtpms-based software TPM emulator with socket, character-device, and Linux CUSE interfaces. It is a command-line and service-oriented building block for virtual TPM workflows in QEMU, libvirt, testing, and confidential-computing-adjacent development.

### Project history

The upstream README credits David Safford and Stefan Berger and describes a package that provides TPM emulators with different front-end interfaces to libtpms. It also ships tools for using the emulator, creating TPM certificates, and simulating TPM manufacturing by creating endorsement-key and platform certificates.

### Adoption history

The input package facts show swtpm packaged across Homebrew, Alpine, Debian, Fedora, Nix, Arch, Ubuntu, and openSUSE. The upstream wiki includes build instructions for Ubuntu/Debian, RHEL, openSUSE, Alpine, OpenBSD, Cygwin, and macOS, reflecting a project maintained for distribution packaging and virtualization integration rather than a single application bundle.

### How it is used

Common usage is to run the swtpm emulator as part of a virtual-machine stack, control it with swtpm_ioctl, prepare state with swtpm_setup, and use supporting tools such as swtpm_cert and swtpm_localca for certificate-related TPM setup. The README directs users to per-tool READMEs and the wiki for operational details.

### Why package nerds care

Package nerds care because swtpm is infrastructure glue: a small C/Shell-heavy package that lets VM stacks expose TPM functionality reproducibly. Its packaging footprint matters because TPM emulation is only useful when libtpms, QEMU/libvirt integration, init scripts, config files, and distro build flags line up.

### Timeline

- v0.1.0 era: The upstream repository exposes early v0.1.x release tags.
- 2025: GitHub lists v0.10.1 as the latest swtpm release on April 30, 2025.
- Current packaging: The input package facts list swtpm in Homebrew and major Linux package ecosystems.

### Related projects

- Related projects and topics include libtpms, QEMU, libvirt, TPM 1.2/2.0 tooling, virtual TPM devices, and distro packaging for virtualization hosts.

### Sources

- <https://github.com/stefanberger/swtpm>
- <https://github.com/stefanberger/swtpm/blob/master/README>
- <https://github.com/stefanberger/swtpm/wiki>
- source_facts.executables
- source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for swtpm. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ${XDG_CONFIG_HOME}/swtpm_setup.conf, ${HOME}/.config/swtpm_setup.conf, /etc/swtpm_setup.conf, /etc/swtpm-localca.conf, /etc/swtpm-localca.options

## Combined YAML source

View the package source record on GitHub. [combined/swtpm.yml](https://github.com/automic-vault/db/blob/main/combined/swtpm.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
