<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Node-red</id>
	<title>Node-red - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Node-red"/>
	<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Node-red&amp;action=history"/>
	<updated>2026-06-17T12:05:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Node-red&amp;diff=21808&amp;oldid=prev</id>
		<title>Pigs: Don</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Node-red&amp;diff=21808&amp;oldid=prev"/>
		<updated>2025-05-23T16:02:13Z</updated>

		<summary type="html">&lt;p&gt;Don&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:02, 23 May 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;… http://127.0.0.1:1880/&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;… http://127.0.0.1:1880/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;…&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;…&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;and you will see the address of the website that is loaded in the log, typically http://127.0.0.1:1880/. Just open the link, and start to use node-red (you may also want to check the command line options of node-red to configure it further). Note that if you want to imperatively install new nodes, you may need to enable [[nix-ld]] if you run &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;NixOs&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;and you will see the address of the website that is loaded in the log, typically http://127.0.0.1:1880/. Just open the link, and start to use node-red (you may also want to check the command line options of node-red to configure it further). Note that if you want to imperatively install new nodes, you may need to enable [[nix-ld]] if you run &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;NixOS&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== As a publicly accessible website ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== As a publicly accessible website ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to configure it as a permanent, always active service, on your own computer, you can configure the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;//search.nixos.org/options?channel=24.11&amp;amp;size=50&amp;amp;sort=relevance&amp;amp;type=packages&amp;amp;query=&lt;/del&gt;services.node-red &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;services.node-red] &lt;/del&gt;module. Below, we describe a more advanced usecase where you also want to make the service available online, behind an Nginx server in charge of configuring automatically the https certificate.&amp;lt;syntaxhighlight lang=&quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nixos&lt;/del&gt;&quot;&amp;gt;{ lib, pkgs, config, ... }:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to configure it as a permanent, always active service, on your own computer, you can configure the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{nixos&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;option|&lt;/ins&gt;services.node-red&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}} &lt;/ins&gt;module. Below, we describe a more advanced usecase where you also want to make the service available online, behind an &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;Nginx&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;server in charge of configuring automatically the https certificate.&amp;lt;syntaxhighlight lang=&quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nix&lt;/ins&gt;&quot;&amp;gt;{ lib, pkgs, config, ... }:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;let&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;let&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   cfg = config.services.node-red;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   cfg = config.services.node-red;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-21803:rev-21808:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Pigs</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Node-red&amp;diff=21803&amp;oldid=prev</id>
		<title>TobiasBora: Created the node-red page.</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Node-red&amp;diff=21803&amp;oldid=prev"/>
		<updated>2025-05-23T01:35:26Z</updated>

		<summary type="html">&lt;p&gt;Created the node-red page.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Node-red ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://nodered.org/ Node-red] describeds itself as a &amp;quot;Low-code programming for event-driven applications&amp;quot;, where you can connect nodes (that you can possibly obtain directly from a large list of npm packages) to automatize many different tasks.&lt;br /&gt;
&lt;br /&gt;
=== Standalone run ===&lt;br /&gt;
You can simply install and run the application locally like:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ nix-shell -p node-red&lt;br /&gt;
$ node-red&lt;br /&gt;
… http://127.0.0.1:1880/&lt;br /&gt;
…&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;and you will see the address of the website that is loaded in the log, typically http://127.0.0.1:1880/. Just open the link, and start to use node-red (you may also want to check the command line options of node-red to configure it further). Note that if you want to imperatively install new nodes, you may need to enable [[nix-ld]] if you run NixOs.&lt;br /&gt;
&lt;br /&gt;
=== As a publicly accessible website ===&lt;br /&gt;
If you want to configure it as a permanent, always active service, on your own computer, you can configure the [https://search.nixos.org/options?channel=24.11&amp;amp;size=50&amp;amp;sort=relevance&amp;amp;type=packages&amp;amp;query=services.node-red services.node-red] module. Below, we describe a more advanced usecase where you also want to make the service available online, behind an Nginx server in charge of configuring automatically the https certificate.&amp;lt;syntaxhighlight lang=&amp;quot;nixos&amp;quot;&amp;gt;{ lib, pkgs, config, ... }:&lt;br /&gt;
let&lt;br /&gt;
  cfg = config.services.node-red;&lt;br /&gt;
in&lt;br /&gt;
{&lt;br /&gt;
  services.nginx = {&lt;br /&gt;
    virtualHosts.&amp;quot;YOURDOMAIN.com&amp;quot; = {&lt;br /&gt;
      forceSSL = true; # Enable and force https&lt;br /&gt;
      enableACME = true; # Automatically get a Let&amp;#039;s Encrypt certificate &lt;br /&gt;
      locations.&amp;quot;/&amp;quot; = {&lt;br /&gt;
        proxyPass = &amp;quot;http://localhost:${toString cfg.port}&amp;quot;;&lt;br /&gt;
        # This fixes WS errors, inspired by&lt;br /&gt;
        # https://github.com/meeki007/node-red-server-howto-guide/blob/master/README.md&lt;br /&gt;
        extraConfig = &amp;#039;&amp;#039;&lt;br /&gt;
          #Defines the HTTP protocol version for proxying by default it it set to 1.0.&lt;br /&gt;
          #For Websockets and keepalive connections you need to use the version 1.1&lt;br /&gt;
          proxy_http_version  1.1;&lt;br /&gt;
          &lt;br /&gt;
          #Sets conditions under which the response will not be taken from a cache.&lt;br /&gt;
          proxy_cache_bypass  $http_upgrade;&lt;br /&gt;
          &lt;br /&gt;
          #These header fields are required if your application is using Websockets&lt;br /&gt;
          proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
          proxy_set_header Connection &amp;quot;upgrade&amp;quot;;&lt;br /&gt;
          &lt;br /&gt;
          #The $host variable in the following order of precedence contains:&lt;br /&gt;
          #hostname from the request line, or hostname from the Host request header field&lt;br /&gt;
          #or the server name matching a request.&lt;br /&gt;
          proxy_set_header Host $host;&lt;br /&gt;
          &lt;br /&gt;
          #Forwards the real visitor remote IP address to the proxied server&lt;br /&gt;
          proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
          &lt;br /&gt;
          #A list containing the IP addresses of every server the client has been proxied through&lt;br /&gt;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
          &lt;br /&gt;
          #When used inside an HTTPS server block, each HTTP response from the proxied server is rewritten to HTTPS.&lt;br /&gt;
          proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
          &lt;br /&gt;
          #Defines the original host requested by the client.&lt;br /&gt;
          proxy_set_header X-Forwarded-Host $host;&lt;br /&gt;
          &lt;br /&gt;
          #Defines the original port requested by the client.&lt;br /&gt;
          proxy_set_header X-Forwarded-Port $server_port;      &lt;br /&gt;
        &amp;#039;&amp;#039;;&lt;br /&gt;
      };&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
  services.node-red = {&lt;br /&gt;
    enable = true;&lt;br /&gt;
    # Do NOT open this port, nginx will automatically forward to it&lt;br /&gt;
    port = 1880;&lt;br /&gt;
    withNpmAndGcc = true; # Allow imperative download of nodes. Need to enable nix-ld, see below&lt;br /&gt;
    # I just downloaded the file from&lt;br /&gt;
    # https://github.com/node-red/node-red/blob/master/packages/node_modules/node-red/settings.js&lt;br /&gt;
    # and I added for instance a user in the configuration, changed the&lt;br /&gt;
    # contextStorage, and enabled project. I can&amp;#039;t use &amp;quot;define&amp;quot; (that uses -D)&lt;br /&gt;
    # since for what I know it does not support nested lists of users, and is also less&lt;br /&gt;
    # practical than uncommenting a config file.&lt;br /&gt;
    configFile = ./node-red-settings.js;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  # If you want to imperatively install most npm packages, you will need nix-ld since npm is typically&lt;br /&gt;
  # not very pure (to say the least)&lt;br /&gt;
  programs.nix-ld.enable = true;&lt;br /&gt;
  systemd.services.node-red = {&lt;br /&gt;
    path = with pkgs; [&lt;br /&gt;
      # git is needed for projects, but systemd resets the path so we need to add it back&lt;br /&gt;
      git&lt;br /&gt;
      # needed by nodejs to install for instance node-red-dashboard (or &amp;quot;error syscall spawn sh&amp;quot;)&lt;br /&gt;
      bash&lt;br /&gt;
      # Add here any other program needed by the npm packages you want to install&lt;br /&gt;
    ];&lt;br /&gt;
    environment = {&lt;br /&gt;
      # environment variables are removed, so we need to specify nix-ld environment here&lt;br /&gt;
      NIX_LD = lib.fileContents &amp;quot;${pkgs.stdenv.cc}/nix-support/dynamic-linker&amp;quot;;&lt;br /&gt;
      NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [&lt;br /&gt;
        # List by default&lt;br /&gt;
        zlib&lt;br /&gt;
        zstd&lt;br /&gt;
        stdenv.cc.cc&lt;br /&gt;
        curl&lt;br /&gt;
        openssl&lt;br /&gt;
        attr&lt;br /&gt;
        libssh&lt;br /&gt;
        bzip2&lt;br /&gt;
        libxml2&lt;br /&gt;
        acl&lt;br /&gt;
        libsodium&lt;br /&gt;
        util-linux&lt;br /&gt;
        xz&lt;br /&gt;
        systemd&lt;br /&gt;
      ];&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
  &lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>TobiasBora</name></author>
	</entry>
</feed>