# \#sqlite

**URL:** https://discourse.nodered.org/tag/sqlite/86.md

[Latest](https://discourse.nodered.org/latest.md) · [Categories](https://discourse.nodered.org/categories.md) · [Tags](https://discourse.nodered.org/tags.md)

---

## [Setting SQLite as persistant context storage](https://discourse.nodered.org/t/setting-sqlite-as-persistant-context-storage/99705)

<div class="topic-metadata">

**Author:** [@shubhamnodered](https://discourse.nodered.org/u/shubhamnodered)\
**Replies:** 16\
**Last updated:** [21 November 2025 16:07 UTC](https://discourse.nodered.org/t/setting-sqlite-as-persistant-context-storage/99705 "2025-11-21T16:07:17Z")

</div>

Hi friends, Just wanted to know if it is possible to setup SQLite as context-storage instead of built-in context storage (memory or localfilesystem). ? As its already recommended, setting localfilesystem flush interval …

---

## [Inserting more than one record with the SQLITE nodes (standard/better)](https://discourse.nodered.org/t/inserting-more-than-one-record-with-the-sqlite-nodes-standard-better/99013)

<div class="topic-metadata">

**Author:** [@GAZ082](https://discourse.nodered.org/u/GAZ082)\
**Replies:** 1\
**Last updated:** [12 September 2025 08:55 UTC](https://discourse.nodered.org/t/inserting-more-than-one-record-with-the-sqlite-nodes-standard-better/99013 "2025-09-12T08:55:03Z")

</div>

Hey there. I’m using sqlite for storing my sensor’s readings. Had to create a string this way otherwise i was not able to load multiple records in one go. Heck, i was not able to use the placeholders either. Is there a m…

---

## [Reading data from an sqlite server base on time and date](https://discourse.nodered.org/t/reading-data-from-an-sqlite-server-base-on-time-and-date/97905)

<div class="topic-metadata">

**Author:** [@Desmond-Zeh](https://discourse.nodered.org/u/Desmond-Zeh)\
**Replies:** 5\
**Last updated:** [2 July 2025 14:02 UTC](https://discourse.nodered.org/t/reading-data-from-an-sqlite-server-base-on-time-and-date/97905 "2025-07-02T14:02:32Z")

</div>

Hello! I am trying to read data from the sqlite server into node-red Dashboard base on time and date. My query aim is to read data of the current day and the previous day with a time difference of 10 minutes between dat…

---

## [Error: SQLITE\_READONLY: attempt to write a readonly database](https://discourse.nodered.org/t/error-sqlite-readonly-attempt-to-write-a-readonly-database/97707)

<div class="topic-metadata">

**Author:** [@CoderN](https://discourse.nodered.org/u/CoderN)\
**Replies:** 12\
**Last updated:** [20 June 2025 23:42 UTC](https://discourse.nodered.org/t/error-sqlite-readonly-attempt-to-write-a-readonly-database/97707 "2025-06-20T23:42:53Z")

</div>

I have a simple flow like this where the properties of HAS2 SQLite is: SQLStatement: SELECT metadata\_id FROM states\_meta WHERE entity\_id = 'sensor.octopus\_energy\_electricity\_\[meter#\]\_\[mpan#\]\_current\_acc…

---

## [SQLite Plugin Path Issue](https://discourse.nodered.org/t/sqlite-plugin-path-issue/95683)

<div class="topic-metadata">

**Author:** [@OkimSelim](https://discourse.nodered.org/u/OkimSelim)\
**Replies:** 3\
**Last updated:** [26 February 2025 20:32 UTC](https://discourse.nodered.org/t/sqlite-plugin-path-issue/95683 "2025-02-26T20:32:18Z")

</div>

I'm using sqlite to write to a db on local storage. In trying to make the entire system as automated as possible so I have earlier nodes that check to make sure the destination directory exists and if not creates it. Pr…

---

## [Inconsistent SQLite node query behaviour](https://discourse.nodered.org/t/inconsistent-sqlite-node-query-behaviour/93445)

<div class="topic-metadata">

**Author:** [@JesFo](https://discourse.nodered.org/u/JesFo)\
**Replies:** 10\
**Last updated:** [26 November 2024 06:30 UTC](https://discourse.nodered.org/t/inconsistent-sqlite-node-query-behaviour/93445 "2024-11-26T06:30:43Z")

</div>

I'm using the node-red-node-sqlite v1.1.0 node. And I'm reading my database like so: \[ { "id": "38680aaa86807ba1", "type": "http in", "z": "c35667a7f7c45a02", "name": "Submit", …

---

## [Does Node Red requires TLS1.2 as a pre-requisites to connect to SQL DB?](https://discourse.nodered.org/t/does-node-red-requires-tls1-2-as-a-pre-requisites-to-connect-to-sql-db/90304)

<div class="topic-metadata">

**Author:** [@AlokPatil](https://discourse.nodered.org/u/AlokPatil)\
**Replies:** 2\
**Last updated:** [26 August 2024 16:07 UTC](https://discourse.nodered.org/t/does-node-red-requires-tls1-2-as-a-pre-requisites-to-connect-to-sql-db/90304 "2024-08-26T16:07:24Z")

</div>

Hello NodeRed Users/Developers, We have SCADA application which generates high frequency alarms/events and stores in local SQL database. 1. We would like to know whether Node-RED module requires TLS 1.2 as a pre-requisi…

---

## [Mustache template can only display info from one object in payload](https://discourse.nodered.org/t/mustache-template-can-only-display-info-from-one-object-in-payload/89094)

<div class="topic-metadata">

**Author:** [@AndyO](https://discourse.nodered.org/u/AndyO)\
**Replies:** 3\
**Last updated:** [29 June 2024 18:54 UTC](https://discourse.nodered.org/t/mustache-template-can-only-display-info-from-one-object-in-payload/89094 "2024-06-29T18:54:00Z")

</div>

Hi! I tried to make simple RSS Reader but i encounter the problem where from combined payload i can't use info for dropdown menu filters based on info from sqlite3 database. If i use feeds then no search fields but when…

---

## [Getting Flow variables into SQLite INSERT](https://discourse.nodered.org/t/getting-flow-variables-into-sqlite-insert/88330)

<div class="topic-metadata">

**Author:** [@jblack](https://discourse.nodered.org/u/jblack)\
**Replies:** 13\
**Last updated:** [29 May 2024 13:10 UTC](https://discourse.nodered.org/t/getting-flow-variables-into-sqlite-insert/88330 "2024-05-29T13:10:13Z")

</div>

I could use a bit of assistance... I am attempting to get a flow variable into a SQLite database. Here is my current INSERT command: INSERT INTO ACC1 (Data, Date, Time) VALUES ("123", strftime('%m-%d-%Y', 'now', 'local…

---

## [Node-red-node-sqlite - "msg.topic" size restriction?](https://discourse.nodered.org/t/node-red-node-sqlite-msg-topic-size-restriction/87361)

<div class="topic-metadata">

**Author:** [@MikeG996](https://discourse.nodered.org/u/MikeG996)\
**Replies:** 2\
**Last updated:** [21 April 2024 07:27 UTC](https://discourse.nodered.org/t/node-red-node-sqlite-msg-topic-size-restriction/87361 "2024-04-21T07:27:43Z")

</div>

I have a successful node which inserts data into a SQLite DB using the "msg.topic = "INSERT INTO \[blah\].." method. When I tried to replicate this in a node which generates a larger array of columns/values, it failed. I …

---

## [Wrong result from sqlite](https://discourse.nodered.org/t/wrong-result-from-sqlite/85798)

<div class="topic-metadata">

**Author:** [@Chucky2401](https://discourse.nodered.org/u/Chucky2401)\
**Replies:** 7\
**Last updated:** [23 March 2024 08:49 UTC](https://discourse.nodered.org/t/wrong-result-from-sqlite/85798 "2024-03-23T08:49:05Z")

</div>

Hello, I have an annoying issue with sqlite. I have a flow to check if my nVidia Shield is blocked to go on Youtube, I use PiHole to avoid my children to watch YouTube every day. First I count how many records I have …

---

## [Persistant data SQLite when running docker image](https://discourse.nodered.org/t/persistant-data-sqlite-when-running-docker-image/85971)

<div class="topic-metadata">

**Author:** [@hadwll](https://discourse.nodered.org/u/hadwll)\
**Replies:** 6\
**Last updated:** [28 February 2024 21:14 UTC](https://discourse.nodered.org/t/persistant-data-sqlite-when-running-docker-image/85971 "2024-02-28T21:14:28Z")

</div>

I am running a docker image with the following familiar command; docker run -it -p 1880:1880 -v node\_red\_data:/data --name mynodered nodered/node-red Each time I run the container the flows etc are all returned I …

---

## [Node-RED freezes while sqlite query](https://discourse.nodered.org/t/node-red-freezes-while-sqlite-query/84675)

<div class="topic-metadata">

**Author:** [@mima232](https://discourse.nodered.org/u/mima232)\
**Replies:** 23\
**Last updated:** [17 February 2024 14:51 UTC](https://discourse.nodered.org/t/node-red-freezes-while-sqlite-query/84675 "2024-02-17T14:51:10Z")

</div>

Hello, Im using the latest node-red-node-sqlite for querying my database. Unfortunately just realised, that the query totally blocks whole Node-RED ... which in some cases can take tens of seconds, even minutes. As the …

---

## [Node-red & SQLite on a Pi Zero Two, read-only filesystem & automated db backups to another Pi](https://discourse.nodered.org/t/node-red-sqlite-on-a-pi-zero-two-read-only-filesystem-automated-db-backups-to-another-pi/85474)

<div class="topic-metadata">

**Author:** [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Replies:** 2\
**Last updated:** [13 February 2024 16:15 UTC](https://discourse.nodered.org/t/node-red-sqlite-on-a-pi-zero-two-read-only-filesystem-automated-db-backups-to-another-pi/85474 "2024-02-13T16:15:07Z")

</div>

I have used this flow to explore several ideas: SQLite and Node-red on a read-only filesystem. SSH connection using public/private keys. SSHFS to mount a directory on a remote device. A delay node as a simple SQL queue…

---

## [Node-red-node-sqlite - .backup command (or otherwise backup an Sqlite Database)](https://discourse.nodered.org/t/node-red-node-sqlite-backup-command-or-otherwise-backup-an-sqlite-database/85447)

<div class="topic-metadata">

**Author:** [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Replies:** 14\
**Last updated:** [12 February 2024 23:51 UTC](https://discourse.nodered.org/t/node-red-node-sqlite-backup-command-or-otherwise-backup-an-sqlite-database/85447 "2024-02-12T23:51:17Z")

</div>

I can backup an SQLite database using an exec node and the SQLite .backup command: But trying to do this using the sqlite node gives an error: I would prefer to use the sqlite node because I have a queue in Node-…

---

## [Raspberry Pi "failed to open" error for "sqlite"](https://discourse.nodered.org/t/raspberry-pi-failed-to-open-error-for-sqlite/84532)

<div class="topic-metadata">

**Author:** [@Rabbit](https://discourse.nodered.org/u/Rabbit)\
**Replies:** 3\
**Last updated:** [15 January 2024 00:29 UTC](https://discourse.nodered.org/t/raspberry-pi-failed-to-open-error-for-sqlite/84532 "2024-01-15T00:29:32Z")

</div>

I get error "failed to open /tmp/splite/testdb.db" when I deploy my "sqlite" project at Node-Red. The "sqlite" node properties "Database" setting is "/tmp/splite/testdb.db". The database file is "pi@raspberrypi:/tmp/s…

---

## [Assistance Needed with Integrating Rasa Chatbot, Node-RED, and SQLite](https://discourse.nodered.org/t/assistance-needed-with-integrating-rasa-chatbot-node-red-and-sqlite/83738)

<div class="topic-metadata">

**Author:** [@Heezed](https://discourse.nodered.org/u/Heezed)\
**Replies:** 2\
**Last updated:** [20 December 2023 08:17 UTC](https://discourse.nodered.org/t/assistance-needed-with-integrating-rasa-chatbot-node-red-and-sqlite/83738 "2023-12-20T08:17:15Z")

</div>

Hello Node-RED Community, I am currently working on a project that involves integrating a Rasa Chatbot with Node-RED for executing SQLite database queries. As I'm quite new to this, I've encountered some challenges and …

---

## [Accessing sqlite inside a function](https://discourse.nodered.org/t/accessing-sqlite-inside-a-function/82038)

<div class="topic-metadata">

**Author:** [@thahamp](https://discourse.nodered.org/u/thahamp)\
**Replies:** 8\
**Last updated:** [16 October 2023 08:59 UTC](https://discourse.nodered.org/t/accessing-sqlite-inside-a-function/82038 "2023-10-16T08:59:43Z")

</div>

Hi the below code is a part of my function code and I am trying to connect sqlite inside this function code. But I could not execute it. Could you help me is this right way to implement sqlite inside a function node: co…

---

## [Inexplicable Variable Becomes Undefined Inside Function](https://discourse.nodered.org/t/inexplicable-variable-becomes-undefined-inside-function/81179)

<div class="topic-metadata">

**Author:** [@adalbiot](https://discourse.nodered.org/u/adalbiot)\
**Replies:** 4\
**Last updated:** [10 September 2023 22:41 UTC](https://discourse.nodered.org/t/inexplicable-variable-becomes-undefined-inside-function/81179 "2023-09-10T22:41:14Z")

</div>

I'm facing an issue in my Node-RED flow. I have a string injection node that sends a message with a value 'a30b74fa' to a function. However, when it reaches the function, the 'tagToCheck' variable, which should contain '…

---

## [If I close nodered webpage, it stopped saving data](https://discourse.nodered.org/t/if-i-close-nodered-webpage-it-stopped-saving-data/78804)

<div class="topic-metadata">

**Author:** [@Vibemac](https://discourse.nodered.org/u/Vibemac)\
**Replies:** 1\
**Last updated:** [30 May 2023 11:18 UTC](https://discourse.nodered.org/t/if-i-close-nodered-webpage-it-stopped-saving-data/78804 "2023-05-30T11:18:08Z")

</div>

Goodmorning, I've started using nodered for some months and I have a problem with saving data. I'm using nodered version 1.3.5 with nodered installed on a Beaglebone black. In my project I use a serial node for asking …

---

## [Struggling with sqlite3](https://discourse.nodered.org/t/struggling-with-sqlite3/78411)

<div class="topic-metadata">

**Author:** [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Replies:** 4\
**Last updated:** [18 May 2023 08:37 UTC](https://discourse.nodered.org/t/struggling-with-sqlite3/78411 "2023-05-18T08:37:48Z")

</div>

I need to drop a table and recreate it, after which I need to insert 30k records. Sometimes dropping works - but then does not recreate the table. Nothing in database. Database complains - 'database is locked'. When I…
