Skip to content

A tiny (zero dependency) Node.js CLI utility to convert Traefik Let's Encrypt certificates from acme.json to PEM files

Notifications You must be signed in to change notification settings

jojobyte/traefikjam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm Node Build Docker Image Version Docker Build

Traefik Jam

A small (zero dependency) Node.js CLI utility to convert Traefik Let's Encrypt certificates from acme.json to PEM files

Node.js Install

npm install -g traefikjam

yarn global add traefikjam

pnpm add -g traefikjam

Install from NPM

Install from GitHub Packages

Deno Usage

deno run --compat --unstable --allow-env \
  --allow-read --allow-write=./certs \
  bin/traefik-jam.js ./data/acme.json example.net

CLI Usage

# show help
traefikjam -h

# extract all domains from ./data/acme.json
traefikjam ./data/acme.json

# extract example.net & github.com from ./data/acme.json
traefikjam ./data/acme.json example.net github.com

# watch ./data/acme.json and export selected domains on change
traefikjam --watch ./data/acme.json example.net github.com

API Usage

import { exportCerts } from 'traefikjam'

exportCerts('./path/to/acme.json', 'example.domain.com')

Docker

# show help
docker run --rm -it \
  -v $PWD/data:/opt/app/data \
  -v $PWD/certs:/opt/app/certs \
  jojobyte/traefikjam:latest -- -h

# extract example.net from /acme.json
docker run --rm -it \
  -v $PWD/data:/opt/app/data \
  -v $PWD/certs:/opt/app/certs \
  jojobyte/traefikjam:latest -- ./data/acme.json example.net

Install from Docker Hub

Install from GitHub Container Registry