# Installing Node-Red on a Mac Mini M4 pro

**URL:** <https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810>\
**Category:** General\
**Created:** [5 March 2025 18:38 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810 "2025-03-05T18:38:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robertotarga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertotarga/32/16890_2.png) [@Robertotarga](https://discourse.nodered.org/u/Robertotarga)\
**Post date:** [5 March 2025 18:38 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/1 "2025-03-05T18:38:34Z")

</div>

Hi Folks,  
I need to install NR on a M4 Pro Mac Mini with Sequoia 15.3  
Is there a step-by-step guide that I can follow?  
I.e. should I install node.js before and then NR or is there a complete setup that installs all necessary module?

Many thanks in advance

---

<div class="post-metadata">

**Author:** ![chrisn-au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chrisn-au/32/25504_2.png) [@chrisn-au](https://discourse.nodered.org/u/chrisn-au)\
**Post date:** [5 March 2025 22:58 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/2 "2025-03-05T22:58:22Z")

</div>

My view - unless there is a good reason not to, use docker - it is clean it is straightforward

[Node-Red under docker](https://nodered.org/docs/getting-started/docker)

I would use docker compose however that is personal preference

---

<div class="post-metadata">

**Author:** ![Robertotarga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertotarga/32/16890_2.png) [@Robertotarga](https://discourse.nodered.org/u/Robertotarga)\
**Post date:** [6 March 2025 10:22 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/3 "2025-03-06T10:22:16Z")

</div>

Hi Christian,  
thank you very much for your tip. I have no experience with Docker, I find it promising, albeit challenging.  
My goal is to move a very complex project from ubuntu to a mac silicon platform.  
I use a lot of modules, interact with many services like mosquitto, knx gateway, python, file system httprequest and therefore I need to open many more ports in addition to the 1880. I will need to replace the empty flows.json with my file, modify config setting and so on, accessing the file system to use some icon and python files. With Docker will I be able to go to the file system level to replace some files with my own? Does Mosquitto need to be run as a Docker container or can I use a standard installation?  
Sorry with all these naive questions, but you look like an expert on this matter. Docker attracts me on one hand and scares me on the other one.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [6 March 2025 11:04 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/4 "2025-03-06T11:04:21Z")

</div>

Docker should be the last resort.

Indeed it is a matter of installing nodejs and then npm install -g nodered as per documentation. Then you can run node-red start from any directory after which the required files (settings/flows.json) will be created in that directory under the (hidden) .nodered directory.

See if that works for you. After that you want node-red to be run in the background/at boot which is also described in the documentation

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [6 March 2025 17:04 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/5 "2025-03-06T17:04:09Z")

</div>

I have a Mac mini m1 and use

```auto
sudo npm install -g --unsafe-perm node-red

```

As it shows in the documentation

> **[Getting Started : Node-RED](https://nodered.org/docs/getting-started/)**

---

<div class="post-metadata">

**Author:** ![chrisn-au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chrisn-au/32/25504_2.png) [@chrisn-au](https://discourse.nodered.org/u/chrisn-au)\
**Post date:** [6 March 2025 21:26 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/6 "2025-03-06T21:26:54Z")

</div>

> [@bakman2](#):
>
> Docker should be the last resort.

Intriguing, why is that ?

---

<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:** [6 March 2025 21:44 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/7 "2025-03-06T21:44:08Z")

</div>

> [@chrisn-au](#):
>
> why is that

Because it is just something else to learn about. If you are familiar with Docker already, or are prepared to put the time in to learn about it, then by all means use it. For the majority of users, though, it just adds complexity with no significant advantage (again, for the majority of users).

---

<div class="post-metadata">

**Author:** ![chrisn-au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chrisn-au/32/25504_2.png) [@chrisn-au](https://discourse.nodered.org/u/chrisn-au)\
**Post date:** [6 March 2025 21:50 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/8 "2025-03-06T21:50:13Z")

</div>

Robert, I can understand the concerns - I agree it can be daunting. If you have a complex project with significant dependencies then I would argue even more reason to go do docker.

The benefits of docker is that with work then the whole environment can be maintained quite independently for other dependencies on your machine - you can easily have test environments etc.

Clearly I encourage you to do the assessment of what is best for you. But to test out docker.

1. Download and install Docker desktop for the Mac - It is ROCK solid, you do not need an account at this stage (at least when I first installed)
2. To initially get it running start NR with a bind mount (that is rather than using the Docker volume to store your data use a local directory

Replace the /home/pi/.node-red directory with your local directory

```auto
docker run -it -p 1880:1880 -v /home/pi/.node-red:/data --name mynodered nodered/node-red

```

This will start node red on port 1880, you can access it by [http://localhost:1880](http://localhost:1880). If you create a flow you will see in the directory the flows.json file, you will see the settings.js file etc.

As you before more confident you can then move to docker compose . This will allow you to add other servers like mosquito to the stack , keep them isolated etc. For a complex project to me it is a now brainer - Happy to help if needed regardless good luck

---

<div class="post-metadata">

**Author:** ![chrisn-au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chrisn-au/32/25504_2.png) [@chrisn-au](https://discourse.nodered.org/u/chrisn-au)\
**Post date:** [6 March 2025 21:54 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/9 "2025-03-06T21:54:31Z")

</div>

> [@Colin](#):
>
> Because it is just something else to learn about. If you are familiar with Docker already, or are prepared to put the time in to learn about it, then by all means use it. For the majority of users, though, it just adds complexity with no significant advantage (again, for the majority of users).

Fair call - and I get the added complexity. For anything complex though, particularly if you want to have test environments, multiple instances , changing versions on node, additional services like mosquito etc then it makes sense. I would argue docker initially while scary is not difficult to get going and worth the pain however each to their own -

---

<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:** [6 March 2025 22:10 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/10 "2025-03-06T22:10:34Z")

</div>

> [@chrisn-au](#):
>
> For anything complex though

It depends what you mean by complex, if by complex you mean accessing the sound system, USB ports, I2C GPIO etc, then I disagree, it is easier without Docker (unless you know Docker inside out).

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [7 March 2025 05:13 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/11 "2025-03-07T05:13:06Z")

</div>

> [@Colin](#):
>
> accessing the sound system, USB ports, I2C GPIO etc

This. Docker/compose is fantastic and I use it as much as possible, but with node-red, once you need access to hardware layers, it can become problematic.

---

<div class="post-metadata">

**Author:** ![Robertotarga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertotarga/32/16890_2.png) [@Robertotarga](https://discourse.nodered.org/u/Robertotarga)\
**Post date:** [7 March 2025 11:06 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/12 "2025-03-07T11:06:34Z")

</div>

Hi zenofmud,  
thank you very much. I installed node.js and then node-red with the suggested command and voila NR is up and running with one single line command!  
Now comes the hard part. I have to move existing project on Node-red v. 3.0.2 on Ubuntu to this brand new mac mini M4 pro. I have tons of custom nodes.

1. Do you recommend to export-import the nodes or can I simply overwrite current empty flows.json?

2. custom modules: do you suggest to overwrite the new empty folder or importing one by one the modules used in the project?

Thank you very much for your precious support.

Roberto

---

<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:** [7 March 2025 11:20 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/13 "2025-03-07T11:20:45Z")

</div>

First, if possible, on the Ubuntu machine, make sure that all installed nodes are on the latest versions. Then copy the complete .node-red folder, except the node\_modules folder, across to the new machine.  
Finally, on the new machine go into the .node-red folder and run  
`npm install`  
which will install all the additional nodes you had installed. It uses information from the file package.json to do that.  
Then restart node-red.

---

<div class="post-metadata">

**Author:** ![sumitshinde-84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sumitshinde-84/32/83795_2.png) [@sumitshinde-84](https://discourse.nodered.org/u/sumitshinde-84)\
**Post date:** [7 March 2025 14:33 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/14 "2025-03-07T14:33:56Z")

</div>

@Robertotarga Here is the complete guide: [Run FlowFuse Device Agent as a service on MacOS using Docker • FlowFuse](https://flowfuse.com/blog/2024/11/device-agent-as-service-on-mac/). While writing this article, I used a Mac M4 Pro. It explains how to run Node-RED on your device as a service using the FlowFuse Device Agent, allowing you to manage it remotely via the FlowFuse platform. You can start with the free tier, which lets you manage up to two edge devices at no cost. Here is an article on how to set up the free tier on FlowFuse: [FlowFuse Cloud now available for free! • FlowFuse](https://flowfuse.com/blog/2024/12/flowfuse-release-2-12/).

---

<div class="post-metadata">

**Author:** ![Robertotarga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertotarga/32/16890_2.png) [@Robertotarga](https://discourse.nodered.org/u/Robertotarga)\
**Post date:** [8 March 2025 19:52 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/15 "2025-03-08T19:52:30Z")

</div>

Hi Colin,  
thank you very much, you saved my day!  
Following your instructions I have now NR running in mac mini M4. There are some minor glitches (python scripts with missing libraries), but now the most important thing is that rebooting the mac NR won't start. I have to open the terminal and launching node-red command, where as I installed mosquitto with homebrew and configured as a service with autostart on reboot.  
Do you know if using homebrew or other utility I will be able to autostart NR on reboot?

Again thank you so much.

---

<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:** [8 March 2025 21:08 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/16 "2025-03-08T21:08:16Z")

</div>

> [@Robertotarga](#):
>
> Do you know if using homebrew or other utility I will be able to autostart NR on reboot?

Certainly something will allow you to run node red as a service, but unless you are using systemd then someone else will have to help you with this.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 March 2025 21:30 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/17 "2025-03-08T21:30:31Z")

</div>

I just did some searches and couldn't find a method to get it to startup automatically on my Mac mini .

To start node-red, I just open a terminal window and enter `node-red` and then just minimize the window. If you find a way please document it.

---

<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:** [8 March 2025 21:58 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/18 "2025-03-08T21:58:24Z")

</div>

If mosquitto can be run as a service then I assume it must be possible to run node red as a service.

I found this: [macos - Run Script As A Service After Startup - Ask Different](https://apple.stackexchange.com/questions/312309/run-script-as-a-service-after-startup)

---

<div class="post-metadata">

**Author:** ![ozdw](https://avatars.discourse-cdn.com/v4/letter/o/4af34b/32.png) [@ozdw](https://discourse.nodered.org/u/ozdw)\
**Post date:** [19 May 2025 01:55 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/19 "2025-05-19T01:55:27Z")

</div>

I use pm2 to manage the node red and other processes. It's brilliant.

---

<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:** [17 August 2025 01:56 UTC](https://discourse.nodered.org/t/installing-node-red-on-a-mac-mini-m4-pro/95810/20 "2025-08-17T01:56:02Z")

</div>

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