# Whether the ".config.json" file has been deprecated?

**URL:** https://discourse.nodered.org/t/whether-the-config-json-file-has-been-deprecated/69712
**Category:** Core Development
**Created:** [28 October 2022 08:16 UTC](https://discourse.nodered.org/t/whether-the-config-json-file-has-been-deprecated/69712 "2022-10-28T08:16:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dovahkiin8625](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dovahkiin8625/32/69808_2.png) [@Dovahkiin8625](https://discourse.nodered.org/u/Dovahkiin8625)
#### Post date: [28 October 2022 08:16 UTC](https://discourse.nodered.org/t/whether-the-config-json-file-has-been-deprecated/69712/1 "2022-10-28T08:16:42Z")

</div>

I saw the following code in `\node-red\packages\node_modules\@node-red\runtime\lib\storage\localfilesystem\settings.js`, Code comments shows the .config.json file has been removed in 1.3+ . `#31`

```javascript
    const nodesFilename = getSettingsFilename("nodes");
    if (fs.existsSync(nodesFilename)) {
        // We have both .config.json and .config.nodes.json
        // Use the more recently modified. This handles users going back to pre1.2
        // and up again.
        // We can remove this logic in 1.3+ and remove the old .config.json file entirely
        //
        const fsStatNodes = await fs.stat(nodesFilename);
        const fsStatGlobal = await fs.stat(globalSettingsFile);
        if (fsStatNodes.mtimeMs > fsStatGlobal.mtimeMs) {
            // .config.nodes.json is newer than .config.json - no migration needed
            return;
        }
    }

```

And I did not find this file in `User dir` and `$HOMEPATH/.Node-Red`. But I noticed that `red.js` uses this file when loading configuration files. `#107` `#110`

```javascript
...
else {
    if (fs.existsSync(path.join(process.env.NODE_RED_HOME,".config.json"))) {
        // NODE_RED_HOME contains user data - use its settings.js
        settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
    } else if (process.env.HOMEPATH && fs.existsSync(path.join(process.env.HOMEPATH,".node-red",".config.json"))) {
        // Consider compatibility for older versions
        settingsFile = path.join(process.env.HOMEPATH,".node-red","settings.js");
    } else {...

```

SO... Whether the ".config.json" file has been deprecated?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [28 October 2022 08:23 UTC](https://discourse.nodered.org/t/whether-the-config-json-file-has-been-deprecated/69712/2 "2022-10-28T08:23:35Z")

</div>

Node-RED 1.2 (October 2020) changed how we store the runtime settings. The `.config.json` was split into multiple files to better separate the different things that get stored in there.

> **[Version 1.2 released](https://nodered.org/blog/2020/10/15/version-1-2-released#splitting-configjson-into-multiple-files)**
>
> Find out more on the blog

---

<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: [11 November 2022 08:23 UTC](https://discourse.nodered.org/t/whether-the-config-json-file-has-been-deprecated/69712/3 "2022-11-11T08:23:45Z")

</div>

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