Posts

10 November /

I recently stumbled upon OxiTraffic, a self-hosted, simple and privacy respecting website traffic tracker which is well suited for blogs. What that means is

  • No personal data is logged
  • one binary or simple docker container
  • Readers are only counted if they spend >20s per site

As I currently have no analytics on my blog and I am not inclined to use anything that adds more than 2 sentences to my privacy disclaimer I thought I give it a try. Naturally I wrote an ansible role for this, which can be found under mother-of-all-self-hosting/ansible-role-oxitraffic. I now have this neat graph.

This blog post will try to outline the process of deploying ILMO (a Django app) by building a docker image, using ansible to install&configure it on our server and use Traefik as webserver that is readily configured and obtains certificates for us.

I will go through the steps one by one and link more extensive documentation.

Building the docker image

Building the docker image is pretty straightforward as it closely resembles the steps of manual deployment. The docker file is probably terribly inefficient as it is to large and should be build in stages. Consider this a working example, not a best practice. Also feel free to give me pointers on how to improve it. Specifics I want to point out are:

Hosting Static Sites with Traefik and Static Web Server

Traefik is amazing to host complex services like with containers. On the other hand it’s harder than you’d think to host a simple static html site. I wanted to share my current approach that is based on Static Web Server Project.

Static Web Server (SWS)

Static Web Server (or SWS abbreviated) is a simple and really fast web server with the goal to serve static web files or assets. The tiny docker image is only 4 MB with a small memory footprint. We can therefore afford to run a container for each static site.

This article is about monitoring some IoT devices (e.g. a CO2 sensor) with a combination of Mosquitto (a MQTT broker), Telegraf (a metric collector), InfluxDB (a time-series database) and Grafana (for displaying everything nicely). All mentioned services should run on a server that can be reached from the monitoring device(s) and your PC where you want to check the data. We will use MASH (see below) to deploy the services.

In the end this will enable you to get to something like this:

27 February /

I recently build a beginner-friendly ansible playbook for Garage, a S3 compatible distributed object storage.

What is garage-docker-ansible-deploy?

Garage is an open-source distributed object storage service tailored for self-hosting. The ansible playbook garage-docker-ansible-deploy helps you to set up such a cluster.

It comes with “batteries included” so it will automatically install docker and set up a reverse proxy (traefik).

You may be familiar with some related ansible playbooks that this playbook is based on

Use Case

You have one (or more) servers at a hosting provider and a raspberry pi at home. You want to have an offsite backup of the websites, apps and databases at home.

Prerequesits

You configure your raspberry pi to be reachable from the internet using DynDNS. In the following we assume that it is reachable at offsite.example.com.

Preparing your backup raspberry pi

We want to make sure that backups on the raspberry pi can come from multiple sources and one source can not delete another.

I recently had to write a lot of SQL code and thought it would be very neat to have some vim shortcuts to execute the current line or the current command. I want to share this with everyone as the second command needed some try-and-error on my part.

Adding the following to ~/.vimrc

map <F2> :.w !psql<CR>
map <F3> :.,/;/w !psql<CR>
map <F4> :w !psql<CR>

will enable you to execute the current line in psql with F2. F3 executes the current line and the next lines until a;. F4 executes the whole file.

Introduction

I am a HUGE fan of matrix. It allows me to organize my chats in a sensible way, it works with multiple identities and completly anonymous if I want it to. Spaces made Matrix my favourite messenger by far. Yet, there is one feature I have been missing: Disappearing messages!

Regarding the security and usability, only Signal is comparable to matrix. But: Signal offers the possibilty to define disappearing messages for groups and direct messages ranging from 30 seconds to 4 weeks. No Matrix client (to my knowledge) offers this functionality. Nevertheless, it is possible to configure matrix rooms to have the same feature. This needs a special server configuration and the sending of a special event in the room. This post tries to show both steps. If you do not administer a server you can probably skip to Room configuration

Integration

Following the quickstart documentation I tried to add cactus comments to this blog. I currently rely on infrastructure by cactus.chat as I do not host a private synapse server.

I currently implemented this as a shortcode with hard-coded site title and a variable room name.

Quickstart with HUGO

Register your site

There is a registration system, that ensures that you are moderater in your comment section(s). I order to register your site you have to send a message to @cactusbot:cactus.chat . First try help to ensure that the bot answers you, then register your site e.g. register hyteck. The bot should inform you of success and add you to a moderation room.

I recently installed an Owncast server and wanted to share my experience. Here it is:

What is owncast?

Owncast is a streaming server that you can selfhost, a Twicht in a box as the developers call it. You host owncast on your server (a small VM with good downlink is enough) and can stream your own own content like you would do on Twicht, YouTube etc…

It has a chat, a admin panel for customization and thats it! You don’t need more to e.g. stream while you are playing minecraft or want to share a talk.