# Node-red container in docker: How do I get out of a Restart Loop?

**URL:** <https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774>\
**Category:** General\
**Tags:** docker\
**Created:** [7 December 2024 23:39 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774 "2024-12-07T23:39:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ll135791](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@ll135791](https://discourse.nodered.org/u/ll135791)\
**Post date:** [7 December 2024 23:39 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774/1 "2024-12-07T23:39:20Z")

</div>

I was configuring my node-red container to my mininet container both under the same docker, and when I went to change setting.json properties I believe I might have doubled a line that caused a syntax error to occur. Ever since, I have been getting this error below.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d63952dcad8e2c19806b51d50ce66c4311e88cbd.png)

Whenever I try access node-red is keeps giving me this error saying that it is restarting. In this image below I tried entering in safe mode.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/b/ebe2c58c478fa4512b5f05be6a81fd24e373a13a.png)

I am currently using double RDP to access this and I am working in Rocky Linux 8.10 for this. I am fairly new to node-red and I'm not familiar with recreating node-red. If I were to go the route of recreating are there parameters that need to be determined for node-red, or is it a simple installation. The sandbox I am working on is from a course, so I was not the one the initially installed this container. Is there anything I can do to solve this without having to recreate the container? It also seems to that the current node-red container is not on port 80 at the moment, so would I be able to create another one and connect it to the port without having to uninstall the current node-red container?

---

<div class="post-metadata">

**Author:** ![ll135791](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@ll135791](https://discourse.nodered.org/u/ll135791)\
**Post date:** [8 December 2024 00:05 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774/2 "2024-12-08T00:05:50Z")

</div>

Here is the image the status of the containers.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/optimized/3X/8/0/80a39c65ed91b56aa4a676d7e1bb42527cf301fe_2_690x29.png)

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [8 December 2024 09:09 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774/3 "2024-12-08T09:09:31Z")

</div>

Are you using the [restart option](https://github.com/compose-spec/compose-spec/blob/main/spec.md#restart) in a docker compose file?

Or using the [`--restart`](https://stackoverflow.com/questions/41555884/docker-what-does-docker-run-restart-always-actually-do) option?

There is also [systemctl](https://linuxconfig.org/restarting-docker-on-linux-daemon-containers-composer-and-services) which can potentially be restarting a failing docker image.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [8 December 2024 09:50 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774/4 "2024-12-08T09:50:47Z")

</div>

You can try injecting the "NODE\_RED\_ENABLE\_SAFE\_MODE=true" environment variable into the container to have it start but not run the flows, to give you the option to remove a broken node.

---

<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:** [8 March 2025 09:51 UTC](https://discourse.nodered.org/t/node-red-container-in-docker-how-do-i-get-out-of-a-restart-loop/93774/5 "2025-03-08T09:51:23Z")

</div>

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