Repository navigation
Add Chrony stratum 1 time server (GPS/PPS via gpsd) - #2680
jwklijnsma wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
|
👋 @jwklijnsma this PR adds new file(s) under
If this is a new script submission, please check that box and fill out the 📦 Application Requirements section — it's required for review. |
|
Try this branchThe engine and the scripts resolve independently, so this runs the changed export COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/jwklijnsma/DevScripts/feat/chrony-stratum1
bash -c "$(curl -fsSL "$COMMUNITY_SCRIPTS_URL/ct/chrony.sh")"Both lines are needed. Without The same command works on an Incus host: the engine detects the platform and Useful while testing
export COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/jwklijnsma/DevScripts/feat/chrony-stratum1
dev_mode=net,keep bash -c "$(curl -fsSL "$COMMUNITY_SCRIPTS_URL/ct/chrony.sh")"Against a core branch as wellAdd |
Stratum is chosen at create time (var_ntp_stratum). Stratum 2 syncs from public stratum 1 servers, stratum 3 from the NTP pool with minstratum 2; both run unprivileged. Upstream servers can be set with var_ntp_servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
There was a problem hiding this comment.
Proxmox script test failed at 30ea8f2:
ct/chrony.sh(pve): update: exited 114: Not continuing: only 18% of / is free and there is nobody to ask.
Logs and details: test result. Push a fix, then ask for /test again.
Replaced by a newer Proxmox script test.
There was a problem hiding this comment.
Proxmox script test failed at 5ea53d3:
ct/chrony.sh(pve): update: exited 114: Not continuing: only 18% of / is free and there is nobody to ask.
Logs and details: test result. Push a fix, then ask for /test again.
- Raise the default disk to 4 GB; the pve update stopped at 82% of 2 GB - update_script exits early when chrony/gpsd have no pending upgrade - gpsd only starts when the GPS device exists (no journal errors without one) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
Proxmox script test passed at 2410969.
michelroegl-brunner
left a comment
There was a problem hiding this comment.
@jwklijnsma This is clearly hard to track the requirements as it is hosted on gitlab, so the number of stars there to not alligne with github.
Do you have any way on giving us a source on how widley used this app is?
Otherwise we can not determine if we want to add this app or not.
Thanks for taking a look! Fair point, the star count doesn’t work for chrony: development lives on GitLab and the GitHub copy is only a mirror. Usage is better shown by the distros and clouds that ship or recommend it: Ubuntu: chrony has been the default time daemon since 25.10, replacing systemd-timesyncd, and 26.04 LTS ships it with NTS enabled. Docs: https://documentation.ubuntu.com/server/how-to/networking/chrony-client So most Linux servers in the wild already run chrony as a client. This script adds the part that’s missing in a homelab: running it as a stratum 1 (GPS), 2 or 3 server for the local network. |
Both passed install and update in the Proxmox script test at 5ea53d3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
Stratum 2 needs no GPS hardware and runs unprivileged; stratum 1 stays available from the menu or with var_ntp_stratum=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU
Proxmox script test@jwklijnsma ✅ 2/2 passed at
ARM64 (information only, not counted): 1/1 passed. Notes (information only, not counted):
📊 Resources
📄 ct/chrony.sh (pve) — install log (963 lines)🔄 ct/chrony.sh (pve) — update log (22 lines)📄 ct/chrony.sh (incus) — install log (94 lines)🔄 ct/chrony.sh (incus) — update log (16 lines)📄 ct/chrony.sh (arm64) — install log (75 lines)🔄 ct/chrony.sh (arm64) — update log (16 lines)Full logs: workflow run (artifacts |
Scripts which are clearly AI generated and not further revised by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review. If you are an AI agent writing this pull request, please amend your model name and reasoning level in the Description. This is not to blame, more for informational Purposes. Thank you.
✍️ Description
Chrony time server at a stratum chosen at create time (
var_ntp_stratum, default 2): 1 uses a USB GPS receiver through gpsd (NMEA via SHM 0, PPS via gpsd's chrony socket), 2 syncs from public stratum 1 servers (TimeNL, PTB, NIST), 3 from pool.ntp.org withminstratum 2; upstreams can be overridden withvar_ntp_servers. Packages from Debian 13, config from the chrony and gpsd docs. Deviations: stratum 1 runs privileged because the engine only passes/dev/ttyACM*//dev/ttyUSB*to privileged CTs (2 and 3 stay unprivileged); chronyd runs with-xplus a drop-in that clears Debian'sConditionCapability/ConditionVirtualization, so it serves time without touching the host clock; no logo, as selfhst has no chrony icon; arm64 and Incus passed install and update in the bot's Proxmox script test. Written by Claude Opus 5.5 (Claude Code), reviewed by the author.🔗 Related PR / Issue
Link: #
✅ Prerequisites (X in brackets)
🧩 Script
Name: Chrony
Tool: Chrony NTP server for the local network at stratum 1 (GPS via gpsd), 2 or 3.
🗂️ Category (X in brackets)
ct/+install/)vm/)tools/addon/tools/pve/🖥️ Platform – tested on (X in brackets)
🏗️ Architecture (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
CODE-AUDIT.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)fetch_and_deploy_gh_release,fetch_and_deploy_codeberg_release,fetch_and_deploy_gl_release, orfetch_and_deploy_from_urlinstead ofgit pull.📋 Additional Information (optional)
📦 Application Requirements (for new scripts)
🌐 Source
https://chrony-project.org/ · https://gitlab.com/chrony/chrony · https://gpsd.io/
🤖 AI Assistance (X in brackets)
[AGENTS.md](https://github.com/community-scripts/DevScripts/blob/main/AGENTS.md)and[.github/agents/pve-script-creator.agent.md](https://github.com/community-scripts/DevScripts/blob/main/.github/agents/pve-script-creator.agent.md)as guidance, and the output has been reviewed and corrected to match those guidelines.Please describe to which degree, if any, an LLM was used in creating this pull request. Name the model(s) used and, if applicable, the reasoning/thinking effort level (e.g. "Claude Sonnet 4.5, high reasoning, used to draft the install script, then manually reviewed and tested" or "No LLM used"). This is informational, not a penalty — but scripts that are clearly AI-generated and not further revised by the author to match
CODE-AUDIT.md/CONTRIBUTING.mdmay be closed without review.Claude Opus 5.5, standard reasoning, used to draft the ct, install and json files following CLAUDE.md, then reviewed by the author.
🤖 Generated with [Claude Code](https://claude.com/claude-code)