I am a high school teacher and I'm trying to set up raspberry pi's for use in lessons. I've had to manually configure them to connect to our enterprise network but I'm informed the network doesn't have a time server on it to control time. I can't use the internet correctly because websites won't authenticate. I've tried "ntpdate" but as stated there is no time server available?


  • 3
    Can you get to a webserver? The htpdate package can sync clocks to the time in the headers of any web page - which can be inside or outside a firewall (depending what gets blocked by your controls).
    – Dougie
    Sep 9 '19 at 16:04

You may consider to use one of your Raspberry Pis as local time server. You can setup its clock manual without synchronizing with time server on the internet. So your local time server can present its time to the other RasPis. If you install:

rpi ~$ sudo apt install ntp-doc

you will find in /usr/share/doc/ntp-doc/html/index.html the entry point to the documentation. There you will find

There are three principal modes of operation in NTP: client/server, symmetric active/passive and broadcast/multicast

You may have a look at it what mode is the right one for your use case and configure it.


You can setup a time server on a Pi (which should have a RTC) or other computer as suggested by Ingo.

Another option is to copy the date from the host by running
ssh pi@hostname.local sudo date -s$(date -Ins)

This is feasible for a few machines, but you could script for a group of Pi and run on a master machine .

NOTE each Pi needs a unique hostname, but this is desirable anyway.

If using macOS (or BSD UNIX) the following should work
ssh pi@hostname.local sudo date -s$(date "+%Y-%m-%dT%H:%M:%S")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.