# Docker - SSL certificate to Pi-hole web interface

**URL:** <https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919>\
**Category:** docker\
**Created:** [February 29, 2020, 5:11pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919 "2020-02-29T17:11:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremy](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://discourse.pi-hole.net/u/jeremy)\
**Post date:** [February 29, 2020, 5:11pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/1 "2020-02-29T17:11:35Z")

</div>

Hello,

Is it possible to set SSL cert to Pi-hole web interface on docker image?  
There is a nice guide but on normal installation:

> [@Enabling HTTPS for your Pi-hole Web Interface](https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771):
>
> How can I enable HTTPS (SSL/TLS) for my Pi-hole Web Interface? Many users run their Pi-hole on Virtual Private Servers and such, meaning that they would need to access the Web Interface via insecure HTTP. Now, you are able to configure Pi-hole so you can securely access your Web Interface, and not cause issues with blocked HTTPS content. What has changed to allow this? With the release of v3.2, we have made changes to our default lighttpd config to not automatically enable the SSL engine if /et…

When I set volume mapping between docker container and host to "/etc/lighttpd/" for access to config files the Pi-hole not starting.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [February 29, 2020, 5:13pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/2 "2020-02-29T17:13:08Z")

</div>

Easier to just use a proxy image or an actual proxy to handle it. Bonus is that you can get letsencrypt working and not have to worry about the certs.

---

<div class="post-metadata">

**Author:** ![jeremy](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://discourse.pi-hole.net/u/jeremy)\
**Post date:** [February 29, 2020, 5:20pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/3 "2020-02-29T17:20:08Z")

</div>

Dan, what do you mean "proxy image"?  
You mean that I can not to configure "lighthttpd" and I should use some "proxy" software outside container?

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [February 29, 2020, 5:21pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/4 "2020-02-29T17:21:31Z")

</div>

To handle TLS termination? Yeah, that would be the best option.

---

<div class="post-metadata">

**Author:** ![jeremy](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://discourse.pi-hole.net/u/jeremy)\
**Post date:** [February 29, 2020, 5:34pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/5 "2020-02-29T17:34:38Z")

</div>

Yes, I want to add trusted certificate to https web interface of pihole on docker instalation.  
You mean that is a best option to use outside proxy server to do it on docker instalation instead of "doing something" with "lighthttpd" inside of container?

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [February 29, 2020, 5:36pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/6 "2020-02-29T17:36:14Z")

</div>

Yeah, that would be the best option.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [March 1, 2020, 1:36am UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/7 "2020-03-01T01:36:38Z")

</div>

If proxy with certbot, you somehow have to do the LetsEncript challenge, for renewing the cert, on the proxied host and not the proxy itself ... I experienced.  
Probably exists a solution to do that but is something to consider!

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [March 1, 2020, 2:20am UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/8 "2020-03-01T02:20:52Z")

</div>

[https://github.com/nginx-proxy/nginx-proxy](https://github.com/nginx-proxy/nginx-proxy)

[https://docs.traefik.io/](https://docs.traefik.io/)

> **[Caddy - The Ultimate Server with Automatic HTTPS](https://caddyserver.com/)**
>
> Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

Many options.

---

<div class="post-metadata">

**Author:** ![gunn0r](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/g/9fc29f/32.png) [@gunn0r](https://discourse.pi-hole.net/u/gunn0r)\
**Post date:** [November 16, 2022, 7:32pm UTC](https://discourse.pi-hole.net/t/docker-ssl-certificate-to-pi-hole-web-interface/28919/9 "2022-11-16T19:32:19Z")

</div>

I wanted to do the same thing and this discussion helped me to do that within 10 mins: [Pi-hole im docker mit https - Help / Deutschsprachige Hilfe - Pi-hole Userspace](https://discourse.pi-hole.net/t/pi-hole-im-docker-mit-https/46148)
