Using lets encrypt

If I follow this guide http://docs.drone.io/configure-lets-encrypt/ I am unable to connect to my drone insatnce anymore. Everything worked well before.

The port mapping now says 80:80 but before it was 80:8000.

What is the correct configuration?

Thanks for the help

The port mapping now says 80:80 but before it was 80:8000. What is the correct configuration?

When lets encrypt is enabled, the server listens on port 443 and port 80.

services:
  drone-server:
    image: drone/drone:0.7
    ports:
+     - 80:80
+     - 443:443
      - 9000:9000

I find that it’s much more convenient to use traefik for tls termination for
all containers running on a host. The docker-label config method for traefik
fits in well with docker-compose.


version: "2"

networks:
  traefik:
    external:
      name: traefik
      
  drone-server:
    image: drone/drone:0.8.1
    labels:
      traefik.backend: drone
      traefik.port: "8000"
      traefik.frontend.rule: Host:drone.example.com
      traefik.docker.network: traefik
      traefik.enable: "true"
    networks:
      - traefik
      - default
  ...

But if you only run drone on the host machine I guess it’s not real win to do
so.

Hmm that is strange…

I am unable to connect to the frontend after i configure it with lets encrypt.

Changed

  • the github oauth app from http to https
  • changed DRONE_HOST to https
  • opened port 443 to my host

Anything else that has to be done?

I havent used the native letsencrypt option in drone but a few things might probably be good to know.

Does drone-server log errors?

Is there no response at all or is the connection closed after being accepted?

What does curl -iv 'https://drone.example.com say (using your domain name) ?

drone uses the official autocert package which, from what I can tell, does not implement any logging or expose any hooks for logging. https://godoc.org/golang.org/x/crypto/acme/autocert

fwiw I use lets encrypt for beta.drone.io using the exact configuration specified in the documentation.