# Getting TLS certificates with Letsencrypt and HAProxy

**URL:** <https://discourse.haproxy.org/t/getting-tls-certificates-with-letsencrypt-and-haproxy/1835>\
**Category:** Configuration Samples\
**Created:** [November 27, 2017, 12:29am UTC](https://discourse.haproxy.org/t/getting-tls-certificates-with-letsencrypt-and-haproxy/1835 "2017-11-27T00:29:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirowrc](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/cirowrc/32/270_2.png) [@cirowrc](https://discourse.haproxy.org/u/cirowrc)\
**Post date:** [November 27, 2017, 12:29am UTC](https://discourse.haproxy.org/t/getting-tls-certificates-with-letsencrypt-and-haproxy/1835/1 "2017-11-27T00:29:11Z")

</div>

Hey,

last week I wanted to test the new HTTP2 functionality in 1.8-rc3 and then end up writing the steps I took to have TLS with HAProxy starting from a bare Ubuntu 17.04 instance.

I’ve been just consuming from the haproxy community and never giving back so here’s something that I hope might help someone:

> **[Getting TLS certificates with Letsencrypt and HAProxy](https://ops.tips/blog/tls-certificates-haproxy-letsencrypt/)**
>
> A guide on building and configuring HAProxy from scratch to achieve HTTPS with Letsencrypt certificates

Please let me know if you find anything wrong or want some help with anything related.

Best,

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [December 4, 2017, 6:27pm UTC](https://discourse.haproxy.org/t/getting-tls-certificates-with-letsencrypt-and-haproxy/1835/2 "2017-12-04T18:27:03Z")

</div>

Thank’s for this.

I would add here that using recent haproxy on debian or Ubuntu is simpler though, just use Vincent’s backports at:  
[https://haproxy.debian.net/](https://haproxy.debian.net/)

Both Debian stable and Ubuntu LTS have OpenSSL \>= 1.0.2 which allows ALPN (thus h2).

Also, why compile LUA from source?

---

<div class="post-metadata">

**Author:** ![cirowrc](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/cirowrc/32/270_2.png) [@cirowrc](https://discourse.haproxy.org/u/cirowrc)\
**Post date:** [December 5, 2017, 2:38pm UTC](https://discourse.haproxy.org/t/getting-tls-certificates-with-letsencrypt-and-haproxy/1835/3 "2017-12-05T14:38:15Z")

</div>

Hi Lukas!

Thanks for the reference regarding the Debian source 👍

TBH the reason for building Lua from source was simply curiosity.

Thanks!
