Let’s Encrypt Handshake Fails

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:

    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

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!

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.

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

http://docs.drone.io/configure-lets-encrypt/