1h delay from start to online
my small server shutdown every night at 10pm and also start automatically at 7am, but I can't use my apps until 8am.
Any idea for this delay?
Out of curiosity, why is the server shutting down during the night?
For the apps not being up, upon restart, in which states are the apps once the Cloudron dashboard is already reachable?
Why do I turn off the server? I do not use it at night and it is not efficient to run the server around the clock.
When it starts up and Cloudron comes online, I wait a short time and everything is okay!
I think I found the problem, it's the same one I had a few years ago when I was running an Univention server. The same situation. At night the server is shut down and at 7am I want to start the server via a BIOS function, but it doesn't go online until 8am. The problem was the internal clock and the synchronization with ntp.
Yesterday I saw a status page of my Nextcloud installation that said it was one hour ahead of the current clock.
Now I must configure ntp. I must search in my private Wiki how I solve the problem in the past. I'll put it here when I found it.
Thanks for explaining and your investigation. It should totally be possible to save energy by shutting it off when it is not required. Not sure why it wouldn't sync on reboot, however can you try if a
systemctl restart systemd-timesyncdsolves this right after a reboot?
@nebulon I think only the bios clock is not correct.
After a start, the ntp-client set the clock of Ubuntu to [BIOS-Time = UTC] + 1h for Germany, but the BIOS-Time is still set to UTC. My Server time said it is 9:19 UTC, but Ubuntu said it is 10:19. I think this is a bug.
Not exactly sure where the misconfiguration lies, but it does not sound too wrong if the BIOS time is UTC and the system is configured with a timezone and adjusts the system time. For simplicity in your case you might as well just set everything to UTC given that you are only 1 hour off. If you want to dive deeper into time management on Linux, you could read through https://wiki.archlinux.org/index.php/System_time#Hardware_clock which explains most of the things as well as instructs you how to keep both in sync.
Ps: The wiki page is for Archlinux, but Ubuntu uses the same tools here.
1.) sudo dpkg-reconfigure tzdata => set Timezone to Berlin
2.) sudo hwclock --systohc
Now is the Hardwareclock the same as my real clock.
Thanks for your help