<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>federation &amp;mdash; Vance&#39;s Notes</title>
    <link>https://blog.ylhuang.com/tag:federation</link>
    <description>🔗 https://vance.ylhuang.com/</description>
    <pubDate>Sat, 09 May 2026 04:06:08 +0200</pubDate>
    <item>
      <title>Lessons learned: How not to federate Mastodon</title>
      <link>https://blog.ylhuang.com/lessons-learned-how-not-to-federate-mastodon</link>
      <description>&lt;![CDATA[I&#39;m not entirely sure what I want this blog to be yet. For now, it will just be whatever project I&#39;m currently working on.&#xA;&#xA;So I just tried following someone else on Mastodon and noticed that I couldn&#39;t follow anyone. Nor could they follow me. Checking in Mastodon Sidekiq reveals the issue:&#xA;Mastodon::UnexpectedResponseError: returned code 401&#xA;&#xA;I looked online and found this GitHub issue. Turns out, there&#39;s a small wrinkle with setting up LOCAL_DOMAIN and having other things hosted on the same server. It looks like Mastodon servers (and probably other software in the Fediverse) use the the Webfinger protocol to verify that an account exists on the server. However, my domain&#39;s Webfinger instance was pointing to my homepage instead!&#xA;&#xA;So all the servers were rejecting my follow requests and interactions as illegitimate. After correctly redirecting the Webfinger endpoint of my main domain (https://ylhuang.com/.well-known/webfinger), I was back online and all my interactions within the Fediverse happened soon after (likes, follows, etc.).&#xA;&#xA;Hopefully, this helps others trying to set up their own Mastodon server.&#xA;&#xA;&#39;Til next time!&#xA;&#xA;Tags: #federation #mastodon #troubleshooting #Fediverse&#xA;&#xA;Questions or suggestions? Reach out to me at vance.ylhuang.com!]]&gt;</description>
      <content:encoded><![CDATA[<p>I&#39;m not entirely sure what I want this blog to be yet. For now, it will just be whatever project I&#39;m currently working on.</p>

<p>So I just tried following someone else on Mastodon and noticed that I couldn&#39;t follow anyone. Nor could they follow me. Checking in Mastodon Sidekiq reveals the issue:</p>

<pre><code>Mastodon::UnexpectedResponseError: returned code 401
</code></pre>

<p>I looked online and found <a href="https://github.com/mastodon/mastodon/issues/7086">this GitHub issue</a>. Turns out, there&#39;s a small wrinkle with setting up <code>LOCAL_DOMAIN</code> and having other things hosted on the same server. It looks like Mastodon servers (and probably other software in the Fediverse) use the the <a href="https://docs.joinmastodon.org/spec/webfinger/">Webfinger protocol</a> to verify that an account exists on the server. However, my domain&#39;s Webfinger instance was pointing to <a href="https://vance.ylhuang.com/">my homepage instead</a>!</p>

<p>So all the servers were rejecting my follow requests and interactions as illegitimate. After correctly redirecting the Webfinger endpoint of my main domain (<a href="https://ylhuang.com/.well-known/webfinger">https://ylhuang.com/.well-known/webfinger</a>), I was back online and all my interactions within the Fediverse happened soon after (likes, follows, etc.).</p>

<p>Hopefully, this helps others trying to set up their own Mastodon server.</p>

<p>&#39;Til next time!</p>

<p>Tags: <a href="https://blog.ylhuang.com/tag:federation" class="hashtag"><span>#</span><span class="p-category">federation</span></a> <a href="https://blog.ylhuang.com/tag:mastodon" class="hashtag"><span>#</span><span class="p-category">mastodon</span></a> <a href="https://blog.ylhuang.com/tag:troubleshooting" class="hashtag"><span>#</span><span class="p-category">troubleshooting</span></a> <a href="https://blog.ylhuang.com/tag:Fediverse" class="hashtag"><span>#</span><span class="p-category">Fediverse</span></a></p>

<p>Questions or suggestions? Reach out to me at <a href="https://vance.ylhuang.com/">vance.ylhuang.com</a>!</p>
]]></content:encoded>
      <guid>https://blog.ylhuang.com/lessons-learned-how-not-to-federate-mastodon</guid>
      <pubDate>Sun, 07 Sep 2025 23:42:09 +0000</pubDate>
    </item>
  </channel>
</rss>