# How to connect using a .local url?

**URL:** https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658
**Category:** Support
**Tags:** ssh, french
**Created:** [January 11, 2025, 3:25pm UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658 "2025-01-11T15:25:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![narF](https://forum.yunohost.org/user_avatar/forum.yunohost.org/narf/32/3541_2.png) [@narF](https://forum.yunohost.org/u/narF)
#### Post date: [January 11, 2025, 3:25pm UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/1 "2025-01-11T15:25:09Z")

</div>

**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! 🙂

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

```auto
# hostname
bidule.local

# cat /etc/hostname 
bidule.local

```

---

<div class="post-metadata">

### Author: ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)
#### Post date: [January 18, 2025, 3:17pm UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/3 "2025-01-18T15:17:09Z")

</div>

> [@narF](#):
>
> bump 😅

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 😛 ) .

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

> [@narF](#):
>
> 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.

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

---

<div class="post-metadata">

### Author: ![narF](https://forum.yunohost.org/user_avatar/forum.yunohost.org/narf/32/3541_2.png) [@narF](https://forum.yunohost.org/u/narF)
#### Post date: [January 21, 2025, 4:54am UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/4 "2025-01-21T04:54:33Z")

</div>

> [@wbk](#):
>
> There are conflicting opinions on the 'Net about the merit of using .local domains for non-mDNS purposes that you may be familiar with.

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

> [@wbk](#):
>
> Do you have more Yunohosts in this network, or do they run something else?

Yes:

- 1 raspberry pi which I can connect to using `pi4.local`
- and 2 computers which I _cannot_ connect to using their `.local` addresses

> [@wbk](#):
>
> What is in your `etc/yunohost/mdns.yml` ?

It contains this:

```auto
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:

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

```

---

<div class="post-metadata">

### Author: ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)
#### Post date: [January 21, 2025, 8:01am UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/5 "2025-01-21T08:01:33Z")

</div>

> [@narF](#):
>
> > [@wbk](#):
> >
> > …things…that you may be familiar with.
> 
> No, I’m not familiar at all. Could you elaborate?

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](https://serverfault.com/questions/47087/using-local-for-internal-websites) few [results](https://serverfault.com/questions/811712/is-it-ok-to-use-local-in-an-active-directory-domain-name) 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 😛

- 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](https://andrewdupont.net/2022/01/27/using-mdns-aliases-within-your-home-network/), 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](https://unix.stackexchange.com/questions/352237/avahi-daemon-and-local-domain-issues) alter /etc/nsswitch.conf, and change `mdns4_minimal` into `mdns4`
- [Finally](https://www.reddit.com/r/linux4noobs/comments/mqkcg1/why_do_some_of_my_computers_need_local_appended/), 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 😉

Please explain how, in case you get it solved!

---

<div class="post-metadata">

### Author: ![narF](https://forum.yunohost.org/user_avatar/forum.yunohost.org/narf/32/3541_2.png) [@narF](https://forum.yunohost.org/u/narF)
#### Post date: [January 23, 2025, 5:03am UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/6 "2025-01-23T05:03:40Z")

</div>

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. ☹

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [February 22, 2025, 5:04am UTC](https://forum.yunohost.org/t/how-to-connect-using-a-local-url/34658/7 "2025-02-22T05:04:03Z")

</div>

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