We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 45a42c4 + 383f612 commit 2ebd311Copy full SHA for 2ebd311
packages/server/src/utils/index.ts
@@ -875,7 +875,9 @@ export const getEncryptionKey = async (): Promise<string> => {
875
return await fs.promises.readFile(getEncryptionKeyPath(), 'utf8')
876
} catch (error) {
877
const encryptKey = generateEncryptKey()
878
- const defaultLocation = path.join(getUserHome(), '.flowise', 'encryption.key')
+ const defaultLocation = process.env.SECRETKEY_PATH
879
+ ? path.join(process.env.SECRETKEY_PATH, 'encryption.key')
880
+ : path.join(getUserHome(), '.flowise', 'encryption.key')
881
await fs.promises.writeFile(defaultLocation, encryptKey)
882
return encryptKey
883
}
0 commit comments