# Node-Red on home assistant – does not want to write to sd disk with system

**URL:** <https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [30 January 2025 05:00 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994 "2025-01-30T05:00:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Le-Ze](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@Le-Ze](https://discourse.nodered.org/u/Le-Ze)\
**Post date:** [30 January 2025 05:00 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/1 "2025-01-30T05:00:41Z")

</div>

Hi.  
I have installed home assistant on raspberry pi and I am trying node-red.  
OS Version: Home Assistant OS 14.2  
Home Assistant Core: 2025.1.4

Node write file does not have access to write to sd card where system is.  
I have tried /dev/shm/ testfile.txt, /config/testfile.txt  
How to solve this problem?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2025 06:40 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/2 "2025-01-30T06:40:05Z")

</div>

Home assistant runs node-red inside a docker container and so is isolated from the host operating system.

There may be settings in HA to instruct it to map things like the SD card but you will need to ask on the home assistant forum

Alternatively, run node red yourself on the host operating system (natively).

---

<div class="post-metadata">

**Author:** ![Le-Ze](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@Le-Ze](https://discourse.nodered.org/u/Le-Ze)\
**Post date:** [30 January 2025 06:54 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/3 "2025-01-30T06:54:48Z")

</div>

Can I find instructions somewhere on how to map the SD card?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2025 07:03 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/4 "2025-01-30T07:03:49Z")

</div>

> [@Le-Ze](#):
>
> Can I find instructions somewhere on how to map the SD card

I'm sure you can, but this is not a node-red thing. This is a home assistant and/or docker thing.

---

<div class="post-metadata">

**Author:** ![mikefila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikefila/32/95223_2.png) [@mikefila](https://discourse.nodered.org/u/mikefila)\
**Post date:** [30 January 2025 15:43 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/5 "2025-01-30T15:43:55Z")

</div>

By default `/config/www/` is the only folder that you can save files to. However `www` has no auth protection and is exposed to the internet. Setting up your media folder is advised. That location when exposed can be used to store files and is protected by home assistant. Then you would use the path `/media/testfile.txt`.

[https://www.youtube.com/watch?v=TAkU-Q6YAsk](https://www.youtube.com/watch?v=TAkU-Q6YAsk)

---

<div class="post-metadata">

**Author:** ![Le-Ze](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@Le-Ze](https://discourse.nodered.org/u/Le-Ze)\
**Post date:** [30 January 2025 18:07 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/6 "2025-01-30T18:07:24Z")

</div>

Can't you enable another directory?  
/dev/shm/ to ramDisk.

mkdir -p /media/ramdisk  
mount -t tmpfs -o size=512M tmpfs /media/ramdisk  
mount: mounting tmpfs on /media/ramdisk failed: Permission denied

---

<div class="post-metadata">

**Author:** ![mikefila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikefila/32/95223_2.png) [@mikefila](https://discourse.nodered.org/u/mikefila)\
**Post date:** [30 January 2025 20:01 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/7 "2025-01-30T20:01:59Z")

</div>

With haos everything is containerized. If you're using the web terminal, your in the terminal container not home assistant. I've never tried to create directories from the cli, so I'm not sure how to do it.

If you set up samba you can go to the folder, right click and create a new folder. You can also check the box in the write file node to `create directory`.

Edit: the terminal add on in the community section of addons has elevated permissions. You maybe able to make dir with that. Otherwise this [portainer](https://github.com/alexbelgium/hassio-addons/tree/master/portainer) addon has full permissions and you can open a terminal in any container. To get full permissions from a standard terminal google home assistant enable ssh port 22222.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [30 January 2025 23:18 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/8 "2025-01-30T23:18:56Z")

</div>

Good directions

Essentially (for the OP) you need to understand the relationship between NR, HA and HAOS

HAOS is a very cut down Linux OS that is used to run Home Assistant, any addons (such as Node Red) are done by launching a docker container from HAOS (not HA) - you therefore need to get in and communicate with HAOS

As you are asking these questions it would appear you are new to all of this - so Portainer installed into HA (which is its own container as well) is the easiest way to manage all of this.

You will however need to get into HAOS and create the directories on the SD card where you want to store the NR files (and no putting them into a RAMDISK is not a good idea as it will disappear on a restart)

Craig

---

<div class="post-metadata">

**Author:** ![Le-Ze](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@Le-Ze](https://discourse.nodered.org/u/Le-Ze)\
**Post date:** [31 January 2025 07:53 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/9 "2025-01-31T07:53:38Z")

</div>

I'm completely new to HA. I'm a week old.  
I've been using node red on raspberry - raspios-bookworm.  
I wanted to try Home Assistant Voice Preview Edition.  
I'll probably go back to bookworm.

---

<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:** [1 May 2025 07:54 UTC](https://discourse.nodered.org/t/node-red-on-home-assistant-does-not-want-to-write-to-sd-disk-with-system/94994/10 "2025-05-01T07:54:16Z")

</div>

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