Setting up AdguardHome and PiHole in MacVlans
Ads! We don't want them inside our home network. Trackers! We also don't want our apps tracking everything we do. Let's put a stop to it! On top of that we also have the benefit of our own DNS server!
Ads! We don't want them inside our home network. Trackers! We also don't want our apps tracking everything we do. Let's put a stop to it! On top of that we also have the benefit of our own DNS server!
NextCloud is one of those applications that can only take 1 domain. How how can we optimize our domain so that it can be used locally, over the tailnet, AND over the public internet, with different considerations for each?? This is where context aware DNS comes in handy.
Unlike the AIO, we just use a compose file to launch a nextcloud instance. I kind of prefer this, however, you do have to set up your own Collabora and OnlyOffice containers as well, which is not a big deal.
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.
We're going to generally follow the instructions for the "full" deployment found here https://doc.owncloud.com/ocis/next/depl-examples/ubuntu-compose/ubuntu-compose-prod.html. The main difference is that because we're already using Nginx as our reverse proxy, we can get rid of all references to Traefik which has been configured in this example project.
I wanted to jot down a couple of commands I've found useful.
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.
You set up a business email. Awesome! However, your outgoing emails on ending up in your recipients spam box. We need to fix that.
In this article, I'm going to use Microsoft 365 as my email provider, but the process will be similar for any provider.
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.
Docker Project folder
├── docker
│ ├── nginx
│ │ ├── docker-compose.yml
│ │ ├── cloudflare.ini
│ │ ├── nginx.conf
│ └── └── (any additional confs for server blocks)
└────────────