Skip to content

Self Hosted

Setting up AdguardHome and PiHole on the bridge network

Last week I showed you how to run AdguardHome and PiHole using MacVLans. This way we didn't have to deal with any port conflicts and each dns server could be run simultaneously on its own IP address. However, it is undeniable that the MacVLan is a little bit trickier, so in this post we're going to set these up again, only one running at a time of course, in the bridge network, so that our actual server is also a DNS server.

Creating True Database Backups with Dumps

Too often I see folks relying on copies of a persisted database volume mount. While it is great people are backing up their database volumes, backing up a database volume can easily result in a corrupted backup unless the docker container is properly turned off prior to the backup. We like our containers running 24/7 though!

In this post, let's introduce ourselves to the following:

  • fradelg/mysql-cron-backup for MySQL / MariaDB
  • prodrigestivill/postgres-backup-local for Postgres

Setting up NextCloud AIO

We already have Nginx set up as our reverse proxy so that changes the docker command a bit. NextCloud AIO is simply portainer-like container management for NextCloud containers. We simply run a docker run command to initial the AIO interface and from there we configure the containers. If you run most of your apps with docker compose, this is slightly annoying because you cannot manage your containers like you normally would, you have to do so through the abstraction of the AIO interface.

Setting up Loki/Grafana in Docker to analyze Nginx logs

To be honest, it's a little confusing how to get started because there are lots of instructions out there and docker compose files floating around that are outdated. Let's follow the official docs at https://grafana.com/docs/loki/latest/setup/install/docker/#install-with-docker-compose.

The docker compose file from the docs as of today is here: https://raw.githubusercontent.com/grafana/loki/v3.4.1/production/docker-compose.yaml. Note that the link is likely subject to change with new versions.

Nginx in Docker with GeoIP

To use the GeoIP2 module. We pretty much need to use a Dockerfile to start with the latest nginx, but then compile the GeoIP2 module from source. This is preferred because using precompiled binaries is actually challenging - we have to ensure we get the binary that was compiled with the same nginx version that we have. Compiling the module ourselves actually simplifies this process.