用户管理最佳实践#
¥Best practices for user management
此页面包含有关 n8n 用户管理最佳实践的建议。
¥This page contains advice on best practices relating to user management in n8n.
所有平台#
¥All platforms
- n8n 建议所有者为自己创建一个成员级账户。所有者可以查看所有工作流,但无法查看特定工作流的创建者,因此如果你以所有者身份创建和编辑工作流,则存在覆盖他人工作成果的风险。
¥n8n recommends that owners create a member-level account for themselves. Owners can see all workflows, but there is no way to see who created a particular workflow, so there is a risk of overriding other people's work if you build and edit workflows as an owner.
- 用户必须注意不要同时编辑同一个工作流。可以这样做,但用户之间的更改会相互覆盖。
¥Users must be careful not to edit the same workflow simultaneously. It's possible to do it, but the users will overwrite each other's changes.
- 要在账户之间移动工作流,请将工作流导出为 JSON 格式,然后将其导入到新账户。请注意,此操作会丢失工作流历史记录。
¥To move workflows between accounts, export the workflow as JSON, then import it to the new account. Note that this action loses the workflow history.
- Webhook 路径在整个实例中必须唯一。这意味着每个 Webhook 路径对于所有工作流和所有用户都必须是唯一的。默认情况下,n8n 会为 webhook 路径生成一个很长的随机值,但用户可以将其编辑为自定义路径。如果两个用户设置了相同的路径值:
¥Webhook paths must be unique across the entire instance. This means each webhook path must be unique for all workflows and all users. By default, n8n generates a long random value for the webhook path, but users can edit this to their own custom path. If two users set the same path value:
-
适用于首次运行或激活的工作流的路径。
¥The path works for the first workflow that's run or activated.
-
如果其他工作流尝试使用相同的路径运行,则会出错。
¥Other workflows will error if they try to run with the same path.
自托管#
¥Self-hosted
如果你在反向代理后运行 n8n,请设置以下环境变量,以便 n8n 生成包含正确 URL 的电子邮件:
¥If you run n8n behind a reverse proxy, set the following environment variables so that n8n generates emails with the correct URL:
-
N8N_HOST -
N8N_PORT -
N8N_PROTOCOL -
N8N_EDITOR_BASE_URL
有关这些变量的更多信息,请参阅 环境变量。
¥More information on these variables is available in Environment variables.