mirror of
https://github.com/SnowMB/traefik-certificate-extractor.git
synced 2025-10-27 16:05:37 +08:00
f7f7af27b86b9a460ea98c57ee1193dd7ecf2f65
This error as raised while running :
```Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 199, in run
self.dispatch_events(self.event_queue, self.timeout)
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
handler.dispatch(event)
File "/usr/local/lib/python3.6/site-packages/watchdog/events.py", line 330, in dispatch
_method_map[event_type](event)
File "extractor.py", line 13, in on_created
self.handle(event)
File "extractor.py", line 48, in handle
sans = c['Domains']['SANs']
KeyError: 'Domains'
```
Acme.json's file syntax seems to have changed regarding my own traffic acme.json
Traefik Certificate Extractor
Tool to extract Let's Encrypt certificates from Traefik's ACME storage file.
Installation
git clone https://github.com/DanielHuisman/traefik-certificate-extractor
cd traefik-certificate-extractor
Usage
python3 extractor.py [directory]
Default directory is ./data. The output directory is ./certs.
Docker
There is a Docker image available for this tool: danielhuisman/traefik-certificate-extractor. Example run:
docker run --name extractor -d -v /srv/extractor/data:/app/data -v /srv/extractor/certs:/app/certs danielhuisman/traefik-certificate-extractor
Output
certs/
example.com/
cert.pem
chain.pem
fullchain.pem
privkey.pem
sub.example.nl/
cert.pem
chain.pem
fullchain.pem
privkey.pem
certs_flat/
example.com.crt
example.com.key
example.com.chain.pem
sub.example.nl.crt
sub.example.nl.key
sub.example.nl.chain.pem
Description
Languages
Python
95.7%
Dockerfile
4.3%