How to use letsencypt ssl certificates on webfaction via


letsencrypt provides free ssl certificates, but webfaction doesn't provide an integration for this in their control panel, so certificates must be manually renewed. This post outlines how you can issue a free ssl certificate from letsencrypt using, and set it up to automatically renew using the webfaction API.



curl | sh 

Download from and move it into your bin directory - i.e. /home/USER/bin. Make sure it's executable:

cp /path/to/ ~/bin/
chmod +x ~/bin/

Issue the certificate

Issue a certificate for your webfaction site as per the documentation: --issue -w /path/to/webroot -d -d

Note you'll need to set up your site to serve the files in /path/to/webroot/.well-known at If you're working with a static or php site, you can just add your actual webroot here. For sites without a webroot, i.e. django or rails, use a temp directory as your webroot and add an alias in /home/USER/webapps/APPNAME/apache2/conf/httpd.conf:

Alias /.well-known/ /home/USER/temp/.well-known/

Install the certificate

Create an ssl certificate in the webfaction control panel, and add it to your site. See the webfaction ssl documentation for more information. You'll need to copy and paste the certificate details from the output of step 1

Install the certificate using the --install-cert, where

  • WF_SERVER is your webfaction server name, i.e. Web486 (note, it must be title cased)
  • WF_USER and WF_PASSWORD is your webfaction control panel login
  • WF_CERT_NAME is the name of the certificate you created in step 2 --install-cert -d -d \
--reloadcmd "WF_SERVER=WebXX WF_USER=user WF_PASSWORD=pass WF_CERT_NAME=certname"

Testing it out

At this point you should have an crontab entry which will renew the certificates automatically, and on renewal, trigger to update the cert via the webfaction api.

You can test it's working by forcing a renewal - run the command from the crontab with --force appended, i.e. something like:

"/home/USER/"/ --cron --home "/home/USER/" --force

If everything is working correctly, you should see the certificates renewed and the message "Reload success".