# Raspberry pi2: nodered is accessible only via ip

**URL:** <https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599>\
**Category:** General\
**Created:** [11 December 2023 13:28 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599 "2023-12-11T13:28:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![realtebo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realtebo/32/85732_2.png) [@realtebo](https://discourse.nodered.org/u/realtebo)\
**Post date:** [11 December 2023 13:28 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/1 "2023-12-11T13:28:02Z")

</div>

Hi !

first time here for me, and first day with node red.

I installed nodered on a fresh and clean OS on a pi2 model 2

**I can login via ssh using "raspberrypi.local" as hostname** from my windows machine, without having to add entry into /etc/hosts

I can see node-red using device's IP (hostname -I) , for example I can access using

```
http://192.168.2.83:1880/

```

But i cannot access node-red using device's hostname. I cannot access using

```
http://raspberrypi.local:1880/

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 December 2023 13:33 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/2 "2023-12-11T13:33:24Z")

</div>

From an old 2013 post (`1)` is still relevant today and will definitely work)

> 1. (Always works) On the machine that you are ssh'ing from (say, your "laptop" or whatever), put an entry in the /etc/hosts files (for Unix/Linux/Mac, it is /etc/hosts. On Windows, it is C:\windows\system32\drivers\etc\hosts), associating the IP address with a name. Then you can use that name in future. This always works, but the annoyance is that you have to do it on each machine that you want to be able to ssh from.
> 
> 2. (Works sometimes, sometimes not - you know, phase of the moon, whether or not the hour is odd or even, probably other factors involved) Install "avahi-daemon" on the Pi. When this works, it is great. It makes the hostname of the Pi visible on your LAN. Then you can use that hostname in your "ssh" command.

Newer info here: [linux - Why can't I reach my raspberry pi with the hostname I set for it? - Super User](https://superuser.com/questions/1810603/why-cant-i-reach-my-raspberry-pi-with-the-hostname-i-set-for-it)

---

<div class="post-metadata">

**Author:** ![realtebo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realtebo/32/85732_2.png) [@realtebo](https://discourse.nodered.org/u/realtebo)\
**Post date:** [11 December 2023 13:40 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/3 "2023-12-11T13:40:30Z")

</div>

> [@Steve-Mcl](#):
>
> /etc/hosts files

thanks for reply

the hostname is already visible on net. I already can login via ssh using hostname  
only the webserver of nodered gui is not reachable using hostname

I actually cannot save hostname as entry in /etc/hosts because raspberry it's installed under dhcp.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [11 December 2023 13:44 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/4 "2023-12-11T13:44:34Z")

</div>

.local working is just up to how the gremlins are feeling on the day in question

I've just put up with this for past years and just switch to IP when it doesn't work

Currently getting away with using name (minus the .local) this week (from my Win11 machine)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/1195670ff7f953256c82987bae5022754b0f331f.png)

---

<div class="post-metadata">

**Author:** ![realtebo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realtebo/32/85732_2.png) [@realtebo](https://discourse.nodered.org/u/realtebo)\
**Post date:** [11 December 2023 13:50 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/5 "2023-12-11T13:50:22Z")

</div>

Your reply is making me happy . thanks

Today i can confirm i can access without .local.

I'll recheck tomorrow.  
Thanks to all

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 December 2023 21:17 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/6 "2023-12-11T21:17:45Z")

</div>

And for the day after tomorrow, see if your router or other local DNS supports "hairpin NAT". This lets you define domain names that point to local IP's when running on the local network even though they point to Internet addresses when working elsewhere.

The great advantage being that you can use a publicly validated TLS certificate for both external and internal use. And, of course, you can use the same URL inside and out (if you expose your Node-RED endpoints to the Internet that is - fully secured of course).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 December 2023 21:18 UTC](https://discourse.nodered.org/t/raspberry-pi2-nodered-is-accessible-only-via-ip/83599/7 "2023-12-25T21:18:27Z")

</div>

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