Ntpserver

I work with an ubuntu core 16 with snap.
I will install a serverntp on it to synchronize the time of my PC to another PC.
i use timesyncd.conf and i can synchronize this PC to a server on the network. It is ok. But on my project i don’t have a network. My PC is having a good time, if i turn off for a long time, after restarting the time is good. i will use this time to give this to another PC.
I install the ntpserver but i cannot found the file ntp.conf on the /etc/
So the ntpserver cannot run correctly because i cannot adjust.
i will create it but i have an error: “cp: cannot create regular file ‘/etc/ntp.conf’: Read-only file system”.
someone can help me?

Dear lionel!
Let me explain this in my opinion:
You are created a snap with your application. And now when you install the snap you cannot see the ntp.conf inside the snap directory?
If im wrong, can you explain your situation with more detail. Im new but i can maybe help you.

hi golgo,
Yes i use an application that are using ubuntu and snap on my IoTGateway local.
For my application i will install ntpserver on it.
Because i work on a local network and i have my project on a IoTGateway local. But it don’t have display on this, i have like grafana on this. With another PC( raspberry for see a web page) i will see the web page on a screen.
if the time is different between the PC and the IoTGateway that wrong and i cannot see the curve.
i install for test, ntp on another raspberry with raspbian. This application is ok i use one of this with a server and one with a client. Perfect.
i will do the same with my IoTGateway but it is with snap.
so i found ntpserver i install but it is necessary i adjust this and i cannot i don’t understand where.
On raspberry i adjust the file ntp.conf but on snap i don’t found…

Hi lionel!

If you installed like this: snap install ntpserver → you cannot modify this app files because it is only read only.You can find the files under the /snap/application name folders. So maybe if you wanna adjust any value inside the snap, you have to search the snap source code and settings on github or other sites where the source codes located and with “snapcraft” you have to build a new snap.And then you can install on a local pc. Sorry if i misunderstand you :confused: and i couldn’t help :confused:

yes you understand my problem. I installed as you said. I can just read the files. But if i want adjust the files, it 's necessary i do this on the github. waouh…

Maybe this can be helpful:


Then you can check with:
sudo journalctl|grep systemd-timesyncd|grep Sync

But yeah all snaps need to be rebuild to use them.

Yes i did: i installed it (ntp control) and i tested it. it is to put the right server on the syncd.conf file. after if you have the internet, you can synchronize your IoTGateway with the server you have chosen. It’s ok and it works fine but for me I will synchronize locally (127.127.1.0) and after my IoTGateway will give the time with the ntpserver to my other PC.