phochs

Server time
--:--:--
Your offset
Uncertainty

Welcome to my home page! This page is about the things I find interesting, and some experiments I run in my homelab that I would love to share with you. I'm on a journey to make my IT infrastructure, software and life in general less dependent on Big Tech, and with these experiments I want to prove that this is possible and share the experiences I have had migrating to a more EU-focussed setup.

This website has plenty of things to discover, with the aim to add more in the future!

What's on the globe

All the circles you can see orbiting the Earth are European satellites currently in operation. One of the constellations visible is Galileo. This is a constellation operated by the EU and offers an alternative to GPS. More and more GNSS receivers can receive position information from this system. Normally, a GNSS antenna can connect to multiple constellations to get a very accurate position fix. As an experiment, I have set this antenna to only receive Galileo satellites. It is usually connected to 6 or more satellites, giving excellent accuracy.

The full circles are satellites the GNSS receiver is receiving any form of signal from. Sometimes, this signal is really weak, preventing that satellite from being used for positioning. Once the signal is strong enough, the receiver will add the satellite to the set it uses for positioning, and you will see a line going down from the satellite to the ground. This means we are connected to it! You might see this line flashing for some satellites. In that case the signal strength is just borderline, and it is jumping in and out of usability. The Galileo satellites with a black center are ones we currently do not receive any signal from.

Apart from the Galileo satellites there are other constellations visible as well: Copernicus Sentinel - Low earth observation satellites, MetOp - Polar orbiting low earth observation satellites, Meteosat - Geostationary weather satellites, and the International Space Station - An international project with European modules.

The positions of the satellites are calculated from the orbital data of the satellites, downloaded from celestrak.org and EUMETSAT. I learned the hard way that you are meant to cache this data for an hour or 6.

Once you zoom in to the Netherlands, you see airplanes flying around! These do not come from an external source like Flightradar24, but are received locally by an ADS-B receiver on my roof. This is a simple UHF antenna connected to an RTL-SDR radio. These can be tuned to a wide range of frequencies, and can be used by other software to listen in on frequencies. In my setup, the RTL-SDR device is plugged into a Raspberry Pi which is running dump1090.

Time

Galileo satellites are not only useful for getting an accurate position, but to achieve that, having accurate time is essential. This is the main reason I connected a GNSS receiver to my homelab. Seeing the satellites visualized in orbit and the connections to the ground is awesome, but the end goal was to host my own timeserver, and not be dependent on internet services for a good time. Connecting the GNSS receiver to my server makes it Stratum 1, which my other devices on the network can use. When it is properly set up you can comfortably get microsecond accuracy over the local network, and with a bit of luck even nanosecond accuracy.

Mine is not set up properly (yet), though. The extension cord is connected with a really cheap electrical connector meant for model train wires, the receiver does not have the best sky view possible, it connects to Chrony, a piece of software instead of a hardware clock, and the server has no hardware timestamping capabilities. Yet, on average the drift stays within 500 ns, and the maximum drift I measured was within 2μs, more than enough for me!

This server is the main source of time for my entire network. If the GNSS setup fails, it can connect to the Dutch timeservers and still provide accurate time. It will just be less accurate than the time provided by GNSS. Another backup option could be adding a DCF77 receiver. This is a radio signal used by some clocks to automatically set their time.

This page has a time experiment running. In the top right, you can see the current server time, but also the difference between true time reported by Galileo and the current time on your PC, to the best of my abilities. Measuring time accurately over the internet is damn near impossible at the microsecond level. Therefore, it shows an uncertainty level to the right of your offset.

A digital island

There were two factors that inspired me to plan for a homelab that can form its own digital island, meaning that when internet services go down, it can continue to function pretty much the same way as before. Of course, having a stable internet connection is amazing and is essential for anything that connects you to others, but I wanted my homelab to be able to function when the internet is down for a few days or becomes an inhospitable place.

Firstly, whether we want to admit it or not, the internet is an openly hostile place nowadays. An enormous and growing portion of internet traffic is systems trying to break into other systems, place ransomware, exploit your data or recruit vulnerable systems for botnets. Socially it has turned hostile as well, with human bad actors on every platform hunting people of any age to exploit.

Secondly, the world has become an increasingly complex and decreasingly stable place. Allies we thought we could trust have turned on us significantly. The USA, which I once heard described as "the default country", has centralized many of the services the whole world relies on for the internet to function, and is now showing what it can do with that power. This has shown me that we in the EU need to be able to stand on our own two feet. Not only us though, this goes for every major region.

My homelab started as a lot of them do: a server, Docker, and a whole bunch of containers. Slowly over the last year, I have made an effort to make things more self-sufficient, and less reliant on external parties where possible. Below are the areas where my homelab has become self-sufficient to a greater or lesser extend and my recommendations around them. Everything is running as a Docker container on my local server. I can also highly recommend Homer as a dashboard for all your self-hosted services.

  • Nextcloud

    Well known, but still worth a recommendation. Very useful app to store your own files, contacts, calendar, etc. But one thing to keep in mind if you store any data yourself: BACKUPS! I can speak from experience: losing your data sucks, and at that point you will have wished you had them.

  • DNS

    One of the main backbones of the internet, as it resolves domain names to IP addresses (and other important information). I run two Technitium DNS servers in a cluster. These are set up with a secondary root zone, copying the entire root zone to my DNS servers. By default, they serve stale cache, which is useful if DNS globally has issues at some point. Also, I added my domains as primary zones, ensuring that traffic for my own services never leaves the network.

  • Time

    NTP is the unsung hero of privacy and security on the internet, needed to validate all certificates. I use a Chrony timeserver, which is connected to a TOPGNSS GN200G receiver, which provides a precise 1 pulse per second over RS232. Chrony is also used on most clients within the homelab to receive the Stratum 1 time from the timeserver.

  • Authentication

    No more publicly accessible database frontends or apps with potential attack vectors. Everything that is not a fully public web app is protected using OAuth, set up with Authentik. Many apps already support OAuth authentication, and the ones that don't I put OAuth2-Proxy in front. This is ideal, because it receives all the web traffic for the app, ensures the user is signed in, and when they are, it forwards the requests to the actual app. The app itself has no idea it is being secured.

  • Email

    Sadly it is almost impossible to host email yourself nowadays. Most emails sent from your own servers will just be rejected by the big email providers, because a lot of people abused the protocols, which were set up at a time when there was a guy who just knew everyone who was connected to the internet. But I will try anyway! It is not set up yet, so I will report back when it is.

Projects

  • Sky plot: Which European satellites are flying above you right now (plus the ISS because it is cool)
  • Live trains: All Dutch Railways trains currently running within the Netherlands
  • Morse Code: Learn the traditional communication skills of Morse Code!
  • Nuclide Map: Interactive chart of all known nuclides. Learn more about our chemistry and explore our surrounding isotopes.