https://www.aaflalo.me/2016/09/dehydrated-bash-client-lets-encrypt/
#ssl #web #lets_encrypt #free_ssl #dehydrated
#ssl #web #lets_encrypt #free_ssl #dehydrated
Antoine Aflalo
Dehydrated: a bash client for Let's Encrypt - Antoine Aflalo
Tutorial on how to use Dehydrated, a bash client for Let's Encrypt ACME Protocol. Dehydrated helps you take care of your SSL certificates.
If you have followed our
To make the procedure automatic I have created a sample shell script that after automatic renewal will also renew the PEM files for
#mongodb #mongo #ssl #pem #openssl #lets_encrypt
MongoDB
SSL configuration, you should by now know that we can generate SSL certificate using lets encrypt. I have used dehydrated that fully matches with cloud flare.To make the procedure automatic I have created a sample shell script that after automatic renewal will also renew the PEM files for
MongoDB
#! /bin/bash
echo 'Binding new mongo private key PEM file and Cert PEM file...'
cat /etc/dehydrated/certs/mongo.example.com/privkey.pem /etc/dehydrated/certs/mongo.example.com/cert.pem > /etc/ssl/mongo.pem
echo 'Saved the new file in /etc/ssl/mongo.pem'
sudo touch /etc/ssl/ca.pem
sudo chmod 777 /etc/ssl/ca.pem
echo 'truncate ca.pem file and generate a new in /etc/ssl/ca.pem...'
sudo truncate -s 0 /etc/ssl/ca.pem
echo 'generate a ca.pem file using opessl by input -> /etc/ssl/ca.crt'
sudo openssl x509 -in /etc/ssl/ca.crt -out /etc/ssl/ca.pem -outform PEM
echo 'ca.pem is generated successfully in /etc/ssl'
echo 'append the chain.pem content to newly created ca.pem in /etc/ssl/ca.pem'
sudo cat /etc/dehydrated/certs/mongo.example.com/chain.pem >> /etc/ssl/ca.pem
echo 'done!'
#mongodb #mongo #ssl #pem #openssl #lets_encrypt