Skip to content

设置自定义加密关键设置#

¥Set a custom encryption key

n8n 在首次启动时自动创建一个随机加密密钥,并将其保存在 ~/.n8n 文件夹中。n8n 使用该密钥在凭据保存到数据库之前对其进行加密。如果设置文件中尚未包含该键,你可以使用环境变量进行设置,以便 n8n 使用你的自定义键,而不是生成新键。

¥n8n creates a random encryption key automatically on the first launch and saves it in the ~/.n8n folder. n8n uses that key to encrypt the credentials before they get saved to the database. If the key isn't yet in the settings file, you can set it using an environment variable, so that n8n uses your custom key instead of generating a new one.

队列模式 中,你必须为所有工作节点指定加密密钥环境变量。

¥In queue mode, you must specify the encryption key environment variable for all workers.

1
export N8N_ENCRYPTION_KEY=<SOME RANDOM STRING>

有关此变量的更多信息,请参阅 环境变量参考

¥Refer to Environment variables reference for more information on this variable.