Trouble following WriteFreely blog from Mastodon instance on same server

Hi there, hope everyone is OK :slight_smile:

I’m on YunoHost self-hosted on a box in my living room, domain

I’m running Mastodon 4.2.5~ynh1 and WriteFreely 0.14.0~ynh2.

Whenever I try to search for my WriteFreely blog handle ( on my Maston instance (, I get this popup error:


I thought it might be a problem that it tries to contact the blog over the local network, so I tried to add the blog domain and the public IP in etc/hosts, but it didn’t help.

On other instances, people can easily see and follow the blog. Does anyone have a cue as to what might be going on?

Thanks in advance for any response.

Hmmm, it seems to be related to this:

" There was a patch made to Mastodon way back when that means you can’t follow people on servers with private IP addresses.

So if you have a mastodon server and other ActivityPub servers on the same public IP address and you use reverse proxies to route requests to internal IP addresses it’ll fail.

And if you understand this, you understand either how to fix it (turn on loopback NAT on your router) or will know it’s impossible to fix on your setup depending on your router."

If he’s right, the problem is that my router won’t allow my Mastodon server to connect to the WriteFreely blog on the public IP, and there’s a validation in Mastodon that refuses to follow people on private IPs.

One solution would be to monkeypatch Mastodon to allow privat IPs (because why not?).

Another would be for me to attempt to enable NAT loopback on my router which a) it’s doubtful it supports, it’s a cheap router and 2) I can’t do ATM because I’m in England and my router is in Denmark.

Maybe the correct solution here is to regard Mastodon’s refusal to follow accounts on private IPs is a bug with respect to Yunohost. I think the proposed solution of changing the router configuration is a bit of a hack.

After all, it’s not a problem if the DNS name resolves to a private IP locally on the server, given that the same DNS name resolves to the correct public IP outside of the server’s LAN.

Hence this could be fixed by removing this check for private IP in the YNH Mastodon package. Does anyone have an opinion on this?

Following the conclusions above, I created an issue in the Mastodon YNH repo about this:

OK, I solved it. It turns out there’s a Mastodon setting ALLOWED_PRIVATE_ADDRESSES which allows me to follow the blog if I set it to my server’s internal IP and

I added that in /var/www/mastodon/live/.env.production and it worked.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.