Initial commit: Chrony NTP Server add-on for Home Assistant

- NTP client syncs from configurable pools and servers
- NTP server mode serves time to LAN clients
- Web UI dashboard showing sync status, sources, and clients
- Supports iburst and maxsources options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Adam Harrison-Fuller
2026-01-14 22:34:06 +00:00
co-authored by Claude Opus 4.5
commit 8963c16212
18 changed files with 1003 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
# Chrony NTP Server Add-on for Home Assistant
This add-on provides an NTP (Network Time Protocol) server and client using Chrony, enabling accurate time synchronization for your Home Assistant installation and local network devices.
## Features
- **NTP Client**: Synchronizes time from configurable upstream NTP servers
- **NTP Server**: Serves accurate time to devices on your local network
- **Lightweight**: Uses Chrony, a versatile and efficient NTP implementation
- **Multi-architecture**: Supports amd64 & aarch64
## Configuration
### Options
| Option | Description | Default |
| ------------------- | ----------------------------------------------------------- | ----------------------------------------- |
| `ntp_pools` | List of NTP pools (DNS names resolving to multiple servers) | pool.ntp.org |
| `ntp_servers` | List of individual NTP servers | time.google.com |
| `allow_clients` | Networks allowed to query this NTP server | 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 |
| `enable_ntp_server` | Enable NTP server mode | true |
| `detailed_logging` | Enable detailed chrony logs (measurements, statistics) | false |
### NTP Pools vs Servers
- **Pools** (`ntp_pools`): DNS names that resolve to multiple NTP servers (e.g., pool.ntp.org). Chrony will automatically discover and use multiple servers from the pool. Use `maxsources` to limit how many servers to use from each pool.
- **Servers** (`ntp_servers`): Individual NTP server addresses (e.g., time.google.com). Use these for specific servers you want to always query.
### Example Configuration
```yaml
ntp_pools:
- pool: "pool.ntp.org"
iburst: true
maxsources: 4
- pool: "time.cloudflare.com"
iburst: true
ntp_servers:
- server: "time.google.com"
iburst: true
allow_clients:
- "192.168.1.0/24"
enable_ntp_server: true
detailed_logging: false
```
## Installation
1. Add this repository to your Home Assistant add-on store
2. Install the "Chrony NTP Server" add-on
3. Configure the add-on options as needed
4. Start the add-on
## Usage
Once running, the add-on will:
1. Synchronize time from configured upstream NTP servers
2. If `enable_ntp_server` is true, serve time to clients on allowed networks via UDP port 123
### Configuring Clients
Point your network devices to use your Home Assistant's IP address as their NTP server.
## Support
For issues and feature requests, please open an issue on the repository.