# Let’s Encrypt Handshake Fails

**URL:** <https://drone.discourse.group/t/let-s-encrypt-handshake-fails/11078>\
**Category:** Drone Support\
**Created:** [October 4, 2018, 5:30am UTC](https://drone.discourse.group/t/let-s-encrypt-handshake-fails/11078 "2018-10-04T05:30:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincitygialam](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/vincitygialam/32/5183_2.png) [@vincitygialam](https://drone.discourse.group/u/vincitygialam)\
**Post date:** [October 4, 2018, 5:30am UTC](https://drone.discourse.group/t/let-s-encrypt-handshake-fails/11078/1 "2018-10-04T05:30:12Z")

</div>

Hi folks,

Managed to get Drone going great without https, but in trying to get https working, I’m hitting a road block. I’m trying the Let’s Encrypt route. I think my configs are right based on the docs, but when I cURL I get this:

```auto
    curl -iv 'https://drone.thosegeeks.com'
* Rebuilt URL to: https://drone.thosegeeks.com/
* Trying 142.93.56.170...
* Connected to drone.thosegeeks.com (142.93.56.170) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* gnutls_handshake() failed: Internal error
* Closing connection 0
curl: (35) gnutls_handshake() failed: Internal error

```

And in the browser, I get SSL\_ERROR\_INTERNAL\_ERROR\_ALERT

So here’s my docker-compose.yml

```auto
version: '2'

services:
  drone-server:
    image: drone/drone:0.8

    ports:
      - 80:8000
      - 443:443
      - 9000
    volumes:
      - /var/lib/drone:/var/lib/drone/
    restart: always
    environment:
      - DRONE_HOST=https://drone.thosegeeks.com
      - DRONE_LETS_ENCRYPT=true
      - DRONE_GITHUB=true
      - DRONE_GITHUB_CLIENT=(redacted)
      - DRONE_GITHUB_SECRET=(redacted)
      - DRONE_SECRET=(redacted)
      - DRONE_ADMIN=jeremybise

  drone-agent:
    image: drone/agent:0.8

    command: agent
    restart: always
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=(redacted)

```

UFW shows 443 and 80 open.

I have https:// in the URL in the Github OAuth app.

I’m not behind a Apache or NGINX.

What in the world is this handshake error and does it haunt me?

Many thanks in advance for your time!

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [October 4, 2018, 5:39am UTC](https://drone.discourse.group/t/let-s-encrypt-handshake-fails/11078/2 "2018-10-04T05:39:57Z")

</div>

when you enable lets encrypt Drone automatically listens on port 80 and 443, which means you need to adjust your port mappings accordingly (see below). My guess is that incorrect port mappings are preventing Lets Encrypt from sending http challenge requests.

```diff
    ports:
- - 80:8000
+ - 80:80
      - 443:443
      - 9000

```

[http://docs.drone.io/configure-lets-encrypt/](http://docs.drone.io/configure-lets-encrypt/)
