# How to set dynamic filepath of database in sqlite node?

**URL:** https://discourse.nodered.org/t/how-to-set-dynamic-filepath-of-database-in-sqlite-node/70593
**Category:** General
**Created:** [14 November 2022 15:47 UTC](https://discourse.nodered.org/t/how-to-set-dynamic-filepath-of-database-in-sqlite-node/70593 "2022-11-14T15:47:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Josh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/josh/32/62208_2.png) [@Josh](https://discourse.nodered.org/u/Josh)
#### Post date: [14 November 2022 15:47 UTC](https://discourse.nodered.org/t/how-to-set-dynamic-filepath-of-database-in-sqlite-node/70593/1 "2022-11-14T15:47:33Z")

</div>

Hi forum,  
I am looking for a way to set the file path of database in node-red-node-sqlite node something like via a msg parameter or set via a global context from settings.js.

Is this feature supported in sqlite node?  
Will this feature be added in the upcoming releases?  
Any such alternative excluding([this](https://flows.nodered.org/node/node-red-contrib-queued-sqlite-fix) and [this](https://flows.nodered.org/node/node-red-contrib-queued-sqlite)) nodes or a way to set it up dynamically using the original sqlite node?

---

<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: [14 November 2022 17:22 UTC](https://discourse.nodered.org/t/how-to-set-dynamic-filepath-of-database-in-sqlite-node/70593/2 "2022-11-14T17:22:16Z")

</div>

Must it be runtime changeable?

If not, then would an Env Variable suffice?

[https://nodered.org/docs/user-guide/environment-variables](https://nodered.org/docs/user-guide/environment-variables)

> Any node property can be set with an environment variable by setting its value to a string of the form `${ENV_VAR}` . When the runtime loads the flows, it will substitute the value of that environment variable before passing it to the 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: [28 November 2022 17:22 UTC](https://discourse.nodered.org/t/how-to-set-dynamic-filepath-of-database-in-sqlite-node/70593/3 "2022-11-28T17:22:19Z")

</div>

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