How to connect using a .local url?

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9.2 (stable)
How are you able to access your server: The webadmin
SSH
Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: fresh install, par l’image yunohost bookwork sur clé USB

Describe your issue

Salut! :slight_smile:

Je viens d’installer Yunohost sur un vieil ordinateur. Dans la webadmin de YNH, j’ai créé un domaine bidule.local. Là j’essaye de me connecter dessus en utilisant bidule.local mais ça ne fonctionne pas. Par mon navigateur j’ai “We can’t connect to the server at bidule.local” et par SSH j’ai “ssh: Could not resolve hostname bidule.local: Name or service not known”.

Ce qui est bizarre c’est qu’au début ça fonctionnait. Après la post-install, j’arrivais à me connecter par bidule.local mais après un premier reboot, ça a cessé de fonctionner.

Info additionnelles:

  • J’arrive à me connecter par l’adresse IP
  • J’ai d’autres machines et raspberry-pi sur ce même réseau local et j’arrive à me connecter sur eux en utilisant <hostname>.local. Le problème est spécifique à cette nouvelle machine yunohost.
  • Sur l’écran qui est connecté à ce vieil ordinateur, je vois le prompt de login YUNOHOST et les fingerprint SSH mais là où devrait être l’adresse IP, je vois Local IP: (no ip detected?)

Questions:

  1. Est-ce que j’ai bien fait de créer un domaine bidule.local dans la webadmin? C’est la bonne manière de créer une URL accessible localement?
  2. Pourquoi l’adresse IP n’apparaît pas sur mon login screen?

Share relevant logs or error messages

# hostname
bidule.local

# cat /etc/hostname 
bidule.local

I’m not so familiar with mDNS and .local domains (also, sorry for not replying in French, which I’m also not too familiar with :stuck_out_tongue: ) .

There are conflicting opinions on the 'Net about the merit of using .local domains for non-mDNS purposes that you may be familiar with.

Do you have more Yunohosts in this network, or do they run something else? What is in your etc/yunohost/mdns.yml ?

No, I’m not familiar at all. Could you elaborate? I don’t know what you mean by “non-mDNS purposes” either. :sweat_smile:

Yes:

  • 1 raspberry pi which I can connect to using pi4.local
  • and 2 computers which I cannot connect to using their .local addresses

It contains this:

domains:
    - yunohost.local
    - bidule.local

To compare, I looked at the same file on my raspberry pi that I can connect to using pi4.local and it shows:

domains:
    - yunohost.local
    - onlyoffice.local
    - pi4.local

I have no resource with a definitive answer, but recalled reading about it when at some point I wondered why I had “French packages” (with “bonjour” in the name) on my system.

Searching “Can I use .local for my server?” , the first few results that I clicket have points in favour as well against doing so.

Upon reading some more, the reason turns out to be something different than I expected. My expectation was: don’t manually configure a host on mDNS, but let the system do it; while actually the warning is: don’t put .local in your regular DNS… which seems quite an open door to me.

Having found that, I also found some pointers that do seem useful to the case at hand :stuck_out_tongue:

  • mDNS expects a 1:1 relationship between hostname and IP address (per IP family). If /etc/yunohost/mdns.yml is used to configure mDNS, that might explain your problem (yunohest+bidule), but not the case where it does work (yunohost+onlyoffice+pi4). Found in a blogpost, search for --no-reverse and /etc/avahi/hosts (I know there’s no Avahi on YNH, not mine anyway, but it is a long blogpost)
    To add to the confusion, my YNH has only online.local in `/etc/yunohost/mdns.yml, but does not listen to that. It does listen to yunohost.local
  • Then there is a suggestion alter /etc/nsswitch.conf, and change mdns4_minimal into mdns4
  • Finally, it may make a difference to have .local in /etc/resolv.conf. On Yunohost, /etc/resolv.conf is managed by resolvectl, but on my YNH resolvectl status returns that the service is not found.

All in all, not quite a clear picture :wink:

Please explain how, in case you get it solved!

So far, I tried to shutdown all my yunohost servers to avoid conflict, reboot the router (just in case), reboot the machine I want to connect using bidule.local, and… I still cannot connect. :frowning: