---
title: "Install on Linux"
description: "Make IMA measure, install the runtime packages and the notary .deb, and confirm the daemon attests."
source: "EQTY Notary"
---
On Linux the notary keeps its keys in the TPM 2.0 and proves which binary is running with a TPM
quote over the kernel's Integrity Measurement Architecture (IMA) log. The host has to be set up
for both before the daemon can attest. You need:

- A TPM 2.0 at `/dev/tpmrm0`. In a VM, a vTPM works, including one the notary itself provides
  on another host. See [Hardware-rooted vTPMs](../../notary-backed-vtpm/index.mdx).
- A kernel of 5.8 or newer with `CONFIG_IMA`. Debian 13 and Ubuntu 24.04 qualify.
- Root.

Fill in the release you are installing:

<token-field name="VERSION" label="Notary release" placeholder="0.0.8"
  pattern='^\d+\.\d+\.\d+$' pattern-message="Must be a version like 0.0.8"></token-field>

## 1. Make sure IMA is measuring

<Alert variant="warning" title="A kernel with IMA is not enough">
  IMA measures nothing until a policy is loaded, and most distributions, including Debian and
  Ubuntu cloud images, boot without one. Without a policy the daemon starts, but `/v1/isReady`
  stays `pending` and no credential is issued.
</Alert>

Check whether it is measuring now:

```sh
grep -o 'ima_policy=\S*' /proc/cmdline                         # want: ima_policy=tcb
sudo cat /sys/kernel/security/ima/runtime_measurements_count   # want: hundreds, growing
sudo dmesg | grep 'ima: Allocated hash'                         # want: sha256
```

A measurement count of `1` means IMA is compiled in but idle: the only entry is the boot
aggregate.

To enable it, add `ima_policy=tcb` to the kernel command line. Use a GRUB drop-in rather than
editing `/etc/default/grub`: cloud images already ship drop-ins, and a drop-in is easy to remove.

```sh
echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT ima_policy=tcb"' \
  | sudo tee /etc/default/grub.d/90-eqty-ima.cfg
sudo update-grub
grep -c ima_policy=tcb /boot/grub/grub.cfg   # non-zero: the boot entries carry it
sudo reboot
```

After the reboot, run the three checks again. To undo: delete the drop-in, run `update-grub`,
reboot.

Two related settings:

- If `dmesg` reports a hash other than `sha256`, add `ima_hash=sha256` to the same line. The
  credential replays the SHA-256 PCR bank.
- `bpf` in `/sys/kernel/security/lsm` is optional. It enables the BPF LSM key guard that stops
  other processes, root included, from opening the key blobs. If it is missing, append it to the
  existing `lsm=` list. Never replace the list, or you silently drop the LSMs you leave out.
  Without it the daemon still runs; file permissions and TPM sealing remain.

## 2. Install the runtime packages

Debian 13 and Ubuntu 24.04 package names:

```sh
sudo apt-get install -y libtss2-esys-3.0.2-0t64 libtss2-tctildr0t64 \
  libtss2-tcti-device0t64 libtss2-mu-4.0.1-0t64 libtss2-rc0t64 libbpf1 tpm2-tools
```

Check the chip answers:

```sh
sudo tpm2_getrandom 8 --hex     # eight random hex bytes
```

`TPM_RC_INITIALIZE` means the TPM has not been started this boot: `sudo tpm2_startup -c`.

## 3. Install the notary

From the release `.deb` attached to the
[vcomp-notary-desktop release](https://github.com/eqtylab-RND/vcomp-notary-desktop/releases):

```sh
sudo apt-get install ./eqty-notary_{{VERSION}}_amd64.deb
```

Use `_arm64.deb` on an arm64 host. The package installs:

| Path                                        | What                                                                   |
| ------------------------------------------- | ---------------------------------------------------------------------- |
| `/usr/local/bin/eqty-notary`                | The daemon                                                             |
| `/usr/local/bin/eqty-notaryctl`             | The [command line](../advanced/cli.mdx)                                         |
| `/usr/local/lib/eqty-notary/*.bpf.o`        | The observer and key-guard BPF objects                                 |
| `/usr/local/lib/eqty-notary/swtpm`          | The forked swtpm for [vTPMs](../../notary-backed-vtpm/index.mdx), when the package was built with it |
| `eqty-notary.service`                       | The systemd unit, enabled and started                                  |
| `/usr/lib/sysctl.d/50-eqty-notary.conf`     | `kernel.perf_event_paranoid = 2`, see below                            |
| `/var/run/eqty-notary/eqty-notary.sock`     | The Unix socket, mode `0666`                                           |
| `/var/log/eqty-notary/`                     | Per-process [audit logs](../advanced/audit-log.mdx), readable by the `eqty-notary` group |
| `/var/lib/eqty-notary/`                     | Keys, attestation bundle and vTPM state, mode `0700`                   |

The unit runs the daemon as root with `EQTY_AUTO_REGISTER=1` and `EQTY_ACCEPT_NETNS_PEERS=1`
set, so any local binary gets a key on first use and callers in other network namespaces on this
host, such as Kubernetes pods, are resolved. Both can be turned off in a drop-in; see
[Configuration](../advanced/configuration.mdx).

<Alert variant="neutral" title="perf_event_paranoid">
  Debian and Ubuntu default to a `kernel.perf_event_paranoid` level that refuses the observer's
  kprobes without `CAP_SYS_ADMIN`, which the daemon deliberately does not hold. The package sets
  the upstream kernel default of `2`. At the stricter level the daemon exits with
  `kprobe_bprm_execve attach: perf_event_open failed`. A file of your own in `/etc/sysctl.d/`
  overrides the package's.
</Alert>

To build from source instead, see the repository's `LINUX-DEV.md`. Build on a system whose glibc
is no newer than the target's.

## 4. Confirm it attests

```sh
curl -s http://127.0.0.1:8066/                   # process is up
curl -s http://100.100.100.200:8066/             # well-known address
curl -s http://127.0.0.1:8066/v1/isReady         # {"status":"ready",...}
curl -s http://127.0.0.1:8066/v1/credential | jq '.statements | length'
```

If `isReady` stays `pending`, read the startup log:

```sh
journalctl -u eqty-notary -b
```

| Log line                                     | Meaning                                                                                        |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `IMA binary log not found`, `no IMA entry for …` | Step 1 is not in effect.                                                                   |
| `PCR[10] extend log does not fold`           | The IMA list and the register diverged, usually because the host measures into another bank. Add `ima_hash=sha256`. |
| `key-guard skipped`                          | `bpf` is not in the LSM stack. The daemon runs without the hook.                              |
| `TPM context init: tcti device init failed`  | The daemon cannot open `/dev/tpmrm0`. Check the device exists and that `tpm2_getrandom` works. |

### Key Guardian

The unit sets `EQTY_KEY_GUARDIAN_URL` to EQTY's development Key Guardian. On first start the
daemon has its attestation key certified there, once, and embeds the certificate in its identity
credential. Comment the line out in a drop-in to run without certification. A guest notary on a
vTPM should run without it, so that the vTPM's IAK certifies the AK instead. See
[Run a Guest Notary](../../notary-backed-vtpm/guest-notary.mdx#what-a-guest-notary-adds).

## Manage

```sh
sudo systemctl status eqty-notary
sudo journalctl -u eqty-notary -f
sudo systemctl restart eqty-notary
sudo systemctl edit eqty-notary          # drop-in for environment overrides
sudo usermod -aG eqty-notary $USER       # read the audit logs as a non-root user
```

### Wipe the signing material

```sh
sudo eqty-notary --wipe-keys
sudo systemctl restart eqty-notary
```

Deletes every key blob under `EQTY_KEYS_DIR`. The directory stays. This is destructive: every
binary gets a new key, and a new DID, on its next registration.