# Install swtpm with Homebrew, apk, apt, dnf, Nix, pacman, zypper

Software TPM Emulator based on libtpms. Version 0.10.1 via Homebrew; verified 2026-06-22.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install swtpm
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add swtpm
```

  Evidence: Alpine Linux edge package indexes: swtpm from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install swtpm
```

  Evidence: Debian stable package indexes: swtpm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install swtpm
```

  Evidence: Fedora Rawhide package metadata: swtpm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#swtpm
```

  Evidence: nixpkgs package indexes: pkgs/by-name/sw/swtpm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S swtpm
```

  Evidence: Arch Linux sync databases: swtpm from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install swtpm
```

  Evidence: openSUSE Tumbleweed package metadata: swtpm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:swtpm
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/swtpm>
- **Version:** 0.10.1
- **Source summary:** Software TPM Emulator based on libtpms
- **Homepage:** <https://github.com/stefanberger/swtpm>
- **Repository:** <https://github.com/stefanberger/swtpm>
- **Upstream docs:** <https://github.com/stefanberger/swtpm/blob/master/README>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/stefanberger/swtpm/archive/refs/tags/v0.10.1.tar.gz>
- **Last updated:** 2026-06-22T22:48:58-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

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

## Dependencies

- gettext
- glib
- gmp
- json-glib
- libtasn1
- libtpms
- openssl@3

## Build dependencies

- autoconf
- automake
- gawk
- libtool
- pkgconf
- socat

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.10.1
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/stefanberger/swtpm
- Upstream latest detected: v0.10.1 (current)
## 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
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** swtpm
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - swtpm - 0.7.1-1.5: normalized package name match | Debian stable package indexes: swtpm from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Libtpms-based TPM emulator | https://github.com/stefanberger/swtpm
- Debian apt - swtpm-dev - 0.7.1-1.5: normalized package name match | Debian stable package indexes: swtpm-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Include files for the TPM emulator's CUSE interface | https://github.com/stefanberger/swtpm
- Debian apt - swtpm-libs - 0.7.1-1.5: normalized package name match | Debian stable package indexes: swtpm-libs from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Common libraries for TPM emulators | https://github.com/stefanberger/swtpm
- Debian apt - swtpm-tools - 0.7.1-1.5: normalized package name match | Debian stable package indexes: swtpm-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tools for the TPM emulator | https://github.com/stefanberger/swtpm
- Nix - swtpm: normalized package name match | nixpkgs package indexes: pkgs/by-name/sw/swtpm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - swtpm - 0.7.3-0ubuntu5: normalized package name match | Ubuntu 24.04 LTS package indexes: swtpm from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Libtpms-based TPM emulator
- Ubuntu apt - swtpm-tools - 0.7.3-0ubuntu5: normalized package name match | Ubuntu 24.04 LTS package indexes: swtpm-tools from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Tools for the TPM emulator
- apk - swtpm - 0.10.1-r2: normalized package name match | Alpine Linux edge package indexes: swtpm from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface | https://github.com/stefanberger/swtpm
- apk - swtpm-dev - 0.10.1-r2: normalized package name match | Alpine Linux edge package indexes: swtpm-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface (development files) | https://github.com/stefanberger/swtpm
- apk - swtpm-doc - 0.10.1-r2: normalized package name match | Alpine Linux edge package indexes: swtpm-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface (documentation) | https://github.com/stefanberger/swtpm
- dnf - swtpm - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | TPM Emulator | https://github.com/stefanberger/swtpm
- dnf - swtpm-devel - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Include files for the TPM emulator's CUSE interface for usage by clients | https://github.com/stefanberger/swtpm
- dnf - swtpm-libs - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Private libraries for swtpm TPM emulators | https://github.com/stefanberger/swtpm
- dnf - swtpm-selinux - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm-selinux from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | SELinux security policy for swtpm | https://github.com/stefanberger/swtpm
- dnf - swtpm-tests - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm-tests from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Installed swtpm tests | https://github.com/stefanberger/swtpm
- dnf - swtpm-tools - 0.10.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: swtpm-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tools for the TPM emulator | https://github.com/stefanberger/swtpm


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://www.automicvault.com/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - Runtime dependency declared by Homebrew.
- [json-glib](https://www.automicvault.com/pkg/brew/json-glib/) - Runtime dependency declared by Homebrew.
- [libtasn1](https://www.automicvault.com/pkg/brew/libtasn1/) - Runtime dependency declared by Homebrew.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [gawk](https://www.automicvault.com/pkg/brew/gawk/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [gotpm](https://www.automicvault.com/pkg/brew/gotpm/) - Shares av.db curated category or tags: cli, security, tpm.
- [aide](https://www.automicvault.com/pkg/brew/aide/) - Shares av.db curated category or tags: cli, security.
- [aircrack-ng](https://www.automicvault.com/pkg/brew/aircrack-ng/) - Shares av.db curated category or tags: cli, security.
- [amass](https://www.automicvault.com/pkg/brew/amass/) - Shares av.db curated category or tags: cli, security.
- [anubis](https://www.automicvault.com/pkg/brew/anubis/) - Shares av.db curated category or tags: cli, security.
- [authoscope](https://www.automicvault.com/pkg/brew/authoscope/) - Shares av.db curated category or tags: cli, security.
- [azurehound](https://www.automicvault.com/pkg/brew/azurehound/) - Shares av.db curated category or tags: cli, security.
- [bagel](https://www.automicvault.com/pkg/brew/bagel/) - Shares av.db curated category or tags: cli, security.
- [libjcat](https://www.automicvault.com/pkg/brew/libjcat/) - Both packages work with overlapping file formats or content types. Shared terms: cli, gettext, glib, json, json-glib.
- [osslsigncode](https://www.automicvault.com/pkg/brew/osslsigncode/) - Security-sensitive metadata or terminology overlaps. Shared terms: based, cli, openssl, openssl-3, security.
- [retdec](https://www.automicvault.com/pkg/brew/retdec/) - Security-sensitive metadata or terminology overlaps. Shared terms: based, cli, openssl, openssl-3, security.

## 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
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
