You are not logged in.

#1 2026-03-05 14:10:59

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

[SOLVED] Setting up chrony local ntp server

Hi!

So I was like playing with tools basically to be better, and I want to make a local ntp serverr that uses chrony with the system clock, I want to know if this is okey to make it happend:


in the /etc/chrony.conf

server 127.0.1.1 prefer //Or whatever loopback address
allow 192.168.1.2/24
local stratum 10

then just systemctl enable chrony --now or restart the service.

Is this okey ?

Also I think there is way to make it use it with systemd-timesyncd, like as as frontend for chrony basically, to use timedate command. It is fine to make something like  this?

1) Disable systemd-timesyncd
2) Make the chrony configuration as has told before.
3) enable chrony by systemd.
4) go into /etc/systemd/systemd-timesyncd and put in the ntp=192.168.1.2 // The hostname ip address that the router delivers to the machine
5) enable systemd-timesyncd  by systemd

Is that correct to make ? I don't know how to troubleshoot this and I'm curious basically if this is possible.

Thanks for the help in advance ^^

Last edited by Succulent of your garden (2026-03-08 14:29:06)


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#2 2026-03-05 16:29:47

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,880

Online

#3 2026-03-05 17:05:13

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

Yes, but that uses an outside ntp, and I want to make it works with the system clock [That probably is stored in cmos], I'm not quite sure how to do that, and i wasn't able to find how to do that in the official chrony documentation, but it seems it's possible.


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#4 2026-03-05 17:12:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,880

Re: [SOLVED] Setting up chrony local ntp server

https://wiki.archlinux.org/title/Chrony … _computers and you can omit the server or (I'd guess) use 0.0.0.0 (invalid IP)
Tbc: your rtc isn't suitable as exact time source it will drift against the official UTC

Online

#5 2026-03-05 18:07:15

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

seth wrote:

Tbc: your rtc isn't suitable as exact time source it will drift against the official UTC

Yeah I know, it's like just for experimenting, learning and fun basically.

seth wrote:

https://wiki.archlinux.org/title/Chrony … _computers and you can omit the server or (I'd guess) use 0.0.0.0 (invalid IP)

But that will just disable the external ntp server ? or can be use to instance an off line ntp service ?

as the wiki command says:

pool 2.arch.pool.ntp.org iburst maxsources 4 offline

can I do like ?

pool 127.0.1.1 iburst maxsources 4 offline 

To make an instance of an off line ntp server ?


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#6 2026-03-05 18:30:53

-thc
Member
Registered: 2017-03-15
Posts: 1,104

Re: [SOLVED] Setting up chrony local ntp server

Took me 10 seconds: Following one link into the man page of "chrony.conf" and looking for alternative (non-"server" and non-"pool") time sources:

refclock RTC /dev/rtc0:utc

(If your RTC clock is set to UTC.)

Offline

#7 2026-03-05 18:50:52

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

-thc wrote:

refclock RTC /dev/rtc0:utc

But that enables the service as a local ntp service ? you mean putting that into the /etc/chrony.conf file ?


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#8 2026-03-05 20:35:39

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,880

Re: [SOLVED] Setting up chrony local ntp server

But that will just disable the external ntp server ?
But that enables the service as a local ntp service ?

Yes, wasn't that the plan all along?

Online

#9 2026-03-05 20:51:01

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

Yes, but i wasn't so sure about if that was just the case for external ntp servers. Gonna try both configs latter and check what it does. Thanks ^^


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#10 2026-03-08 14:29:55

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

So just for documentation: this code also seems to work in chrony by the way:

server 127.0.1.1 prefer //Or whatever loopback address
allow 192.168.1.2/24
local stratum 10

Marked solved. Thanks all for the help ^^


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#11 2026-03-08 17:09:42

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,601

Re: [SOLVED] Setting up chrony local ntp server

But,  with a stratum of 10, nothing is going to try to sync to your system.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#12 2026-03-11 07:49:12

Succulent of your garden
Member
From: Majestic kingdom of pot plants
Registered: 2024-02-29
Posts: 1,424

Re: [SOLVED] Setting up chrony local ntp server

Yeah I think so, but you think that also will be the case if the only ntp server is the chrony one ? Like I guess the system will be like: Let's check other stratum of high order first, mmmmhhh.... nothing, I guess so. So in the end uses the chrony one. Is that how it should work ?


str( @soyg ) == str( @potplant ) btw!

Also now with avatar logo included!

Offline

#13 2026-03-11 11:19:18

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,548

Re: [SOLVED] Setting up chrony local ntp server

So why jump around using all these methods to create low stratum time servers while you can have PPS NTP.
There are lots of nice home-build projects. You may have an old raspberry-pi lying around. Search the net for projects.
Really you can have your own local stratum 1 GPS for just a few bucks depending on what you have lying around.
I have never done this because there are freely available PPS timeservers available on the net.
Don't blindly enable one but search for those free PPS servers, otherwise you may? be kicked-of/blocked.
Sorry, I don't run my own timeserver anymore so I can't give you those. But search, read!!! and you'll find them;)

Offline

Board footer

Powered by FluxBB