# Affichage adresse IP

**URL:** <https://community.gladysassistant.com/t/affichage-adresse-ip/9892>\
**Category:** Demandes livrées\
**Tags:** in-progress\
**Created:** [Décembre 24, 2025, 2:55 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892 "2025-12-24T14:55:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArMour85](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/armour85/32/7457_2.png) [@ArMour85](https://community.gladysassistant.com/u/ArMour85)\
**Post date:** [Décembre 24, 2025, 2:55 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/1 "2025-12-24T14:55:54Z")

</div>

Bonjour,

Suite à mon post sur [Flatcar Gladys Assistant](https://community.gladysassistant.com/t/flatcar-gladys-assistant/9886) et l’utilisation de Avahi pour avoir une adresse “gladysbox.local” je propose que l’adresse IP de la machine hôte soit affichée dans Paramètres/Système/Connecté.

 ![Capture d’écran 2025-12-24 155058](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/a/7ad090477472f5feeb92022f0712085e9b69ca0b.png)

Cela évite de regarder sur la box internet.

Merci.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 10:25 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/2 "2026-07-14T10:25:14Z")

</div>

Voilà

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/4/c4af8cb0ef46993ce29829c935229b814f3292db.png)

![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/f/0f387c8f214a17fec7817b224e7c76d6b7a63e36.png)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/0/9/098c0ca8de0c88282e23aa48dd142bdad42c2463.png)

Pour que l’adresse en .local fonctionne il faut absolument être en network host. (config docker recommandé pour Gladys)

Voilà une image de test:  
`docker pull willde71/gladys-test:display_local_ip`

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Juillet 14, 2026, 5:31 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/3 "2026-07-14T17:31:46Z")

</div>

> [@Will\_71](#):
>
> Pour que l’adresse en .local fonctionne

donc ça veut dire que pour un nouvel utilisateur qui a Gladys d’installer sur sa nouvelle machine pourra directement tomber sur [http://gladysassistant.local](http://gladysassistant.local) sans avoir de nmap et ip scanner à faire ?

Si oui alors c’est GENIAAAAAAAAAALLLLLLLLL !  
et on pourra clôturer : [Découverte de Gladys en automatique sur réseau local](https://community.gladysassistant.com/t/decouverte-de-gladys-en-automatique-sur-reseau-local/9791) et cette demande.

Question subsidiaire : ça marche avec mac, linux, windows, iphone, tel android ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 5:47 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/4 "2026-07-14T17:47:07Z")

</div>

C’est le but. Si tu veux tester je suis preneur de retour.

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Juillet 14, 2026, 7:16 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/5 "2026-07-14T19:16:26Z")

</div>

Tests effectués pour la résoltuion du nom :

- mac : ok
- iphone : ok
- windows 11 : ok
- android : je n’en ai pas pour tester
- linux : oui dans une VM debian (avec jeedom d’installé) et non dans mes LXC et hôtes proxmox, il doit falloir un paquet à installer que je ne connais pas.

La modification du nom fonctionne très bien :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/4/5/45b4eb72a4436228edf3b29b404003730256137f.png)

Par contre, j’ai des ports dédiés sur mes instances et donc je n’ai pas le 80 de base.  
Ce qui fait que si on s’arrête à xxx.local et bien ça ne fonctionne pas dans mon cas.

Sur ma demande de découverte de Gladys, j’avais parlé d’un [find.gladysassistant.com](http://find.gladysassistant.com) qui permettrait de scanner les instances Gladys sur le réseau local, un peu comme le fait synology lorsque l’on installe un nouveau serveur.  
Tu penses que c’est jouable en plus de la partie mDNS ?  
Je n’ai pas su trouver si c’était en local ou sur le serveur en web ☹

Autre point, je trouve un peu de redondance entre la version de Gladys en jaune et la version en vert :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/2/0/20845da375bd78eb3354383ad34f9f4c6b085fa3.png)

---

<div class="post-metadata">

**Author:** ![GBoulvin](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gboulvin/32/10006_2.png) [@GBoulvin](https://community.gladysassistant.com/u/GBoulvin)\
**Post date:** [Juillet 14, 2026, 7:40 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/6 "2026-07-14T19:40:00Z")

</div>

Encore un développement vachement cool !

Je vais encore faire une critique (constructive hein)…

Le libellé, me semble-t-il, serait plus juste si on mettait ‹&nbsp;IP Hôte&nbsp;› que juste ‹&nbsp;IP&nbsp;›…

Votre avis ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 7:56 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/7 "2026-07-14T19:56:38Z")

</div>

> [@GBoulvin](#):
>
> Je vais encore faire une critique

Non au contraire.

Au debut j’avais mis adresse IP mais c’était trop long. Je peux essayer avec ta proposition et te faire une capture d’écran.

Pour la version oui c’est redondant je suis d’accord

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 7:57 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/8 "2026-07-14T19:57:31Z")

</div>

Merci de ton retour @mutmut je regarde dès que je peux.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 10:16 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/9 "2026-07-14T22:16:37Z")

</div>

@GBoulvin, voilà

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/4/f/4fac11540a322fecf810c18b6b0cdb5287cbe9f5.png)

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 14, 2026, 10:29 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/10 "2026-07-14T22:29:17Z")

</div>

@mutmut,

Sur Linux (LXC / hôtes Proxmox)

C’est un comportement attendu, et il n’y a rien à corriger côté Gladys : la résolution des noms .local doit être assurée par la machine cliente, qui a besoin d’un résolveur mDNS. Ta VM Debian avec Jeedom fonctionne parce qu’un avahi-daemon y est déjà installé (Jeedom l’embarque), alors que les LXC minimalistes n’ont ni Avahi ni le module NSS.

Sur un système Debian/Ubuntu, il suffit en général de :

apt install avahi-daemon libnss-mdns

libnss-mdns ajoute mdns4\_minimal à la ligne hosts: de /etc/nsswitch.conf, ce qui permet à ping, curl et le navigateur de résoudre gladysassistant.local. À noter que dans un LXC non privilégié, le multicast peut aussi être bloqué par la configuration réseau de l’hôte — c’est alors le pare-feu/bridge Proxmox qu’il faut regarder, pas Gladys.

Sur les ports dédiés

Bonne nouvelle : c’est déjà géré, et ta propre capture le montre — Gladys t’affiche bien [http://gladysassistant-test.local:8001](http://gladysassistant-test.local:8001) et pas gladysassistant-test.local tout court.

Il y a deux mécanismes distincts derrière :

- Gladys publie un enregistrement SRV, qui contient le nom d’hôte et le port réel. Tout client qui fait de la découverte de service (\_http.\_tcp) récupère donc l’instance avec son bon port, quel qu’il soit.
- L’enregistrement A, lui, ne fait que traduire xxx.local en adresse IP. Le protocole DNS ne permet pas d’y attacher un port.

Donc taper xxx.local nu dans un navigateur enverra effectivement toujours vers le port 80 : c’est une limite du DNS lui-même, pas un choix d’implémentation, et c’est précisément la raison d’être du SRV. Dans ton cas il faut utiliser l’URL complète avec le port, celle que Gladys affiche dans les réglages.

Sur [find.gladysassistant.com](http://find.gladysassistant.com) j’ai besoin de me renseigner comment cela fonctionne sur synology je ne connais pas du tout.

---

<div class="post-metadata">

**Author:** ![ArMour85](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/armour85/32/7457_2.png) [@ArMour85](https://community.gladysassistant.com/u/ArMour85)\
**Post date:** [Juillet 15, 2026, 7:04 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/11 "2026-07-15T07:04:12Z")

</div>

Super, merci beaucoup @Will_71, je vais m’installer une machine vierge pour tester si ça fonctionne au premier démarrage.

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Juillet 15, 2026, 4:45 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/12 "2026-07-15T16:45:45Z")

</div>

> [@Will\_71](#):
>
> Sur [find.gladysassistant.com](http://find.gladysassistant.com) j’ai besoin de me renseigner comment cela fonctionne sur synology je ne connais pas du tout.

J’avais déjà fait un [POC](https://mutmut.quickconnect.to/d/s/194ME0tWvf504EZlbpprAjl2JZU0bHR0/dJ4X3LT94Hmjs7UqnrHNGZdV_1XbNj2y-HLtg0zkDWg0) avec Windsurf et de l’IA qui fonctionnait plutôt bien mais avec une interface on ne peut plus simple.

---

<div class="post-metadata">

**Author:** ![ArMour85](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/armour85/32/7457_2.png) [@ArMour85](https://community.gladysassistant.com/u/ArMour85)\
**Post date:** [Juillet 19, 2026, 7:42 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/13 "2026-07-19T19:42:27Z")

</div>

C’est vraiment super @Will_71. Je confirme que ça fonctionne sur une installation toute fraiche.

---

<div class="post-metadata">

**Author:** ![ArMour85](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/armour85/32/7457_2.png) [@ArMour85](https://community.gladysassistant.com/u/ArMour85)\
**Post date:** [Juillet 31, 2026, 6:46 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/14 "2026-07-31T06:46:07Z")

</div>

@Will_71 ta feature est proposé en PR sur le repo de Gladys pour une prochaine release ?

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Juillet 31, 2026, 8:58 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/15 "2026-07-31T08:58:01Z")

</div>

J’ai pas encore fait la PR.  
Dans le week end si j’ai le temps je la poste.

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [Août 19, 2026, 8:56 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/16 "2026-08-19T08:56:28Z")

</div>

@pierre-gilles, la PR

> <https://github.com/GladysAssistant/Gladys/pull/2953>
>
> \- Sends goodbye packets on shutdown (cache-flush bit correctly unset, per
> RFC… 6762) so clients drop the record immediately instead of waiting for the
> TTL to expire.
> \- The hostname is stored in the \`MDNS\_HOSTNAME\` system variable and sanitized
> server-side, falling back to \`gladysassistant\` if invalid.
> 
> Tested on a real network: \`avahi-resolve -n gladysassistant.local\` returns the
> host IP, and the A/SRV/TXT records are visible from an independent mDNS client.
> 
> \## Forum
> https://community.gladysassistant.com/t/affichage-adresse-ip/9892
> 
> \### Checklist
> 
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (Codecov requires 100% coverage on changed lines) and Cypress (\`npm run cypress:run\`) if the UI changed
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`)
> \- \[x\] No undocumented breaking change
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*New Features\*\*
> \* Added mDNS configuration to System Settings, including hostname validation, save status, errors, and the resulting \`.local\` URL.
> \* Added English, French, and German translations for the new settings.
> \* Gladys now advertises itself on the local network through mDNS.
> \* System information now includes the detected local IP address and server port.
> \* \*\*Bug Fixes\*\*
> \* Improved local IP detection by prioritizing suitable physical network interfaces and excluding virtual interfaces.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Août 20, 2026, 7:55 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/17 "2026-08-20T19:55:45Z")

</div>

Salut tout le monde !

Ce sujet est désormais **en cours de développement**.

Une PR a été ouverte pour annoncer Gladys sur le réseau local via mDNS (avec les correctifs de relecture de #2953) :

> <https://github.com/GladysAssistant/Gladys/pull/2968>
>
> \### Description
> 
> This branch is #2953 (by @William-De71) rebased on \`master\`, pl…us the fixes asked for during its review. Only the last commit is new — \`fix(mdns): apply the review fixes of the local network advertisement\`.
> 
> \*\*1. A hostname saved during a restart was silently dropped\*\*
> 
> \`restart()\` coalesced a second hostname change by awaiting the running restart and returning. If that restart had already read the variable before the second value was written, the network kept advertising the previous name until the next change or a Gladys restart. Reproduced: saving \`b\` then \`c\` left \`b.local\` advertised while the database and the UI showed \`c\`.
> 
> Concurrent restarts are still coalesced into a single extra run, but that run now always reloads the hostname, so the last name saved is always the one advertised.
> 
> \*\*2. Docker bridge mode\*\*
> 
> Behind a Docker bridge, the multicast packets never leave the container and the container address is not reachable from the local network. Gladys now skips the advertisement in that case (\`system.isOnHostNetwork()\`, built on the existing \`getNetworkMode()\`), \`system.getInfos()\` no longer exposes that unusable address, and the settings page says the name is not advertised instead of showing an URL that cannot work.
> 
> \*\*3. Minor points\*\*
> 
> \- The default hostname and its validation regex live in \`utils/constants.js\` and are shared by the server, the variable validation and the front, instead of being duplicated on both sides.
> \- \`MDNS\_HOSTNAME\` is validated and stored normalized (\`Gladys-Garage.local\` → \`gladys-garage\`), so the stored value and the advertised one can no longer differ. An invalid value is now rejected with a 400 instead of being stored and silently ignored.
> \- The server port is resolved by one shared helper, used by both \`server/index.js\` and \`system.getInfos()\`.
> \- \`handleQuery()\` classifies the questions before building the records: an mDNS packet which is not about Gladys no longer reads the network interfaces. A record is also never repeated in the additionals.
> \- The DNS-SD meta-query \`\_services.\_dns-sd.\_udp.local\` is answered, so tools enumerating the service types of a network see Gladys.
> \- \`getLocalIp()\` only demotes a \`172.16.0.0/12\` address when the interface was created by Docker (\`02:42\` MAC prefix) or when it is in Docker's default bridge subnet, so a real LAN using that RFC 1918 range is no longer penalized.
> 
> \*\*Left as is, on purpose\*\*
> 
> \- The advertisement is on by default with no opt-out toggle, as decided during the review.
> \- No RFC 6762 §8 probing: two instances sharing a name both answer, and the UI invites the user to rename one. A real probing state machine is out of proportion here.
> \- IPv4 only, no \`AAAA\` record: picking the right IPv6 address (link-local scope, ULA, global) reliably is its own subject.
> 
> \### Forum
> 
> Forum: https://community.gladysassistant.com/t/affichage-adresse-ip/9892
> 
> \### Checklist
> 
> \- \[x\] Tests pass: full server suite green, and 100% line and branch coverage on every file touched (\`lib/mdns/\*\`, \`system.isOnHostNetwork\`, \`system.getInfos\`, \`variable.setValue\`, \`utils/getServerPort\`). Cypress was \*\*not\*\* run locally, its binary could not be installed in this environment — CI covers it.
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier-check\`), and the front builds.
> \- \[x\] No undocumented breaking change
> 
> Note for reviewers: \`variable.setValue\` now rejects an invalid \`MDNS\_HOSTNAME\`, which is a new error case on \`POST /api/v1/variable/MDNS\_HOSTNAME\` — the settings form validates with the same rule before posting, so it is only reachable through a direct API call.
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_01K19FpxpJDoKf8EW7kDfAFL)\_

N’hésitez pas à suivre la PR, à tester (optionnel, surtout pour les petites demandes) et à faire vos retours ici si besoin.

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Août 28, 2026, 12:30 UTC](https://community.gladysassistant.com/t/affichage-adresse-ip/9892/18 "2026-08-28T12:30:15Z")

</div>


