How to expose a WordPress site running on port 8000 via Tunnels?

I’ve setup a WordPress site in Docker and it’s accessible at port 8000. It is not running HTTPS.

I have a domain setup in Cloudflare and I want to expose the WordPress site via a Cloudflare certificate on port 443.

However, when I configure the public hostname under Tunnels to point to my private IP, like:

{some internal ip via http}:8000

… I cannot load the site and eventually the browser times out trying to access:

{some external domain via http}:8000

So it seems that I need some way to tell Cloudflare to expose mydomain.com as:

{some external domain via https}::443

Does anyone know what steps I need to take to expose my WordPress site via Cloudflare provided TLS certificate, and properly map the ports to my internal network IP:port?

Sorry for the ugly URLs, the site would not allow me to provide example URLs even when using proper backticks.

Thank you.

You would use a public hostname to tell Cloudflare to route traffic for a hostname via a tunnel. This is done under the tunnel configuration page.

1 Like

Thanks. I realize that I would need a public host name. This is what I have already setup:

I need people to be able to access the site via HTTPS (port 443) externally, but have that map to HTTP port 8000 internally.

Can you share the configuration of your tunnel?

为了避免讲述不清楚,我选择使用中文来表述。
我在我的自托管设备上启用了多个服务,尝试使用隧道转发,有些是可用的,有些出现了和你一样的问题。在各种搜索引擎尝试搜索相关问题并没有得到切实的答案。
咱们的安装方式应该也是一样的,直接复制概述下的docker命令一键安装的。

您的意思是不是只使用仪表盘一键命令安装对吗

而是要使用这种方式配置

但是说明中并没有docker配置的方法,是需要更换其他安装方法吗