A daemon to provide clients with an error bounded timestamp interval.
chronyd must be running in order to run ClockBoundD. If running on Amazon Linux 2, chronyd is already set as the default NTP daemon for you.
If running on Amazon EC2, see the EC2 User Guide for more information on installing Chrony and syncing to the Amazon Time Sync Service.
ClockBoundD can be installed using Cargo. Instructions on how to install cargo can be found at doc.rust-lang.org.
If it's your first time installing Cargo on an AL2 EC2 instance you may need to also install gcc:
sudo yum install gcc
Run cargo install:
cargo install clock-bound-d
If cargo was installed with the rustup link above the default install location will be at
$HOME/.cargo/bin/clockboundd
If built from source using cargo, it is recommended to set up systemd to manage ClockBoundD.
Configuration Example:
- Move binary to the location you want to run it from
sudo mv $HOME/.cargo/bin/clockboundd /usr/local/bin/clockboundd
- Create system user that systemd can use
sudo useradd -r clockbound
- Create unit file /usr/lib/systemd/system/clockboundd.service with the following contents
[Unit]
Description=ClockBoundD
[Service]
Type=simple
Restart=always
RestartSec=10
ExecStart=/usr/local/bin/clockboundd
RuntimeDirectory=clockboundd
WorkingDirectory=/run/clockboundd
User=clockbound
[Install]
WantedBy=multi-user.target
- Reload systemd
sudo systemctl daemon-reload
- Enable ClockBoundD to start at boot
sudo systemctl enable clockboundd
- Start ClockBoundD now
sudo systemctl start clockboundd
You can then check the status of the service with:
systemctl status clockboundd
To communicate with ClockBoundD a client is required. A rust client library exists at ClockBoundC that an application can use to communicate with ClockBoundD.
If you want to create a custom client see Custom Client for more information.
By default, ClockBoundD logs to syslog at /var/log/daemon.log.
syslog logs can be viewed with journalctl:
journalctl -u clockboundd
This README is generated via cargo-readme. Updating can be done by running:
cargo readme > README.md
See CONTRIBUTING for more information.
Licensed under the GPL v2 license.