Migrating letsencrypt cert from caddy to gitlab

1. Output of caddy version:

v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=

2. How I run Caddy:

a. System environment:

Docker

b. Command:

docker-compose up -d

c. Service/unit/compose file:

version: "3.7"
services:
  caddy:
    image: caddy:2.4.6-alpine
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "8082:8082"
    volumes:
      - /home/gitlab-runner/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /home/gitlab-runner/caddy/data:/data
      - /home/gitlab-runner/caddy/config:/config
    networks:
      - developer

networks:
  developer:

d. My complete Caddy config:

doc.adnet.hr {
        reverse_proxy dockerhoster.adnet.local:1458
}

gitak.adnet.hr {
reverse_proxy https://gitak.adnet.local {
    transport http {
        tls
        tls_insecure_skip_verify
    }
}
}

3. The problem I’m having:

I want to move my letsencrypt handling from caddy (who reverse proxy-s to gitlab) directly to gitlab. But if I do it right away, caddy will be holding the reservation for the domain. That’s why caddy has to revoke the gitlab certificate, and then gitlab can take it from there. What’s the best way to revoke the certificate? Do I have to use certbot, or does caddy automatically revoke the certificates it doesn’t use? How fast will it revoke?

4. Error messages and/or full log output:

Paste logs/commands/output here.
USE THE PREVIEW PANE TO MAKE SURE IT LOOKS NICELY FORMATTED.

5. What I already tried:

I tried to revoke the certificate by using certbot, but it got too complicated. There has to be an easier solution.

6. Links to relevant resources:

Please update to the latest stable version, Release v2.6.2 · caddyserver/caddy · GitHub


There is no such thing as certificate reservation.
You can issue multiple certificates for the same domain at the same time without any problems.
So there is no need to revoke a certificate :thinking:

Can try to rephrase what problem you are encountering?

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.