Stan's blog Thanks for stopping by.
Posts with the tag linux:

How to setup a VPN server using WireGuard (with NAT and IPv6)

WireGuard is a fast and modern VPN protocol. It is a point-to-point VPN, which means it does not have a client-server architecture, but peers, and does not rely on a PKI, unlike OpenVPN. It is super simple to setup to connect multiple machines together. WireGuard supports roaming, which means you can switch between network connections and not have to reconnect to your peers. On servers, it’s rarely useful, but when one of the peer is a mobile client like a laptop or a smartphone, it’s a life saver, because the usage of WireGuard is completely transparent.

How to set a static IPv4 address on a Raspberry Pi using dhcpd

Here’s a quick tip, that also applies to any linux machine using dhcpd. Every now and then my Raspberry Pi or my router can reboot, and I’m not certain than my Pi will get the same IP address from the DHCP server. Sure, I could fix it on the DHCP server using the Pi’s MAC address, but if you’re a lazy bum like me you can tell dhcpd to request a specific IPv4 address.

How to use encrypted block storage volumes on Hetzner Cloud

Hetzner recently introduced Block Volumes for their cloud product. It’s a very useful feature that allows to add tons of fast and redounded storage to VMs. I wanted to move my Nextcloud over Hetzner Cloud for quite some time now, but was unable to do so because of the available storage. Now I can! Since my Nextcloud contains sensitive and personal data, I don’t really want to my files to be written on a public Ceph storage cluster… Fortunately, I can encrypt my volume very easily thanks to cryptsetup.

How to measure a Raspberry Pi's temperature and CPU frequency with Telegraf

After 3 years of service, my Raspberry Pi’s filesystem finally got corrupted. I expected it to crash earlier, but it lasted for quite a while! Even if I had backups, I did have to reinstall it from scratch. I was using Munin to monitor my Raspberry Pi, and I think it’s a good solution for this kind of device because it’s lightweight and performs very little I/O. Anyway I decided to upgrade my monitoring stack, as on the rest of my infrastructure, with the Telegraf - InfluxDB - Grafana (TIG) stack.

How to improve Caddy's HTTPS configuration

Caddy’s default TLS configuration is very good. It includes a lot of features that older and well-known servers like Nginx or Apache don’t enable by default. From the tls module’s documentation: Caddy implements these TLS features for you automatically. It is the only server to do so by default: Session identifiers Session ticket key rotation OCSP stapling Dynamic record sizing Application-layer protocol negotiation Forward secrecy HTTP/2 (for the HTTP server) Certificate management (including auto-renew) Man-In-The-Middle detection (for HTTPS sites) Pretty awesome isn’t it?

How to enable TLS 1.3 on Nginx

TLS 1.3 is the new TLS version that will power a faster and more secure web for the next few years. The final release of TLS .13 has been out since august 2018. The final draft is supported by OpenSSL in its 1.1.1 version. LibreSSL does not support TLS 1.3 as of today, since they want to do a clean implementation. Nginx supports TLS 1.3 since version 1.13.0 (released in April 2017), when built against OpenSSL 1.

How to mount a local GlusterFS volume at boot (fstab/systemd fix)

When running a GlusterFS cluster, you may want to use the volume(s) on the servers themselves. During the boot process, GlusterFS will take a bit of time to start. systemd-mount, which handles the mount points from /etc/fstab, will run before the glusterfs-server service finishes to start. The mount will fail so you will end up without your mounted volume after a reboot. After doing to some research to fix this issue, I stumbled upon this Ubuntu bug report from 2011 (!

Automatically build and push Docker images using GitLab CI

When I began publishing public Docker images, I was using the GitHub integration with the Docker Hub to automatically build and publish my images. However, the Docker Hub is very slow to build images and has very, very limited configuration options. Then I discovered Drone which allowed me to build images on my own server, tag them, etc. The thing is I’m limited by the drone-docker plugin and I can’t do everything I want with it.

How to setup a Telegram bot for your Drone CI/CD builds

In my last post I presented Drone, an extremely light CI/CD server. One cool and satisfying thing is to be automatically notified of the output of your pipelines. In a company, you would probably use a Slack or HipChat bot. For a personal use, I think a Telegram bot is a good idea. Let’s setup one! Creating a Telegram bot Setting up a bot is free and actually very easy. You can do everything from a Telegram client.

Host your own CI/CD server with Drone

Continuous Integration and Continuous Delivery are very trendy topics in the DevOps world right now. There are quite a lot of services and software to build, test and deploy your code, but actually, a few are free and open-source and self-hostable. The most well-know softwares corresponding to these characteristics are Jenkins and GitLab CI. However, Jenkins has a huge memory footprint since it runs on Tomcat (Java). As for GitLab CI, it’s very good but requires you to run your own GitLab (which is huge) or to be on gitlab.