Using Let’s encrypt with Gandi Simple Hosting in stand alone

Here is how to configure gandi simple hosting by configuring directly the simple hosting instance.
0) simple hosting, instance type M
1) you need SSH access enabled and connected
2) API key (

1) install
2) use the –force option to bypass the package check and be able to install it without being root 😉
3) modify the anacron file to schedule (complete the installation)
edit /srv/data/etc/cron/anacrontab to add
0 0 * * * "/home/hosting-user/" --cron --home "/home/hosting-use
r/" > /dev/null

4) request the certificate once per instance
"/home/hosting-user/" --home "/home/hosting-user/" --issue -d -w /srv/data/web/vhosts/
5) write the python script to save the generated certificate file
I called it and installed it in ~/
import xmlrpclib
import sys
api = xmlrpclib.ServerProxy('')
apikey = 'The API key here'
#version =
host = sys.argv[1]
#print host
with open('/srv/data/web/vhosts/' + host + '/key.key', 'r') as content_key:
key =

with open('/srv/data/web/vhosts/' + host + '/cert.cer', 'r') as content_crt:
crt =

options = {'crt': crt, 'key': key}
api.cert.hosted.create(apikey, options)

6) save the certificate
“/home/hosting-user/” –home “/home/hosting-user/” –installcert -d –certpath /srv/data/web/vhosts/ –keypath /srv/data/web/vhosts/ –fullchainpath /srv/data/web/vhosts/ –reloadcmd “python /home/hosting-user/”

Done 😉