IMD SolutionComputing LibraryShop main store

How-to

Disable the pre-installed Node-RED startup on an edge PC

Edge computing and IIoT Published 6 min read

Short answer

Killing the pre-installed Node-RED on an edge PC frees memory for a few seconds only, because its startup registration relaunches the process. Connect over SSH, disable the init script's boot links with the update-rc.d disable command, then reboot once and prove the result: zero start links for the script and a 30-second quiet process list.

On this page
  1. Why killing the process only holds for seconds
  2. What the disable command changes
  3. Disabling the Node-RED startup over SSH
  4. The 30-second, one-reboot proof on an EPC 1502 (1185416)
  5. Getting the memory back and living with the change
  6. Questions asked

Killing the pre-installed Node-RED process on an EPC 1502 frees memory for a few seconds, because the box's startup layer relaunches it as soon as it dies. The persistent fix is not another kill but a withdrawal of the startup registration: open an SSH session and run update-rc.d node-red-init.sh disable, then reboot once. That turns the script's start links into stop links, so no runlevel launches Node-RED at boot; the script itself stays in place, and the matching enable command reverses the change. This article gives the steps, the check that proves the disable took, and what to expect from the memory. One caution before you start: the factory instance may be feeding data upstream. If a historian subscription or a broker topic quietly depends on it, the disable removes that data path at the next boot, so confirm nothing consumes it before you switch it off.

Why killing the process only holds for seconds #

The sequence on the affected box is always the same: you stop the node process, the memory you watched free up fills again, and within seconds Node-RED is back in the process list. That is not a process refusing to die. It is a startup registration doing what it was configured to do: the pre-installed Node-RED runs as a system service started by an init script, and the service layer brings the instance straight back after a kill. A kill addresses only the current instance, so a kill loop never converges. The fix is to withdraw the registration that keeps the service alive, not to keep fighting the process.

What the disable command changes #

update-rc.d, the service toolset this firmware accepts, manages the per-runlevel links that decide whether an init script starts. The disable action rewrites the target script's start links as stop links, so the boot system no longer launches node-red-init.sh in any runlevel. Two properties matter on a production box. The script file itself stays in /etc/init.d — disable, like remove, does not delete it. And the action is reversible: the matching enable command rebuilds the original links. The general procedure for disabling pre-installed services with update-rc.d covers those mechanics in depth; the rest of this article is the EPC 1502 case — which script, how to prove the disable took, and what the memory does.

Disabling the Node-RED startup over SSH #

  1. Reach the box. Open an SSH client such as PuTTY, connect to the EPC 1502's management address, and log in with an account that may write under /etc. If the box is not reachable on the network at all, initial network configuration on an edge PC with no SSH access covers getting a session first.
  2. Confirm the script name as installed: ls /etc/init.d/node-red-init.sh should print the path. If it does not, list /etc/init.d and use the Node-RED script name your firmware actually shows — never guess a name.
  3. Record the before state: ls /etc/rc*.d/*node-red* and note which entries begin with S, the start links, and which begin with K, the stop links. You need this list for the proof below.
  4. Run the disable: update-rc.d node-red-init.sh disable. Then repeat the listing from the previous step. Every S entry for this script should now read K, and the count of start entries across the runlevel directories should be zero.
  5. Reboot. This is the decisive step, not a formality: the disable governs the next boot, and any supervisor process that the previous boot started can keep respawning the instance in the current session.
  6. After the boot completes, hold the quiet window derived in the worked example below and check the process list again. If no node process appears, the registration is withdrawn and the memory it held is yours.

The 30-second, one-reboot proof on an EPC 1502 (1185416) #

Inputs #

The device is an EPC 1502, part number 1185416, running the firmware whose Edge Devices quickstart documentation describes its pre-installed Node-RED. The startup script is node-red-init.sh, the script the disable command targets. The behavior to beat is the reported one: the killed Node-RED process returns within a few seconds. The tool behavior is the documented one: disable rewrites the runlevel links and, like remove, leaves the script file in /etc/init.d.

The rule #

A disable is proven only when three things hold at once: the runlevel directories contain zero start entries for the script, the box comes back from one full reboot without the process, and the process list stays quiet for longer than the respawn window after that boot.

The arithmetic #

Read the reported "a few seconds" as a ceiling of about 10 s. A quiet window three times that ceiling gives 3 × 10 s = 30 s of watching the process list after the boot completes. For the link count, a default Debian-family layout starts a service in runlevels 2, 3, 4 and 5, so a full disable moves 4 start entries to stop entries: 4 − 4 = 0 start entries matching the script, with 4 stop entries in their place. Read the real count from your own listing, because the runlevels the shipped script declares in its INIT INFO block decide the actual number.

Result and decision #

If the listing shows zero start entries for node-red-init.sh, the reboot brings the box back without Node-RED, and 30 s of watching produces no node process, the startup registration is withdrawn and the runtime's resident memory has gone back to the pool. If Node-RED reappears after that reboot, the init links were not the only path: a second startup mechanism, for example a unit under the system service manager, is configured to launch it. Search the boot configuration for the script name and for node-red, disable that path the same way, and repeat the reboot check. Do not converge by killing the process in a loop — the loop is the symptom, not the fix.

Getting the memory back and living with the change #

Measure the reclaim on the box itself: read the node process footprint in htop before the change, then compare free memory after the reboot. No published figure exists for this firmware, because the amount depends on the flows and nodes the factory instance carried; the entire resident set of the runtime you watched in htop is what returns.

If a later project needs the factory Node-RED again, run the enable counterpart of the same command on the same script from the same kind of SSH session. The script stayed in /etc/init.d the whole time, so nothing needs reinstalling, and the flows come back as they were. Note that the quickstart examples for this device family assume the pre-installed Node-RED is present, so re-enable before you follow one. It is also worth re-checking the link listing after any firmware update, since a factory update can restore factory startup state.

If you are specifying new boxes and know Node-RED will never run on them, the manufacturer lists a variant of the EPC 1502 configured without the pre-installed Node-RED and InfluxDB. Choosing that at specification time is cleaner than disabling each box afterwards.

Questions asked

Does disabling the startup touch the stored Node-RED flows?

No. The disable command rewrites only the per-runlevel boot links for the init script. The script file stays where it is, and the flows, credentials and installed nodes of the pre-installed instance stay in their own data directory untouched. If you re-enable later with the matching enable command, the same flows start again at boot exactly as they were.

Can I delete the pre-installed Node-RED completely instead?

Not through the documented service tools. Both the disable and the remove actions leave the init script file in place, and this firmware publishes no procedure for uninstalling the factory runtime. Keep to disable: it delivers the same quiet boot and the same freed memory while leaving the system in a state the manufacturer's documentation still describes.

How much memory does the disable actually return?

Measure it on your own box: read the node process footprint in htop before the change, then compare free memory after the reboot that follows the disable. The entire resident set of that runtime is what goes back to the pool.

Does the same procedure work on other edge PCs with factory Node-RED?

Other devices also come with factory Node-RED installed, but the init script name and the startup layout are specific to each device and firmware release. Confirm the exact script name under the init directory on any other box before you run the disable against it. The proof pattern itself carries over unchanged: zero start links for the script, one clean reboot, then a quiet process list past the respawn window.

Keep reading

  • How-to

    Disable pre-installed services with update-rc.d

    Run update-rc.d with the disable option as root for each pre-installed init script, then reboot. That stops the native services from starting at boot without uninstalling them, so your container stack gets exclusive use of their RAM and ports.

    Operating systems on the plant floor

  • Troubleshooting

    Ignition Edge stuck starting after a Java trust store corruption

    The gateway page stays at Gateway is starting because module initialization dies when Java cannot build its default SSL context — wrapper.log shows java.security.NoSuchAlgorithmException for DefaultSSLContext under SunJSSE. Copy cacerts and cacerts.bak out of lib\runtime\jre-win\lib\security in the installation the service runs, rename cacerts.bak to cacerts, restart the service, and the gateway comes up.

    Edge computing and IIoT

  • Troubleshooting

    Stop Node-RED Docker healthcheck CPU spikes on an edge PC

    The official Node-RED Docker image ships a Docker HEALTHCHECK whose probe command boots a full second Node.js runtime inside the container to make one loopback HTTP request. On a controller-class CPU shared with a PLC runtime, that boot is the roughly 45% spike in htop. Disable the probe or swap it for a shell test in the compose file; the restart policy still recovers crashes.

    Edge computing and IIoT