Cannot reach DietPi using hostname on LAN


I am experiencing a problem where I cannot reach (resolve) my DietPi using its hostname on the LAN.

  • I can ping its IP address.
  • I can SSH to its IP address.
  • I cannot do any of the above using the hostname.

I am able to do both the above using the hostname of a Pi OS installation, so I don’t believe that this is an issue with my LAN config.
I have also tried using both a DHCP and Static IP configuration and it doesn’t seem to make a difference.

Anyone else experiencing this?
Any thoughts on how to resolve?

DietPi v7.1.2 installed on 2 devices with both exhibiting the same issue.
Initial installation only with no new software added.



You would need to have the hostname being resolved by your local DNS server. Depends on what your DNS server is/the DNS server your clients are using It’s not really a DietPi issue.

That is the part that I don’t get.
If it was an issue with my DNS resolver (my router) then would I not have the same issue with Pi OS?
If I was unable to resolve Pi OS hostnames then I’d agree that the problem is outside of DietPi, but that’s not the case.

Pi OS on a device and I can reach it using hostname.
DietPi on the same/similar device and I cannot reach it using hostname.

That doesn’t sound like a problem with my LAN config to me.
For me it sounds like something that Pi OS is doing and DietPi isn’t doing?

So I just swapped out the mSD card in my Pi Zero W.
Pi OS Lite installation with WiFi and SSH included for headless access.

Booted it up and pinged ‘raspberrypi.local’ and I received a response and IP address immediately.
SSH’ed to it and logged in, changed the hostname and rebooted.
Pinged the new hostname and I received a responde and the same IP address.

I tested that twice. NO problems.

So now I am convinced that there is something that Pi OS is doing to “register” that hostname that DietPi is not doing…
Absolutely no changes on the LAN as well.

first of all, DietPi is Raspberry OS in an extrem slim/diet version. Due to this DietPi is running with a reduced number of packages installed. Probably plain RPi OS by default has Avahi-Daemon installed. You could try and have it installed using dietpi-software.

DNS resolution is done by your router. Did you checked the name that is present on your router? You could try a revers lookup from your Windows box

nslookup <IP-address>

Thanks very much for your reply.

I know that DietPi is a slimed-down version of Pi OS which is why I like it very much and prefer it on smaller devices like the Pi Zero.
I have installed Avahi-Daemon and this has resolved the issue, so thanks very much.

I also know and agree that the resolution is performed by the Router but it can only resolve what it knows.
Many home installations use their base Internet router to perform this function and many of those devices offer bare-minimum functionality and are therefore not that configurable IMO…

Is there perhaps not value in making a product like Avahi-Daemon part of the base install, or maybe more visible as part of the install or initial config procedure to catch such hostname resolution issues earlier?

The idea of DietPi is to run with less possible amount of packages as possibile. This include Avahi-Daemon as well. And I could not recall that there was such a request in past. I guess this is not a feature people really needs :wink:

I do agree, Internet providers give to customers devices which are no more than patetic toys, on mine, for example, I cannot even change the DNS address, so if I want use my RPI+PiHole I have to do some weird tricks.