<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  
  <title>Alex Dobin&#39;s Blog</title>
  <subtitle>A blog about technology and homelabbing</subtitle>
  <link href="https://alexdobin.com/feed.xml" rel="self" />
  <link href="https://alexdobin.com/" />
  <updated>2023-01-08T00:00:00Z</updated>
  <id>https://alexdobin.com/</id>
  <author>
    <name>Alex Dobin</name>
    <email>rssfeedback@dobin.dev</email>
  </author>
  <entry>
    <title>Anyone need more fediverse?</title>
    <link href="https://alexdobin.com/posts/moar-fediverse/" />
    <updated>2023-01-08T00:00:00Z</updated>
    <id>https://alexdobin.com/posts/moar-fediverse/</id>
    <content type="html">&lt;p&gt;I&#39;ve been running a single user Mastodon instance for a few months now. It&#39;s been running smoothly and has let me interact with the exodus of users from the bird site. But it can be lonely on a single user instance. Discovery can be hard, following #hashtags only shows you posts from
people you already follow, and you can&#39;t easily just browse the public timeline of some of the larger instances. I had read about &lt;a href=&quot;https://tool.motoretta.ca/2022/11/11/active-mastodon-relays/&quot;&gt;public relays&lt;/a&gt; but that seemed more like a firehose approach with too much content of questionable quality. I wanted something more curated.&lt;/p&gt;
&lt;h2&gt;Enter GetMoarFediverse&lt;/h2&gt;
&lt;p&gt;While looking for a solution I stumbled upon &lt;a href=&quot;https://github.com/g3rv4/GetMoarFediverse#you-can-run-it-on-docker&quot;&gt;GetMoarFediverse&lt;/a&gt; by &lt;a href=&quot;https://mastodonte.tech/@g3rv4&quot;&gt;@g3rv4@mastodonte.tech&lt;/a&gt;. It utilizes another one of @g3rv4&#39;s projects &lt;a href=&quot;https://github.com/g3rv4/FakeRelay/&quot;&gt;FakeRelay&lt;/a&gt; to allow you to follow hashtags, separately from your Mastodon followed hashtags, and automatically import posts.&lt;/p&gt;
&lt;h3&gt;Running GetMoarFediverse&lt;/h3&gt;
&lt;p&gt;There are a few different steps, spread across a few containers, to be able to run a fully selfhosted version of GetMoarFediverse. There are several different options on how to run each step but in the spirit of self-hosting my own Mastodon instance, I wanted to run everything myself. The steps are as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Configure and run FakeRelay&lt;/li&gt;
&lt;li&gt;Add an authorized instance to FakeRelay&lt;/li&gt;
&lt;li&gt;Add FakeRelay to your Mastodon instance&lt;/li&gt;
&lt;li&gt;Configure and run GetMoarFediverse&lt;/li&gt;
&lt;li&gt;Configure GetMoarFediverse to run on a schedule&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Configuring and running FakeRelay&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/g3rv4/FakeRelay/&quot;&gt;FakeRelay&lt;/a&gt; has pretty good documentation in it&#39;s README but you have to make sure to follow the guide for &lt;a href=&quot;https://github.com/g3rv4/FakeRelay/#i-want-to-run-this-myself&quot;&gt;I want to run it myself!&lt;/a&gt;. I use &lt;a href=&quot;https://doc.traefik.io/traefik/&quot;&gt;Traefik&lt;/a&gt; as my reverse proxy as well, so my &lt;code&gt;docker-compose.yaml&lt;/code&gt; looks like this:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;fakerelay&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;ghcr.io/g3rv4/fakerelay:latest&#39;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; web
    &lt;span class=&quot;token key atrule&quot;&gt;hostname&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; fakerelay
    &lt;span class=&quot;token key atrule&quot;&gt;container_name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; fakerelay
    &lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; ASPNETCORE_ENVIRONMENT=Production
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; ASPNETCORE_URLS=http&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;//+&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;5000&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; CONFIG_PATH=/data/config.json
    &lt;span class=&quot;token key atrule&quot;&gt;restart&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; unless&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;stopped
    &lt;span class=&quot;token key atrule&quot;&gt;volumes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;/mnt/data/appdata/fakerelay:/data&#39;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;ports&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; 5000&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;5000&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token key atrule&quot;&gt;traefik.http.routers.fakerelay.rule&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Host(`fakerelay.alexdobin.com`)
  &lt;span class=&quot;token key atrule&quot;&gt;cli&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;ghcr.io/g3rv4/fakerelay:latest&#39;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;volumes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;/mnt/data/appdata/fakerelay:/data&#39;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; traefik.enable=false&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;‼️ Do not immediately run &lt;code&gt;docker-compose up&lt;/code&gt;. You need to configure the &lt;code&gt;config.json&lt;/code&gt; file first using the &lt;code&gt;cli&lt;/code&gt; container! You will want to run the following command to generate a new &lt;code&gt;config.json&lt;/code&gt; file:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;docker-compose&lt;/span&gt; run &lt;span class=&quot;token parameter variable&quot;&gt;--rm&lt;/span&gt; cli config your-relay-host.example.com&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should now be able to start the main &lt;code&gt;fakerelay&lt;/code&gt; container with &lt;code&gt;docker-compose up -d&lt;/code&gt;. You should now be able to access the FakeRelay web interface at &lt;code&gt;http://fakerelay.alexdobin.com&lt;/code&gt; (or whatever you set your hostname to).&lt;/p&gt;
&lt;h3&gt;Adding an authorized instance to FakeRelay&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;cli&lt;/code&gt; container to interact with FakeRelay. FakeRelay can be used with multiple instances and requires authorization for each Mastodon instance you want to use it with. This is easy enough with our single instance, just run the following command:&lt;/p&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;docker-compose&lt;/span&gt; run &lt;span class=&quot;token parameter variable&quot;&gt;--rm&lt;/span&gt; cli instance &lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt; social.alexdobin.com&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will now see an API key for your instance. Copy this to a safe place, you will need it later on to configure GetMoarFediverse.&lt;/p&gt;
&lt;h3&gt;Adding FakeRelay to your Mastodon instance&lt;/h3&gt;
&lt;p&gt;Now that we have our FakeRelay instance running and authorized, we need to add it to our Mastodon instance. This is done by navigating to the admin portal on your Mastodon instance (/admin/relays). You will be prompted to add a new relay and should use the configured domain for your fake relay followed by &lt;code&gt;/inbox&lt;/code&gt; (e.g. &lt;code&gt;http://fakerelay.alexdobin.com/inbox&lt;/code&gt;). After submitting and waiting a few seconds, you should see the status update to &lt;code&gt;Enabled&lt;/code&gt; next to your relay.&lt;/p&gt;
&lt;h3&gt;Configuring and running GetMoarFediverse&lt;/h3&gt;
&lt;p&gt;There are several options for how to run &lt;code&gt;GetMoarFediverse&lt;/code&gt;, including utilizing GitHub actions. Instead we will follow the docker-compose method outlined in the &lt;a href=&quot;https://github.com/g3rv4/GetMoarFediverse#you-can-run-it-on-docker&quot;&gt;README&lt;/a&gt; to keep everything running on our own server. The &lt;code&gt;docker-compose.yaml&lt;/code&gt; file looks like this:&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;  &lt;span class=&quot;token key atrule&quot;&gt;getmoarfediverse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;container_name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; getmoarfediverse
    &lt;span class=&quot;token key atrule&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;ghcr.io/g3rv4/getmoarfediverse:latest&#39;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;volumes&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;/mnt/data/appdata/getmoarfediverse:/data&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before running, you will want to create the configuration file &lt;code&gt;config.json&lt;/code&gt; needed for &lt;code&gt;GetMoarFediverse&lt;/code&gt;. Below is an example configuration that I have used, placing it in &lt;code&gt;/mnt/data/appdata/getmoarfediverse&lt;/code&gt; or wherever you have locate the volume for your container.&lt;/p&gt;
&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;FakeRelayUrl&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;https://fakerelay.alexdobin.com&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;FakeRelayApiKey&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;YOUR_API_KEY_HERE&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;Tags&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;javascript&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;typescript&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;svelte&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;sveltekit&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;100DaysOfHomeLab&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;Instances&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;hachyderm.io&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;mastodon.social&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&quot;fosstodon.org&quot;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should replace &lt;code&gt;YOUR_API_KEY_HERE&lt;/code&gt; with the API key that you received earlier when registering your instance with FakeRelay. There are several options for configuring &lt;code&gt;GetMoarFediverse&lt;/code&gt; but for now this has done a good job at bringing in new content that I might want without overwhelming me or my server.&lt;/p&gt;
&lt;h3&gt;Configuring GetMoarFediverse to run on a schedule&lt;/h3&gt;
&lt;p&gt;GetMoarFediverse works great when it runs but it does not have any scheduling built in. I am using &lt;a href=&quot;https://github.com/PremoWeb/chadburn&quot;&gt;Chadburn&lt;/a&gt; which is a fork of &lt;a href=&quot;https://github.com/mcuadros/ofelia&quot;&gt;Ofelia&lt;/a&gt; with several quality of life fixes. I will cover setting Chadburn up in a separate blog post but adding the below to my Chadburn configuration was all I needed to run it with relative frequency.&lt;/p&gt;
&lt;pre class=&quot;language-ini&quot;&gt;&lt;code class=&quot;language-ini&quot;&gt;&lt;span class=&quot;token section&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token section-name selector&quot;&gt;job-run &quot;getmoarfediverse&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token key attr-name&quot;&gt;schedule&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token value attr-value&quot;&gt;@every 10m&lt;/span&gt;
&lt;span class=&quot;token key attr-name&quot;&gt;container&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token value attr-value&quot;&gt;getmoarfediverse&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  <entry>
    <title>Tailscale hostnames for Pi-hole stats</title>
    <link href="https://alexdobin.com/posts/tailscale-hostnames-for-pi-hole-stats/" />
    <updated>2022-08-01T00:00:00Z</updated>
    <id>https://alexdobin.com/posts/tailscale-hostnames-for-pi-hole-stats/</id>
    <content type="html">&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update 2025-03-31:&lt;/strong&gt;&lt;/em&gt; This applies to Pi-hole v5.0 and earlier. Pi-hole v6 has changed how configurations are handled and I have not validated that this works with the new version.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://tailscale.com&quot;&gt;Tailscale&lt;/a&gt; is a fantastic secure mesh VPN that lets you connect all of your devices to each other, no matter where they are or if you&#39;ve exposed them publicly to the internet. I use it extensively to use all my homelab services and run it on virtually every server. They have a very generous free tier and hope that enthusiasts enjoy it so much that they bring it to their workplace.&lt;/p&gt;
&lt;p&gt;Tailscale publishes a great &lt;a href=&quot;https://tailscale.com/kb/1114/pi-hole/&quot;&gt;article&lt;/a&gt; on how to use a &lt;a href=&quot;https://pi-hole.net/&quot;&gt;Pi-hole&lt;/a&gt; as the DNS server on your tailnet, allowing you to fully control the DNS of your device no matter what network you are connected to while leveraging their Magic DNS to connect to the other devices on your tailnet. One thing it doesn&#39;t cover is how to reenable conditional forwarding for your Pi-hole so that your statistics are not full of your Tailscale assigned &lt;code&gt;100.x.x.x&lt;/code&gt; addresses but instead show the machines hostname.&lt;/p&gt;
&lt;h2&gt;Conditional forwarding&lt;/h2&gt;
&lt;p&gt;Pi-hole already supports conditional forwarding but the UI only lets you configure a single local network. If you are like me, you still want to get the statistics for your local network but also would like to get the statics for machines on your tailnet. Luckily, Pi-hole uses dnsmasq and it&#39;s easy enough to add our own configuration file to support this use case.&lt;/p&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;p&gt;Pi-hole will load all configuration files for dnsmasq from &lt;code&gt;/etc/dnsmasq.d/&lt;/code&gt;. To support looking up the Tailscale hostnames, we need to add our own configuration file to this directory.&lt;/p&gt;
&lt;pre class=&quot;language-ini:&quot;&gt;&lt;code class=&quot;language-ini:&quot;&gt;&lt;span class=&quot;highlight-line&quot;&gt;rev-server=100.64.0.0/10,100.100.100.100&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The IP address range &lt;code&gt;100.64.0.0/10&lt;/code&gt; comes from the &lt;a href=&quot;https://tailscale.com/kb/1015/100.x-addresses/&quot;&gt;Tailscale documentation&lt;/a&gt;. &lt;code&gt;100.100.100.100&lt;/code&gt; is the IP address of the local Tailscale DNS server. You will see this address if you have &lt;a href=&quot;https://tailscale.com/kb/1081/magicdns/&quot;&gt;MagicDNS&lt;/a&gt; enabled, it will be listed as the DNS server for your tailnet.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Creating a blog</title>
    <link href="https://alexdobin.com/posts/first-post/" />
    <updated>2022-02-21T00:00:00Z</updated>
    <id>https://alexdobin.com/posts/first-post/</id>
    <content type="html">&lt;p&gt;I have been building a &lt;a href=&quot;https://www.reddit.com/r/homelab/wiki/introduction&quot;&gt;homelab&lt;/a&gt; for the last few years, mostly to &lt;a href=&quot;https://www.reddit.com/r/selfhosted/&quot;&gt;self-host&lt;/a&gt; services securely at home without relying on the major cloud providers. I&#39;ve learned a lot going through the experience and wanted to start sharing some of the knowledge back to the community outside of a few tiny pull requests that I&#39;ve made. Look for more coming soon!&lt;/p&gt;
</content>
  </entry>
</feed>