Forum

lets encrypt renew

andi
19 August 2016, 23:10
hi hugo
sorry my english is not so good .. german better

i have found this
https://github.com/hsleisink/hiawatha/tree/master/extra/letsencrypt

its real start cronjob daily with ./letsencrypt renew restart and your script
renew all certificates on server,vhost,... ?
thanks for your work and replay to me

thanks
andi
Hugo Leisink
20 August 2016, 00:29
It will renew all Let's Encrypt certificates, if they expire within RENEWAL_EXPIRE_THRESHOLD days. See letsencrypt.conf for that setting. Make sure you place it in root's cronjob, as it needs root access to restart the webserver.
andi
20 August 2016, 08:29
thanks
and make this script the file with all certificates
sample what i mean
your script renew /letsencrypt/live/domain.com/cert.pem , chain.pem , fullchain.pem , privkey.pem
and then put this privkey,cain,... in one file to /myssl/domain.com.pem
or only update the /live/... files?

thanks


andi
20 August 2016, 08:44
ohh sorry i have found
right: $cert_file = $dir.$website_hostname.".pem"; cool perfect
thanks for this!
Hugo Leisink
20 August 2016, 09:34
Yes, as you already found out, this script can create both new certificates and renew them. This script is all you need for Let's Encrypt certificates.
andi
20 August 2016, 11:23
perfect !!

thanks
andi
andi
20 August 2016, 12:34
root@:/etc/hiawatha/extra# ./letsencrypt request www.domain.com restart
Authorizing www.domain.com.
- Retrieving HTTP authentication challenge.
- Retrieving authorization key.
Authorizing domain.com.
- Retrieving HTTP authentication challenge.
- Retrieving authorization key.
Generating RSA key.
Generating CSR.
Retrieving certificate.
Writing private key and certificate to file.
Retrieving CA certificate.
Writing CA certificate to file.

but i cant find the pem
folder .../tls/ empty
new folder in
/var/www/domain.com/.well-known

the letsencrypt.conf is original from you

and when i use this
./letsencrypt request www.domain.com domain.pem restart
then come a new pem in this .../extra/ folder

i think here is a little mistake or not?

hope you can understand me


Hugo Leisink
20 August 2016, 12:41
As described in the readme, the script will create the pem file in the current directory or when run as root in the Hiawatha certificate directory (see HIAWATHA_CERT_DIR in letsencrypt.conf).
andi
20 August 2016, 12:45
yes i know but i use this
HIAWATHA_CONFIG_DIR = /etc/hiawatha
#HIAWATHA_CERT_DIR = /etc/myssl <- testing
HIAWATHA_CERT_DIR = {HIAWATHA_CONFIG_DIR}/tls <- empty

and this .well-know folder can i delete this or need this?


Hugo Leisink
21 August 2016, 02:30
Ignore this whole .well-known thing. The script and Hiawatha take care of it.
This topic has been closed.