# Node-Red Install Ubuntu Server 18.0.4

**URL:** <https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492>\
**Category:** General\
**Created:** [30 November 2021 03:36 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492 "2021-11-30T03:36:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![metadrew](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metadrew](https://discourse.nodered.org/u/metadrew)\
**Post date:** [30 November 2021 03:36 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/1 "2021-11-30T03:36:25Z")

</div>

Hi all, new to node-red and ubuntu l. I have followed the installation guides I found online for Ubuntu Server 18.0.4 (clean install) and everything seems to have gone well. Installing node+npm+node-red.  
After install, no ( found **0** vulnerabilities) and no warnings etc.

However, when I start node red with "node-red" it seems to start without issue but I cannot access the server (local network) using it's IP:1880. I just get the server cannot be found message (safari mac). Tried other browsers as well. It seems that node-red is not reachable on the server even though the port is open and node-red is listening on it.  
tcp 0 0 0.0.0.0:1880 0.0.0.0:\* LISTEN 3170/node-red

I should mentioned I have done this in the past and it worked i the past. But I have tried a few ways, some producing errors. This has been a clean error free install but cant access node-red in the browser.

Anyone has this issue? Appreciate the help.

Install commands used:  
sudo apt-get install nodejs  
sudo npm install npm -g  
sudo npm install -g --unsafe-perm node-red node-red-admin

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 November 2021 07:29 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/2 "2021-11-30T07:29:19Z")

</div>

The best thing to do is to follow the official node red docs installation guide, which is to install using the Debian/Ubuntu/Raspbian install guide. I am on my phone so can't easily link to it, but if you Google for install node red pi and find the one on the node red site then you should find it. You probably don't need to uninstall anything first.

If it still won't work (or if you don't want to do that) then stop node red and start it again in a terminal and see what messages are there. Copy/paste them here if necessary.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 November 2021 11:04 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/3 "2021-11-30T11:04:33Z")

</div>

Further to the above, I believe that Ubuntu 18.04 comes with a version of nodejs \< 12, which is the minimum that the current node-red, which probably explains the problem. You can check that using `node -v`. Running the script I suggested will fix that. [Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

**Author:** ![metadrew](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metadrew](https://discourse.nodered.org/u/metadrew)\
**Post date:** [30 November 2021 17:28 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/4 "2021-11-30T17:28:48Z")

</div>

Thanks for your response. I cleaned node.js and node-red out and reinstalled using the link:

> **[Running on Raspberry Pi : Node-RED](https://nodered.org/docs/getting-started/raspberrypi)**

I am not running on a raspberry pie but a mac-mini booted with Ubuntu Server 18.0.4.

Everything installs well but accessing via the machineIP:1880 does not load node-red at all. Simply states can't connect to the server.

Here is what is shown in the terminal after start.

Start Node-RED

Once Node-RED has started, point a browser at [http://192.168.2.55:1880](http://192.168.2.55:1880)  
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED  
Use node-red-start to start Node-RED again  
Use node-red-log to view the recent log output  
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot  
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to [http://flows.nodered.org](http://flows.nodered.org)

# Starting as a systemd service. 30 Nov 17:06:40 - [info] Welcome to Node-RED

## 30 Nov 17:06:40 - [info] Node-RED version: v2.1.3 30 Nov 17:06:40 - [info] Node.js version: v14.18.1 30 Nov 17:06:40 - [info] Linux 4.15.0-163-generic x64 LE 30 Nov 17:06:40 - [info] Loading palette nodes 30 Nov 17:06:41 - [info] Settings file : /home/[redacted]/.node-red/settings.js 30 Nov 17:06:41 - [info] Context store : 'default' [module=memory] 30 Nov 17:06:41 - [info] User directory : /home/[redacted]/.node-red 30 Nov 17:06:41 - [info] Projects directory: /home/[redacted]/.node-red/projects 30 Nov 17:06:41 - [warn] No active project : using default flows file 30 Nov 17:06:41 - [info] Flows file : /home/[redacted]/.node-red/flows.json 30 Nov 17:06:41 - [info] Creating new flow file 30 Nov 17:06:41 - [warn]

## Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

30 Nov 17:06:41 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
30 Nov 17:06:41 - [info] Starting flows  
30 Nov 17:06:41 - [info] Started flows

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 November 2021 18:10 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/5 "2021-11-30T18:10:23Z")

</div>

What IP are you using and can you ping that machine from where you are running the browser.

Is port 1880 open on the server? Perhaps you are using a firewall.

---

<div class="post-metadata">

**Author:** ![metadrew](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metadrew](https://discourse.nodered.org/u/metadrew)\
**Post date:** [30 November 2021 18:26 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/6 "2021-11-30T18:26:36Z")

</div>

I am using it on a local network accessible via a local IP (192.168.x.x).. I have another service running on this same machine and it's accessing it fine including a web sever on port 80. Port is active.  
node-red 16293 iskinadmin 18u IPv4 78363 0t0 TCP \*:1880 (LISTEN)  
Not sure if there is another setting I am missing that would block access to this port.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 November 2021 20:52 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/7 "2021-11-30T20:52:56Z")

</div>

Are you using [http://192.168.2.55:1880](http://192.168.2.55:1880)?

What do you see if you run  
`curl http://192.168.2.55:1880`

If that doesn't work then connect to the server (using ssh I presume) and try  
`curl http://localhost:1880`

---

<div class="post-metadata">

**Author:** ![metadrew](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metadrew](https://discourse.nodered.org/u/metadrew)\
**Post date:** [30 November 2021 21:15 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/8 "2021-11-30T21:15:49Z")

</div>

Yes, using [http://192.168.2.55](http://192.168.2.55).

When i access that URL - I get a "Can't connect to the Server" error.

If I cURL from the terminal I get:  
curl: (7) Failed to connect to 192.168.2.55 port 18080: Connection refused

If I SSH to the server and use the cURL, I get this below.

```auto
 ( <!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>

<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="mobile-web-app-capable" content="yes">

<!--

Copyright OpenJS Foundation and other contributors, https://openjsf.org/

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

-->

<title>Node-RED</title>

<link rel="icon" type="image/png" href="favicon.ico">

<link rel="mask-icon" href="red&#x2F;images&#x2F;node-red-icon-black.svg" color="#8f0000">

<link rel="stylesheet" href="vendor/jquery/css/base/jquery-ui.min.css?v=2.1.3">

<link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css?v=2.1.3">

<link rel="stylesheet" href="red/style.min.css?v=2.1.3">

</head>

<body spellcheck="false">

<div id="red-ui-editor"></div>

<script src="vendor/vendor.js?v=2.1.3"></script>

<script src="red&#x2F;red.min.js?v=2.1.3"></script>

<script src="red&#x2F;main.min.js?v=2.1.3"></script>

</body>

</html>

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 November 2021 21:17 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/9 "2021-11-30T21:17:03Z")

</div>

> [@metadrew](#):
>
> Failed to connect to 192.168.2.55 port 18080:

Wrong port number.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 December 2021 21:32 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/10 "2021-12-02T21:32:43Z")

</div>

@metadrew have you solved this problem?

---

<div class="post-metadata">

**Author:** ![metadrew](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metadrew](https://discourse.nodered.org/u/metadrew)\
**Post date:** [2 December 2021 22:14 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/11 "2021-12-02T22:14:48Z")

</div>

Hi Colin, yes. I think the problem was the other server I had installed was modifying the firewall to block port 1880. I used the firewalld command to enable the port and all seem to be woking now via the machine's IP:1880

I used: sudo firewall-cmd --add-port=1880/tcp —permanent

Next step is securing the server 🙂

Thanks for following up.

---

<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:** [16 December 2021 22:15 UTC](https://discourse.nodered.org/t/node-red-install-ubuntu-server-18-0-4/54492/12 "2021-12-16T22:15:36Z")

</div>

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