# Node-RED SQLITE stores Data Base on windows

**URL:** https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438
**Category:** General
**Created:** [7 July 2018 20:22 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438 "2018-07-07T20:22:45Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [7 July 2018 20:22 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/1 "2018-07-07T20:22:45Z")

</div>

Hi there !

I wanna store the temperature measurement and the time when the measurement was done; actually works fine on my flow (I've a UI to display the table, I made it using dashboard), the problem is I don't know where the sqlite node save the data base file, I can't find it ... I tried using the file node but doesn't works ...

OS: Windows 10 pro x64  
sqlite: [https://flows.nodered.org/node/node-red-node-sqlite](https://flows.nodered.org/node/node-red-node-sqlite)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [7 July 2018 22:09 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/2 "2018-07-07T22:09:17Z")

</div>

what are the node configuration options?

---

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [7 July 2018 23:11 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/4 "2018-07-07T23:11:08Z")

</div>

thanks ukmoose...

 ![sqlite](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3f37f025d1ee7c1e2667db9cc279674aa09be65c.PNG)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [7 July 2018 23:20 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/5 "2018-07-07T23:20:59Z")

</div>

OK so the sqlite node will save to the sqlite database that you must have installed separately.

---

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [8 July 2018 00:30 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/6 "2018-07-08T00:30:31Z")

</div>

Well, that's a problem, I've not installed sqlite database separately ... I searched in google and found this tutorial: [http://noderedguide.com/tutorial-sqlite-and-node-red/](http://noderedguide.com/tutorial-sqlite-and-node-red/) ... Never say that I must install database separately; nevertheless, when start node-red in windows PowerShell show this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/66b850c6195d53c35477cbe0f88c0b976ce5bb96.png)

Looks like sqlite already exist: "7 Jul 19:27:02 - [info] [sqlitedb:2536932f.016bcc] opened sqlite ok"

---

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [8 July 2018 00:32 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/7 "2018-07-08T00:32:06Z")

</div>

Please, could you explain me how its works?

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [8 July 2018 10:43 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/8 "2018-07-08T10:43:45Z")

</div>

Absolutely no idea!  
My experience is primarily based on these tutorials for the Raspberry Pi.

[http://randomnerdtutorials.com/sqlite-with-node-red-and-raspberry-pi/](http://randomnerdtutorials.com/sqlite-with-node-red-and-raspberry-pi/)

Which starts off by stating "Install SQLlite"

---

<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 July 2018 12:45 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/9 "2018-07-08T12:45:11Z")

</div>

> [@kharlos04](#):
>
> Please, could you explain me how its works?

Not sure what you mean by that. It seems that it is working (other than, obviously, the flow is trying to create a table that has already been created once.

---

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [8 July 2018 16:39 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/10 "2018-07-08T16:39:38Z")

</div>

I have no problem with the flow, works OK ... I wanna know where the sqlite node saves (in my windows PC ) the database called "sqlite" ... in previous replies I posted the setting sqlite node ([Node-RED SQLITE stores Data Base on windows](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/4?u=kharlos04))

In this reply: [Node-RED SQLITE stores Data Base on windows](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/6?u=kharlos04)  
I'm saying that the node "sqlitedb:2536932f.016bcc" open the database called "sqlite", but I don't know where the file is ....

---

<div class="post-metadata">

### Author: ![kharlos04](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kharlos04](https://discourse.nodered.org/u/kharlos04)
#### Post date: [8 July 2018 18:03 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/11 "2018-07-08T18:03:07Z")

</div>

Well, this example was usefull: [https://medium.com/@supotsaeea/node-red-sqlite-d78a57ec4561](https://medium.com/@supotsaeea/node-red-sqlite-d78a57ec4561)

I assumed that the database file made by sqlite node will be save in C:\Users\_username\_.node-red ... I was wrong, I don't know where is

---

<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 July 2018 19:25 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/12 "2018-07-08T19:25:09Z")

</div>

I don't use windows but presumably there is a search program that you could use to find it. However in Linux you can specify a full path to the file, so presumably you can do that in windows too.

---

<div class="post-metadata">

### Author: ![mpxd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mpxd/32/2028_2.png) [@mpxd](https://discourse.nodered.org/u/mpxd)
#### Post date: [24 August 2018 09:17 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/13 "2018-08-24T09:17:31Z")

</div>

@kharlos04 I ran into the same issues - plenty of Linux tutorials... that don't seem to work under Windows.

Here is the solution that I found: [https://github.com/mpolinowski/nodered-sqlite](https://github.com/mpolinowski/nodered-sqlite)

Mostly a best-of from the tutorials - but verified to work under Windows 10.

TL;DR

1.) Install SQLite  
2.) Use the CLI tool to create a database, e.g. inside the **.node-red** installation folder (be aware that the file is not created right away - you can call `.databases` from the SQLite3 tool to have it show up)  
3.) Install the **sqlite node** in node-red, drag the node into your flow and type in the _absolute path_ to the `.db` file created in the step above.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [25 August 2018 13:16 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/14 "2018-08-25T13:16:51Z")

</div>

The clue is in the background default text. Put in an absolute path. If you don't put in any path, it will create it in your userDir folder (default `~/.node-red`).

If you don't start the name with an absolute path, the path will be relative to the userDir folder.

You should perhaps raise an issue (or do a pull request) on the node-red-nodes github in order to improve the documentation.

---

<div class="post-metadata">

### Author: ![anuparp](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@anuparp](https://discourse.nodered.org/u/anuparp)
#### Post date: [16 September 2020 07:04 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/16 "2020-09-16T07:04:03Z")

</div>

In my case, I installed sqlite in C:\sqlite3 of windows 10 and created a db folder. This resulted in C:\sqlite3\db. Then in Node-Red, I selected a sqlite node and filled C:\sqlite3\db\db\_002 in a blank of Database where db\_002 is a db filename. A good youtube for making sqlite - Node-Red is [https://www.youtube.com/watch?v=4YfnjOcnq5s](https://www.youtube.com/watch?v=4YfnjOcnq5s).

 ![sqlite-nodered](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52fb26aee686b88df4f4b0ceabb89e353f583eb7.png)

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [16 September 2020 08:16 UTC](https://discourse.nodered.org/t/node-red-sqlite-stores-data-base-on-windows/1438/17 "2020-09-16T08:16:22Z")

</div>


