Skip to main content
Tungsten Dashboard

The letsencrypt2jetty.pl Script

letsencrypt2jetty.pl is a script that converts a Let's Encrypt-provided certificate into a Dashboard-ready JKS file.

To use this tool you will need to ensure you have the fullchain.pem and privkey.pem files from Let's Encrypt available.

Usage
./letsencrypt2jetty.pl [options]

Where:

OptionDescriptionVersion
--domain
Aliases: -d
Specify the FQDN used for the certificate; if provided will define the fullchain.pem fullpath as:/etc/letsencrypt/live/{domain}/fullchain.pem and will define the privkey.pem fullpath as:/etc/letsencrypt/live/{domain}/privkey.pem
--fullchain
Aliases: -f
Specify the Let's Encrypt fullchain.pem fullpath
--help
Aliases: -h
Use this option to display the help message
--key
Aliases: -k
Specify the Let's Encrypt privkey.pem fullpath
--password
Aliases: -p
Specify the keystore password

Below is an example of converting an existing cert issued by Let's Encrypt using our provided tool letsencrypt2dashboard.pl, which calls the openssl and Java keytool commands:

shell> sudo ./letsencrypt2jetty.pl -d dashdev.continuent.com

Keystore file's password: tungsten
Creating `./cert/`
>>> ACTION: Converting the Let's Encrypt source files to P12 format:
SOURCE:
/etc/letsencrypt/live/dashdev.continuent.com/fullchain.pem
/etc/letsencrypt/live/dashdev.continuent.com/privkey.pem
TARGET
cert/jetty.p12

SUCCESS: Generated the P12 file 'cert/jetty.p12'

>>> ACTION: Converting the P12 file to JKS format:
SOURCE
cert/jetty.p12
TARGET
cert/jetty.jks

Importing keystore cert/jetty.p12 to cert/jetty.jks...

SUCCESS: Generated the internal jetty cert file 'cert/jetty.jks'

shell> sudo chown -R dashboard: cert

Or:

shell> mkdir cert
shell> cp /etc/letsencrypt/live/dashdev.continuent.com/fullchain.pem cert/
shell> sudo cp /etc/letsencrypt/live/dashdev.continuent.com/privkey.pem cert/
shell> sudo chmod a+r cert/privkey.pem
shell> ./letsencrypt2jetty.pl -f cert/fullchain.pem -k cert/privkey.pem

Keystore file's password: tungsten
Creating `./cert/`
>>> ACTION: Converting the Let's Encrypt source files to P12 format:
SOURCE:
./fullchain.pem
./privkey.pem
TARGET
cert/jetty.p12

SUCCESS: Generated the P12 file 'cert/jetty.p12'

>>> ACTION: Converting the P12 file to JKS format:
SOURCE
cert/jetty.p12
TARGET
cert/jetty.jks

Importing keystore cert/jetty.p12 to cert/jetty.jks...

SUCCESS: Generated the internal jetty cert file 'cert/jetty.jks'