设置 SSL#
¥Set up SSL
n8n 支持 TLS/SSL 有两种方法。
¥There are two methods to support TLS/SSL in n8n.
使用反向代理(推荐)#
¥Use a reverse proxy (recommended)
在 n8n 实例前面使用反向代理(例如 Traefik)或网络负载均衡器 (NLB)。此设置还应处理证书续订。
¥Use a reverse proxy like Traefik or a Network Load Balancer (NLB) in front of the n8n instance. This should also take care of certificate renewals.
有关更多信息,请参阅 安全 |数据加密。
¥Refer to Security | Data encryption for more information.
直接将证书传递给 n8n#
¥Pass certificates into n8n directly
你还可以选择直接将证书传递给 n8n。为此,请将 N8N_SSL_CERT 和 N8N_SSL_KEY 环境变量设置为指向你生成的证书和密钥文件。
¥You can also choose to pass certificates into n8n directly. To do so, set the N8N_SSL_CERT and N8N_SSL_KEY environment variables to point to your generated certificate and key file.
你需要确保证书保持续订且为最新状态。
¥You'll need to make sure the certificate stays renewed and up to date.
有关这些变量的更多信息,请参阅 部署环境变量;有关设置环境变量的更多信息,请参阅 配置。
¥Refer to Deployment environment variables for more information on these variables and Configuration for more information on setting environment variables.