Skip to content

Getting Started

Install the daemon, read bounded time

ClockBound has two parts: the clockbound daemon that keeps the clock synchronized and publishes a bounded timestamp, and a client (Rust or C) that reads it. You need both.

1Install & start the daemon

Install from a release RPM, or build from crates.io with cargo install.

bash
# Download the RPM from the GitHub releases page
# (x86_64 and aarch64 Linux packages are provided)
sudo rpm -i clockbound-*.rpm

Then enable and start it as a systemd service:

bash
sudo systemctl enable clockbound
sudo systemctl start clockbound

The RPM installs the clockbound.service systemd unit for you. If you installed with cargo install, install the unit file first (shown in that tab) — otherwise systemctl enable clockbound will report that the unit was not found.

The daemon is zero-config: it auto-detects reference time sources and the platform. For the optional TOML configuration, see the Configuration reference.

2Verify it's synchronized

Check the clock status with cbctl, the command-line utility that ships with the daemon:

bash
cbctl status

For other subcommands, such as waitsync and sources, see the cbctl reference.

3Add a client to your application

Use the first-party Rust crate or the C/FFI library. Both read the daemon's shared-memory segment and return an earliest/latest pair plus a clock status.

Cargo.toml
[dependencies]
clock-bound = "3.0.0-rc.0"

Full build/link instructions for the C library live in the Clients reference.

Prerequisites

OS / archLinux on x86_64 or aarch64 (incl. AWS Graviton)
PrivilegesThe daemon runs as a privileged user (systemd service)
VMClock (disruption support)AL2 kernel-5.10.223-211.872+, AL2023 kernel-6.1.102-108.177+, or upstream Linux 6.13+
C clientgcc and the libclockbound library + header installed
Best accuracyEC2 instance with the enhanced Amazon Time Sync Service and a configured PTP Hardware Clock

If /dev/vmclock0 exists but the daemon can't read it, grant read access: sudo chmod a+r /dev/vmclock0. See Platforms for PHC and EC2 setup.