# discourse的域名配置和发送邮件设置-app.yml

**URL:** <https://www.shiwantech.xyz/t/topic/31>\
**Category:** Discourse\
**Created:** [2023 年10 月 20 日 01:13 UTC](https://www.shiwantech.xyz/t/topic/31 "2023-10-20T01:13:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![baiyunshenchu2060](https://www.shiwantech.xyz/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@baiyunshenchu2060](https://www.shiwantech.xyz/u/baiyunshenchu2060)\
发布日期： [2023 年10 月 20 日 01:13 UTC](https://www.shiwantech.xyz/t/topic/31/1 "2023-10-20T01:13:04Z")

</div>

discourse的域名配置和发送邮件设置-app.yml

修改 app.yml 文件  
（位置在/var/discourse/containers中）

设置 DISCOURSE\_HOSTNAME 参数为自有域名，如：[talk.example.com](http://talk.example.com)  
DISCOURSE\_DEVELOPER\_EMAILS: ‘admin@example.com’  
DISCOURSE\_SMTP\_ADDRESS: [smtp.example.com](http://smtp.example.com)  
DISCOURSE\_SMTP\_PORT: 25  
DISCOURSE\_SMTP\_USER\_NAME: [admin@example.com](mailto:admin@example.com)  
DISCOURSE\_SMTP\_PASSWORD: “12345678”  
DISCOURSE\_SMTP\_ENABLE\_START\_TLS: false # (optional, default true)

修改以上设置后，需要先运行  
/var/discourse/launcher destroy app  
再运行  
/var/discourse/launcher start app
