From 30ea8f2ab22e9a6af88513c16508b58d094cdac6 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Wed, 18 Nov 2026 18:28:21 +0100 Subject: [PATCH 1/7] Add Chrony stratum 1 time server (GPS/PPS via gpsd) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- ct/chrony.sh | 53 +++++++++++++++++++++++++++++++++++++ install/chrony-install.sh | 55 +++++++++++++++++++++++++++++++++++++++ json/chrony.json | 54 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 ct/chrony.sh create mode 100644 install/chrony-install.sh create mode 100644 json/chrony.json diff --git a/ct/chrony.sh b/ct/chrony.sh new file mode 100644 index 0000000000..272b9c6556 --- /dev/null +++ b/ct/chrony.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Jan Wiebe Klijnsma (jwklijnsma) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://chrony-project.org/ + +APP="Chrony" +var_tags="${var_tags:-ntp;time;gps}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-0}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified +export var_gps_device="${var_gps_device:-}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /etc/chrony/conf.d/gps.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating Chrony and gpsd" + apt_update_safe + upgrade_packages_with_retry chrony gpsd gpsd-clients + systemctl restart chrony gpsd + msg_ok "Updated Chrony and gpsd" + msg_ok "Updated successfully!" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW}Point your NTP clients at UDP port 123 and check the GPS lock with 'chronyc sources':${CL}" +echo -e "${GATEWAY}${BGN}${IP}:123${CL}" diff --git a/install/chrony-install.sh b/install/chrony-install.sh new file mode 100644 index 0000000000..9bb06c2cb9 --- /dev/null +++ b/install/chrony-install.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Jan Wiebe Klijnsma (jwklijnsma) +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://chrony-project.org/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +if [[ -z "${var_gps_device:-}" ]]; then + read -rp "${TAB3}GPS receiver device [/dev/ttyACM0]: " var_gps_device +fi +var_gps_device="${var_gps_device:-/dev/ttyACM0}" +if [[ ! -e "$var_gps_device" ]]; then + msg_warn "${var_gps_device} is not present yet; Chrony serves as stratum 2 from the pool until the GPS receiver is attached" +fi + +msg_info "Installing Chrony and gpsd" +$STD apt install -y \ + chrony \ + gpsd \ + gpsd-clients +msg_ok "Installed Chrony and gpsd" + +msg_info "Configuring Chrony" +cat </etc/chrony/conf.d/gps.conf +refclock SHM 0 refid NMEA offset 0.1 delay 0.2 poll 3 precision 1e-1 +refclock SOCK /run/chrony.${var_gps_device##*/}.sock refid PPS precision 1e-7 prefer +allow +EOF +cat </etc/default/chrony +DAEMON_OPTS="-F 1 -x" +EOF +systemctl restart chrony +msg_ok "Configured Chrony" + +msg_info "Configuring gpsd" +cat </etc/default/gpsd +DEVICES="${var_gps_device}" +GPSD_OPTIONS="-n" +USBAUTO="false" +EOF +systemctl enable -q gpsd +systemctl restart gpsd +msg_ok "Configured gpsd" + +motd_ssh +customize +cleanup_lxc diff --git a/json/chrony.json b/json/chrony.json new file mode 100644 index 0000000000..e6774d12c9 --- /dev/null +++ b/json/chrony.json @@ -0,0 +1,54 @@ +{ + "name": "Chrony", + "slug": "chrony", + "categories": [ + 4 + ], + "date_created": "2026-11-18", + "type": "ct", + "updateable": true, + "privileged": true, + "interface_port": null, + "documentation": "https://chrony-project.org/documentation.html", + "website": "https://chrony-project.org/", + "repository": "https://gitlab.com/chrony/chrony", + "architectures": ["amd64"], + "platforms": ["pve"], + "logo": null, + "description": "Chrony is an NTP implementation that, with gpsd and a GPS receiver as its reference clock, turns the container into a stratum 1 time server for your network. It uses the GPS NMEA time and, when the receiver delivers one, its PPS signal for microsecond accuracy, with the public NTP pool as fallback.", + "install_methods": [ + { + "type": "default", + "script": "ct/chrony.sh", + "config_path": "/etc/chrony/conf.d/gps.conf", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "app_vars": [ + { "name": "var_gps_device", "label": "GPS Receiver Device", "type": "text", "default": "/dev/ttyACM0" } + ], + "notes": [ + { + "text": "Plug the GPS receiver into the Proxmox host before creating the container; /dev/ttyACM0-1 and /dev/ttyUSB0-1 are passed through automatically.", + "type": "info" + }, + { + "text": "Stratum 1 needs a GPS fix. Run 'chronyc sources' and wait for NMEA or PPS to be marked with '*'; tune the NMEA offset in /etc/chrony/conf.d/gps.conf if it is rejected.", + "type": "warning" + }, + { + "text": "PPS works only with receivers that put it on the serial DCD line (e.g. FTDI); most USB ACM receivers give NMEA-only (~1 ms) accuracy.", + "type": "info" + } + ] +} From 5ea53d3557bb420b2ea71ef205dba0be2d0516a5 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Wed, 18 Nov 2026 18:40:32 +0100 Subject: [PATCH 2/7] Chrony: add stratum 2 and 3 modes 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 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- ct/chrony.sh | 33 ++++++++++++---- install/chrony-install.sh | 79 ++++++++++++++++++++++++++------------- json/chrony.json | 41 ++++++++++++++++---- 3 files changed, 112 insertions(+), 41 deletions(-) diff --git a/ct/chrony.sh b/ct/chrony.sh index 272b9c6556..d56f11af6a 100644 --- a/ct/chrony.sh +++ b/ct/chrony.sh @@ -15,9 +15,21 @@ var_ram="${var_ram:-512}" var_disk="${var_disk:-2}" var_os="${var_os:-debian}" var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-0}" +if [[ -z "${var_ntp_stratum:-}" ]] && command -v pveversion >/dev/null 2>&1; then + var_ntp_stratum=$(msg_menu "Choose the NTP stratum" \ + "1" "Stratum 1 - GPS receiver (privileged, USB passthrough)" \ + "2" "Stratum 2 - sync from public stratum 1 servers" \ + "3" "Stratum 3 - sync from the NTP pool or your own stratum 2") +fi +export var_ntp_stratum="${var_ntp_stratum:-1}" +if [[ "$var_ntp_stratum" == "1" ]]; then + var_unprivileged="${var_unprivileged:-0}" +else + var_unprivileged="${var_unprivileged:-1}" +fi #var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified export var_gps_device="${var_gps_device:-}" +export var_ntp_servers="${var_ntp_servers:-}" header_info "$APP" variables @@ -29,16 +41,23 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -f /etc/chrony/conf.d/gps.conf ]]; then + if [[ ! -f /etc/chrony/conf.d/server.conf ]]; then msg_error "No ${APP} Installation Found!" exit fi - msg_info "Updating Chrony and gpsd" + msg_info "Updating Chrony" apt_update_safe - upgrade_packages_with_retry chrony gpsd gpsd-clients - systemctl restart chrony gpsd - msg_ok "Updated Chrony and gpsd" + upgrade_packages_with_retry chrony + systemctl restart chrony + msg_ok "Updated Chrony" + + if [[ -f /etc/default/gpsd ]]; then + msg_info "Updating gpsd" + upgrade_packages_with_retry gpsd gpsd-clients + systemctl restart gpsd + msg_ok "Updated gpsd" + fi msg_ok "Updated successfully!" exit } @@ -49,5 +68,5 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW}Point your NTP clients at UDP port 123 and check the GPS lock with 'chronyc sources':${CL}" +echo -e "${INFO}${YW}Point your NTP clients at UDP port 123 and check the sources with 'chronyc sources':${CL}" echo -e "${GATEWAY}${BGN}${IP}:123${CL}" diff --git a/install/chrony-install.sh b/install/chrony-install.sh index 9bb06c2cb9..5a0c7324f1 100644 --- a/install/chrony-install.sh +++ b/install/chrony-install.sh @@ -13,42 +13,69 @@ setting_up_container network_check update_os -if [[ -z "${var_gps_device:-}" ]]; then - read -rp "${TAB3}GPS receiver device [/dev/ttyACM0]: " var_gps_device -fi -var_gps_device="${var_gps_device:-/dev/ttyACM0}" -if [[ ! -e "$var_gps_device" ]]; then - msg_warn "${var_gps_device} is not present yet; Chrony serves as stratum 2 from the pool until the GPS receiver is attached" -fi +var_ntp_stratum="${var_ntp_stratum:-1}" -msg_info "Installing Chrony and gpsd" -$STD apt install -y \ - chrony \ - gpsd \ - gpsd-clients -msg_ok "Installed Chrony and gpsd" - -msg_info "Configuring Chrony" -cat </etc/chrony/conf.d/gps.conf -refclock SHM 0 refid NMEA offset 0.1 delay 0.2 poll 3 precision 1e-1 -refclock SOCK /run/chrony.${var_gps_device##*/}.sock refid PPS precision 1e-7 prefer -allow +msg_info "Installing Chrony" +$STD apt install -y chrony +mkdir -p /etc/systemd/system/chrony.service.d +cat </etc/systemd/system/chrony.service.d/container.conf +[Unit] +ConditionCapability= +ConditionVirtualization= EOF cat </etc/default/chrony DAEMON_OPTS="-F 1 -x" EOF -systemctl restart chrony -msg_ok "Configured Chrony" +systemctl daemon-reload +msg_ok "Installed Chrony" + +if [[ "$var_ntp_stratum" == "1" ]]; then + if [[ -z "${var_gps_device:-}" ]]; then + read -rp "${TAB3}GPS receiver device [/dev/ttyACM0]: " var_gps_device + fi + var_gps_device="${var_gps_device:-/dev/ttyACM0}" + if [[ ! -e "$var_gps_device" ]]; then + msg_warn "${var_gps_device} is not present yet; Chrony serves as stratum 2 from the pool until the GPS receiver is attached" + fi + + msg_info "Installing gpsd" + $STD apt install -y gpsd gpsd-clients + msg_ok "Installed gpsd" -msg_info "Configuring gpsd" -cat </etc/default/gpsd + msg_info "Configuring Chrony as stratum 1" + cat </etc/chrony/conf.d/server.conf +refclock SHM 0 refid NMEA offset 0.1 delay 0.2 poll 3 precision 1e-1 +refclock SOCK /run/chrony.${var_gps_device##*/}.sock refid PPS precision 1e-7 prefer +allow +EOF + systemctl restart chrony + cat </etc/default/gpsd DEVICES="${var_gps_device}" GPSD_OPTIONS="-n" USBAUTO="false" EOF -systemctl enable -q gpsd -systemctl restart gpsd -msg_ok "Configured gpsd" + systemctl enable -q gpsd + systemctl restart gpsd + msg_ok "Configured Chrony as stratum 1" +else + if [[ -z "${var_ntp_servers:-}" ]]; then + read -rp "${TAB3}Upstream NTP servers, space separated [defaults]: " var_ntp_servers + fi + if [[ "$var_ntp_stratum" == "2" ]]; then + var_ntp_servers="${var_ntp_servers:-ntp.time.nl ptbtime1.ptb.de ptbtime2.ptb.de time.nist.gov}" + else + var_ntp_servers="${var_ntp_servers:-0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org}" + fi + + msg_info "Configuring Chrony as stratum ${var_ntp_stratum}" + sed -i 's/^pool /#pool /' /etc/chrony/chrony.conf + cat </etc/chrony/conf.d/server.conf +$(printf "server %s iburst minstratum $((var_ntp_stratum - 1))\n" $var_ntp_servers) +allow +EOF + systemctl restart chrony + msg_ok "Configured Chrony as stratum ${var_ntp_stratum}" +fi motd_ssh customize diff --git a/json/chrony.json b/json/chrony.json index e6774d12c9..c4079e0b07 100644 --- a/json/chrony.json +++ b/json/chrony.json @@ -12,15 +12,19 @@ "documentation": "https://chrony-project.org/documentation.html", "website": "https://chrony-project.org/", "repository": "https://gitlab.com/chrony/chrony", - "architectures": ["amd64"], - "platforms": ["pve"], + "architectures": [ + "amd64" + ], + "platforms": [ + "pve" + ], "logo": null, - "description": "Chrony is an NTP implementation that, with gpsd and a GPS receiver as its reference clock, turns the container into a stratum 1 time server for your network. It uses the GPS NMEA time and, when the receiver delivers one, its PPS signal for microsecond accuracy, with the public NTP pool as fallback.", + "description": "Chrony is an NTP implementation that runs here as a time server for your network, at stratum 1, 2 or 3. Stratum 1 uses a GPS receiver through gpsd as its reference clock (NMEA and, where available, PPS); stratum 2 syncs from public stratum 1 servers and stratum 3 from the NTP pool or your own stratum 2 server.", "install_methods": [ { "type": "default", "script": "ct/chrony.sh", - "config_path": "/etc/chrony/conf.d/gps.conf", + "config_path": "/etc/chrony/conf.d/server.conf", "resources": { "cpu": 1, "ram": 512, @@ -35,19 +39,40 @@ "password": null }, "app_vars": [ - { "name": "var_gps_device", "label": "GPS Receiver Device", "type": "text", "default": "/dev/ttyACM0" } + { + "name": "var_ntp_stratum", + "label": "NTP Stratum", + "type": "select", + "options": [ + "1", + "2", + "3" + ], + "default": "1" + }, + { + "name": "var_gps_device", + "label": "GPS Receiver Device (stratum 1)", + "type": "text", + "default": "/dev/ttyACM0" + }, + { + "name": "var_ntp_servers", + "label": "Upstream NTP Servers (stratum 2/3, space separated)", + "type": "text" + } ], "notes": [ { - "text": "Plug the GPS receiver into the Proxmox host before creating the container; /dev/ttyACM0-1 and /dev/ttyUSB0-1 are passed through automatically.", + "text": "Stratum 1 needs a USB GPS receiver on the Proxmox host before the container is created; it runs privileged so /dev/ttyACM0-1 and /dev/ttyUSB0-1 are passed through. Stratum 2 and 3 run unprivileged.", "type": "info" }, { - "text": "Stratum 1 needs a GPS fix. Run 'chronyc sources' and wait for NMEA or PPS to be marked with '*'; tune the NMEA offset in /etc/chrony/conf.d/gps.conf if it is rejected.", + "text": "Stratum 1 needs a GPS fix: wait until 'chronyc sources' marks NMEA or PPS with '*', and tune the NMEA offset in /etc/chrony/conf.d/server.conf if it is rejected.", "type": "warning" }, { - "text": "PPS works only with receivers that put it on the serial DCD line (e.g. FTDI); most USB ACM receivers give NMEA-only (~1 ms) accuracy.", + "text": "Stratum 2 syncs from TimeNL, PTB and NIST, stratum 3 from pool.ntp.org; set var_ntp_servers to use your own upstream servers.", "type": "info" } ] From 2410969e168565785c4f0a421eca18a714cdea1b Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Wed, 18 Nov 2026 19:06:18 +0100 Subject: [PATCH 3/7] Chrony: address Proxmox test feedback - 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 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- ct/chrony.sh | 9 +++++++-- install/chrony-install.sh | 8 +++++++- json/chrony.json | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ct/chrony.sh b/ct/chrony.sh index d56f11af6a..5b3257c3af 100644 --- a/ct/chrony.sh +++ b/ct/chrony.sh @@ -12,7 +12,7 @@ APP="Chrony" var_tags="${var_tags:-ntp;time;gps}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-512}" -var_disk="${var_disk:-2}" +var_disk="${var_disk:-4}" var_os="${var_os:-debian}" var_version="${var_version:-13}" if [[ -z "${var_ntp_stratum:-}" ]] && command -v pveversion >/dev/null 2>&1; then @@ -46,8 +46,13 @@ function update_script() { exit fi - msg_info "Updating Chrony" apt_update_safe + if ! apt list --upgradable 2>/dev/null | grep -qE '^(chrony|gpsd|gpsd-clients)/'; then + msg_ok "Chrony and gpsd are already up to date" + exit + fi + + msg_info "Updating Chrony" upgrade_packages_with_retry chrony systemctl restart chrony msg_ok "Updated Chrony" diff --git a/install/chrony-install.sh b/install/chrony-install.sh index 5a0c7324f1..6e7a54423b 100644 --- a/install/chrony-install.sh +++ b/install/chrony-install.sh @@ -35,7 +35,7 @@ if [[ "$var_ntp_stratum" == "1" ]]; then fi var_gps_device="${var_gps_device:-/dev/ttyACM0}" if [[ ! -e "$var_gps_device" ]]; then - msg_warn "${var_gps_device} is not present yet; Chrony serves as stratum 2 from the pool until the GPS receiver is attached" + msg_warn "${var_gps_device} is not present yet; Chrony serves as stratum 2 from the pool, and gpsd starts once the receiver is attached and the container restarted" fi msg_info "Installing gpsd" @@ -54,6 +54,12 @@ DEVICES="${var_gps_device}" GPSD_OPTIONS="-n" USBAUTO="false" EOF + mkdir -p /etc/systemd/system/gpsd.service.d + cat </etc/systemd/system/gpsd.service.d/device.conf +[Unit] +ConditionPathExists=${var_gps_device} +EOF + systemctl daemon-reload systemctl enable -q gpsd systemctl restart gpsd msg_ok "Configured Chrony as stratum 1" diff --git a/json/chrony.json b/json/chrony.json index c4079e0b07..d09dcfbe89 100644 --- a/json/chrony.json +++ b/json/chrony.json @@ -28,7 +28,7 @@ "resources": { "cpu": 1, "ram": 512, - "hdd": 2, + "hdd": 4, "os": "Debian", "version": "13" } From 0527c649e74e3a19c889998503116aeca3a641a6 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Thu, 19 Nov 2026 23:02:07 +0100 Subject: [PATCH 4/7] Chrony: mark arm64 and Incus as supported Both passed install and update in the Proxmox script test at 5ea53d3. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- ct/chrony.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/chrony.sh b/ct/chrony.sh index 5b3257c3af..ca90083ac5 100644 --- a/ct/chrony.sh +++ b/ct/chrony.sh @@ -27,7 +27,7 @@ if [[ "$var_ntp_stratum" == "1" ]]; then else var_unprivileged="${var_unprivileged:-1}" fi -#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified +var_arm64="${var_arm64:-yes}" export var_gps_device="${var_gps_device:-}" export var_ntp_servers="${var_ntp_servers:-}" From ed275e253e49a270e3d05b32dd4454978cfbca42 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Thu, 19 Nov 2026 23:02:18 +0100 Subject: [PATCH 5/7] Chrony: list arm64 and Incus in the JSON metadata Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- json/chrony.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/json/chrony.json b/json/chrony.json index d09dcfbe89..fc34fdebea 100644 --- a/json/chrony.json +++ b/json/chrony.json @@ -13,10 +13,12 @@ "website": "https://chrony-project.org/", "repository": "https://gitlab.com/chrony/chrony", "architectures": [ - "amd64" + "amd64", + "arm64" ], "platforms": [ - "pve" + "pve", + "incus" ], "logo": null, "description": "Chrony is an NTP implementation that runs here as a time server for your network, at stratum 1, 2 or 3. Stratum 1 uses a GPS receiver through gpsd as its reference clock (NMEA and, where available, PPS); stratum 2 syncs from public stratum 1 servers and stratum 3 from the NTP pool or your own stratum 2 server.", From 49e3e37f09d6a2c25fd08eddde0a81a2150765fa Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Thu, 19 Nov 2026 23:08:59 +0100 Subject: [PATCH 6/7] Chrony: default to stratum 2 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 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- ct/chrony.sh | 6 +++--- install/chrony-install.sh | 2 +- json/chrony.json | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/chrony.sh b/ct/chrony.sh index ca90083ac5..9c9757e9b1 100644 --- a/ct/chrony.sh +++ b/ct/chrony.sh @@ -17,11 +17,11 @@ var_os="${var_os:-debian}" var_version="${var_version:-13}" if [[ -z "${var_ntp_stratum:-}" ]] && command -v pveversion >/dev/null 2>&1; then var_ntp_stratum=$(msg_menu "Choose the NTP stratum" \ - "1" "Stratum 1 - GPS receiver (privileged, USB passthrough)" \ "2" "Stratum 2 - sync from public stratum 1 servers" \ - "3" "Stratum 3 - sync from the NTP pool or your own stratum 2") + "3" "Stratum 3 - sync from the NTP pool or your own stratum 2" \ + "1" "Stratum 1 - GPS receiver (privileged, USB passthrough)") fi -export var_ntp_stratum="${var_ntp_stratum:-1}" +export var_ntp_stratum="${var_ntp_stratum:-2}" if [[ "$var_ntp_stratum" == "1" ]]; then var_unprivileged="${var_unprivileged:-0}" else diff --git a/install/chrony-install.sh b/install/chrony-install.sh index 6e7a54423b..462360de9c 100644 --- a/install/chrony-install.sh +++ b/install/chrony-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -var_ntp_stratum="${var_ntp_stratum:-1}" +var_ntp_stratum="${var_ntp_stratum:-2}" msg_info "Installing Chrony" $STD apt install -y chrony diff --git a/json/chrony.json b/json/chrony.json index fc34fdebea..df1cd83831 100644 --- a/json/chrony.json +++ b/json/chrony.json @@ -46,11 +46,11 @@ "label": "NTP Stratum", "type": "select", "options": [ - "1", "2", - "3" + "3", + "1" ], - "default": "1" + "default": "2" }, { "name": "var_gps_device", From 873b4d46184a6683ca1baa6bc1a51657fd3740c1 Mon Sep 17 00:00:00 2001 From: Jan Wiebe Klijnsma Date: Thu, 19 Nov 2026 23:09:08 +0100 Subject: [PATCH 7/7] Chrony: default container is unprivileged in the JSON metadata Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SZrFpmr3MyXvpLAxxcqUwU --- json/chrony.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/chrony.json b/json/chrony.json index df1cd83831..1fb6bb0a03 100644 --- a/json/chrony.json +++ b/json/chrony.json @@ -7,7 +7,7 @@ "date_created": "2026-11-18", "type": "ct", "updateable": true, - "privileged": true, + "privileged": false, "interface_port": null, "documentation": "https://chrony-project.org/documentation.html", "website": "https://chrony-project.org/",