Local domains does not work anymore

I have searched the forum for similar issues

on

This category is for general issues regarding YunoHost, NOT apps.

on

This form is written in English :uk: but feel free to write in French :fr: if you’re more comfortable!

on

What type of hardware are you using

Old laptop or computer

What YunoHost version are you running

11.2.31 (stable)

How are you able to access your server

The webadmin
SSH

Are you in a special context or did you perform specific tweaking on your YunoHost instance ?

In this context - no, I do not

Describe your issue

Hello.
I want to selfhost some apps using local domains feature. I used this in the past once (about a month ago) and then it worked - I installed Piped locally and I could use this, but as we know - Youtube killed almost all alt. frontends, so I removed the app.

I want to host Forgejo locally so I created domain forge.local and I installed Forgejo there. I had an one issue during the install, because the Yunohost server couldn’t resolve forge.local but I fixed this adding 127.0.0.1 forge.local to /etc/hosts file. Forgejo is installed now.
But I cannot access it.

When I am trying to open forgejo.local I see Unfortunately, this page could not be found. When I am trying to curl it in Terminal I see

[cichy1173@starbook ~]$ curl forge.local
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

The same error is while curling on the server. I haven’t added any additional changes since last month, only to main, external domain, but nothing new locally - I can access the yunohost admin panel using address http://<local_yh_server_ip.

Share relevant logs or error messages

Logs shared above

Try again with curl -Lk forge.local. -L makes it follow the redirections, -k makes it ignore the self-signed certificates.

Can you try restarting the yunomdns service and share its logs?

Looks like Forgejo website is showing.

[cichy1173@starbook ~]$ curl -Lk forge.local. -L
<!DOCTYPE html>
<html lang="en-US" data-theme="forgejo-auto">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	<title>Explore - Forgejo</title>
.
.
.

Restarted, last logs:

Oct 27 17:47:01 [REDACTED] systemd[1]: Started YunoHost mDNS service.
Oct 27 17:47:03 [REDACTED] yunomdns[28869]: Adding yunohost.local with addresses ['192.168.1.110'] on interface enp3s0
Oct 27 17:47:03 [REDACTED] yunomdns[28869]: Adding forge.local with addresses ['192.168.1.110'] on interface enp3s0
Oct 27 17:47:03 [REDACTED] yunomdns[28869]: Adding homebox.local with addresses ['192.168.1.110'] on interface enp3s0
Oct 27 17:47:03 [REDACTED] yunomdns[28869]: Adding piped.local with addresses ['192.168.1.110'] on interface enp3s0
Oct 27 17:47:03 [REDACTED] yunomdns[28869]: Registering...
Oct 27 17:47:05 [REDACTED] yunomdns[28869]: Registered. Press Ctrl+C or stop service to stop.

1 Like

And you still cannot access your .local domain?

Nope.

This is what I see in browser:

Unfortunately, this page could not be found
Failed to connect to the server at the address “forge.local”.
If this is the correct address, you can:
Try again later
Check your Internet connection
Make sure Firefox can connect to the Internet (your firewall may be blocking it)

What’s your client OS?

Fedora Workstation.

But I added

192.168.1.110 forge.local

To /etc/hosts on my machine and that worked, now I can access, but it should work without this?

I also cannot access the website using smartphone

Indeed, it should work without it, but mDNS can be tricky.
Can you make sure that the Avahi service (I think it’s called avahi-daemon) is enabled and running on Fedora? It’s responsible for resolving .local domains.

As for your smartphone, what’s its OS and version? Some may not be compatible.

It is running

Nothing Phone (1) with Android 14. When I had piped installed locally I could access it using smartphone. Private DNS is switched off, I use Adguard Home in my network (hosted on another device) and I’ve got Adguard Home set as DNS server in the router settings.

With the command line, can you run avahi-browse -a to see if your server is detected?

If it is not detected by avahi-browse, then I can only suggest you use .internal domains and set their records with Adguard Home instead of the .local domains.

Looks like detected.

Naïvely, can you close your browser and reopen it?
In my case, when I create a new .local domain, I need to reload the page twice in Firefox for it to load properly too.

If that’s still not working, I cannot help you further sorry. :confused:

Tried also using GNOME Web and the same issue.


I tried this also on second device, laptop with Windows and there it worked. So I thought it may be a problem with Firefox on Fedora itself and I may be right. I have Firefox installed via Flatpak and there is a issue → mDNS resolution fails for local network · Issue #4044 · flatpak/flatpak · GitHub.

But this still does not say why I cannot access it on Firefox on mobile…

To close the issue I will summarize.

If you use browser installed via Flatpak probably mDNS will not work. To fix this you need to add domain and record to /etc/hosts like example below.

192.168.1.110 forge.local

If you have a trouble to access it on another devices, add DNS rewrite to Adguard Home or Pi-Hole. That should fix the issue.

1 Like