Report this

What is the reason for this report?

Setting up node-red on Ubuntu 22.04. Cant get https and stuck on port 1880

Posted on January 25, 2023

I followed the instructions

Setup Nginx > working perfectly Security certificate > working perfectly Setup vsftpd & secured > working perfectly

Installed Node-red > working fine on http and port 1880 Not working on node-red.domainname.com but on domainname:1880 Setup Credentials Admin & password > working As soon as I block port 1880 or allow line "uiHost: “127.0.0.1”, I cant access the node-red server. Regular website still works fine and is getting https.

So I have two issues:

  1. cant get https
  2. cant get rid of port 1880

Please help guide me though this. I have been stuck at it for a few days now



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @thorofasgard,

You need to configure Reverse Proxy in your nginx conf for your domain. Basically, go to /etc/nginx/sites-enabled/yourdomainname.conf. Once inside, you 'll need to configure.

For port 80 it will look something like:

server {
    listen 80;
    server_name your_domain www.your_domain;

    location / {
        proxy_pass http://127.0.0.1:1880;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

Hello @thorofasgard

You need to create an Nginx virtual host for the domain name in order to use it instead of the droplet IP address.

We do have an old tutorial for an older Ubuntu version which you can check here:

https://www.digitalocean.com/community/tutorials/how-to-connect-your-internet-of-things-with-node-red-on-ubuntu-16-04

You can check Step 4 — Setting Up Nginx and examine the configuration.

Regards

I did install it follow the instructions from 16-04 but it didnt work after I closed the port and and yes I did have the config file as below.

They only way it works for me if I leave the //uiHost: “127.0.0.1”, commented out and port 1880 open.

Cant get it to run on https either

Am I allowed to post the links here?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.