linux

Kubernetes and back - Why I don't run distributed systems

It’s almost outrageous to say that I don’t like distributed systems while working in a company that advertises as being cloud-native, headless and what not. And probably every SRE with some buzzword certifications may think I’m a complete idiot, but hear me out. Roughly a year ago, I decided to switch to a Kubernetes based multi-node environment with one of my side projects. The promise of doing zero-downtime deployments and node maintenance, better scalability and “self healing” if a node goes down sounded too good to not jump on the ever-growing train of tech marketing.

Suddenly, a homelab

Over the Christmas holidays, I somewhat fell into a rabbit hole. It started off by Ubiquiti announcing the Unifi Express and I thought: “Hey, I could use that and replace my Amplifi HD router”. Reality already was a bit more complicated, in fact the Amplifi HD is just my apartment router and Wifi AP, while in the basement I use a EdgeRouter X to separate networks for the two apartments in my house.

First workstation build in years

In the past fifteen years, I have used Macs and macOS became my operating system of choice. The first mac I got was a Mac Mini G4 and in the following years it was exchanged by a multitude of other devices. There are many things to love about the Mac, including the asthetics, silent operation, the fact that it all works out-of-the-box, alongside a neat UNIX-based operating system that can run both most proprietary applications alongside open source UNIX apps.

Move Docker Volumes using rsync

I’m running a Docker host on a Hetzner Cloud server. Since my GitLab instance grew quite big, I bought some additional storage that’s mounted to the machine as a additional device. All my Docker stuff uses local volumes located in /var/lib/docker/volumes. The question now was: How to move those volumes to the new storage? Docker volumes are basically just subdirectories in a special folder. For some applications it’s important to copy over all the extended attributes and other metadata like permissions, ownership and change dates.

byeCloud: Firefox Sync Server - UPDATE

In this article I will show you how to set up a Firefox Sync Server as a Docker container. In my case this will replace iCloud Bookmark / Tab synchronization. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services. I’ve evaluated different solutions to synchronize tabs and bookmarks, but none of them seemed to satisfy my needs. Firefox Sync almost does. Originally, I wanted to use Chromium with some plugin that would allow me to self-host a bookmark sync service.

Resize all images in subdirectories

For a project I was working on, I had a folder structure full of images and wanted to compress them to a specific maximum resolution in-place while retaining the aspect ratio using ImageMagick. The crucial point, as so often, were spaces and special characters in the folder names, making it really hard to use bash loops etc. to make this work. With the NULL character trick, luckily this works pretty well.

Download encrypted HLS content with ffmpeg

I maintain an archive of videos, especially documentaries from public media libraries from tv channels etc. on my NAS. Whilst I can use youtube-dl for the most part, it’s rather difficult for sites that use HTTP live streaming (HLS) to stream their content. In the most cases this is even AES-128 encrypted, which makes it difficult to download it. But since there’s players that support playback, it’s obviously possible to decode the stream on the client side.

Gmail DNS records for Hetzner Domain Robot

During a setup change I had to temporarily move my incoming mailserver to Gmail and while I am now back in my own mail server, I again had this major headache of configuring the my DNS (using BIND) because I always forget the dots in the end of CNAME and MX records because usually I dont create nameserver records for external domains… So anyway here is the final configuration I used in Hetzners Domain Robot:

byeCloud: News with Miniflux

In this article I will show you how to set up your own RSS feed aggregator with sync support for many third-party clients through the Fever API as a replacement for Apple News/Google News/Feedly. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services. Choosing the right software I fiddled around for a while with the News app for Nextcloud, ttr-rss and a few other alternatives, but ended up with Miniflux (now in version 2) because it is simple and lightweight and provides the most important thing for me, a Fever-compatible API without any plugins.

Mount Time Capsule SMB from a Linux host

As it turns out, the Apple Time Capsule only uses SMB protocol version 1 and NTLM for authentication. While this works with macOS without any changes, it often creates problem when trying to mount the the Time Capsule’s SMB share on a Linux system. With this parameters, mounting should work out of the box, given you have the cifs-utils (Debian/Ubuntu) installed: sudo mount.cifs //10.0.0.1/Data /mnt/timecapsule/ -o password='yourpw',sec=ntlm,uid=<local user>,vers=1.0 If you have any problems or further insights, feel free to leave a comment.

byeCloud: Building a mailserver with modern webmail

UPDATE Apr, 17 2018: Update imapsync to run as standalone docker container to make deployment easier. In this article I will show you how to set up a fully-featured mail server including webmail as a Docker container. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services. Let’s be honest: Setting up a mailserver really is a pain in the ass. Always. There are so many components involved, on a pretty standard setup starting from Dovecot and Postfix to Amavis, OpenDKIM, ClamAV, postgrey and much more.

byeCloud: Syncing Photos with Nextcloud

In this article I will show you how I set up my photo synchronization using Nextcloud. This article is part of the byeCloud series in which I try to replace iCloud with self-hosted services. One of the most important things in my setup is a solid and reliable way to synchronize Photos and videos I take. In one of the previous parts of this series I set up my Nextcloud instance.

Simple mail forwarding using Postfix

It’s more than likely that your email provider of choice, especially the ones that offer mail services free of charge, will not support receiving email to custom domain names like, in my case, davd.net. Running your own mail server would solve this problem but running a fully featured mail stack including POP, IMAP, Sieve filters et cetera requires a fairly powerful machine. Additionally, if not configured properly, there’s big potential for abuse, e.g. spam.

As an alternative, it’s possible to just run a MTA which redirects all incoming email to an external mail server. This can be ran on almost any machine, even on a low-budget computer like the Raspberry Pi or a cheap virtual server.

Simple Podcast-Downloader for Linux & BSD

During the last few months I managed to automate many recurring tasks on my NAS. One good example for those task is updating my podcast archive. I tried to accomplish this using a lightweight shell script which, running as a cronjob, would hold my podcast archive up to date and notify me about new episodes via push notifications.

Linux on the 13-inch MacBook Pro Retina

So it’s already been a month ago when I got my new 13-inch MacBook Pro w/ Retina Display. So everyone who knows me could already promise what would happen next: I’d install Linux on it. For this one I once again chose to use my favorite Linux distribution Fedora, which is currently available in version 20. Meanwhile I tried to install Ubuntu but this lead to problems with ACPI, the disk controller and last but not least the hi-res display featuring a pixel density from 227 ppi.

There are some things to have an eye on during the installation process but generally most things are working now so that the system is more or less ready for production usage.