# 如何在Discourse Docker上启用ipv6？

**URL:** https://meta.discourse.org/t/how-to-enable-ipv6-on-discourse-docker/217564
**Category:** Support
**Created:** [2022年二月8日 20:04 UTC](https://meta.discourse.org/t/how-to-enable-ipv6-on-discourse-docker/217564 "2022-02-08T20:04:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![boucheron](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@boucheron](https://meta.discourse.org/u/boucheron)
#### Post date: [2022年二月8日 20:04 UTC](https://meta.discourse.org/t/how-to-enable-ipv6-on-discourse-docker/217564/1 "2022-02-08T20:04:05Z")

</div>

你好！

我正在安装与主机名 IPv4 关联的 Discourse Docker。当我将域的 IPv4 更改为 IPv6 时，论坛停止响应。重启服务器或 Docker 均无效。

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [2022年二月8日 20:11 UTC](https://meta.discourse.org/t/how-to-enable-ipv6-on-discourse-docker/217564/2 "2022-02-08T20:11:19Z")

</div>

我建议同时设置 IPv4 和 IPv6，然后等待 DNS 更新。  
更新后，您可以删除 IPv4。

---

<div class="post-metadata">

### Author: ![newdayhost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/newdayhost/32/255468_2.png) [@newdayhost](https://meta.discourse.org/u/newdayhost)
#### Post date: [2022年四月3日 03:24 UTC](https://meta.discourse.org/t/how-to-enable-ipv6-on-discourse-docker/217564/3 "2022-04-03T03:24:00Z")

</div>

如果您在网站前面使用了 Cloudflare，请尝试 _ **Full** _ SSL/TLS 加密模式，而不是 **Full Strict** 。

TLS (https) 通过 IPv6 似乎无法在默认的 Discourse Docker 安装中生成有效的 crt：

> curl -v -H ‘Host: [discourse.yoursite.com](http://discourse.yoursite.com)’ https://[your:ip:v6::address]

```plaintext
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to your:ip:v6::address:443 
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to your:ip:v6::address:443

```

但是，忽略证书（向 cURL 传递 -k）似乎是有效的。
