Let's Encrypt SSL for ServerPilot free servers

A while ago, ServerPilot used to offer a free subscription plan as well. The free plan didn’t have the auto-ssl feature. Now ServerPilot has gone fully paid, but the servers on their free plan can still exist there, but without the SSL provisioning feature.

To help users on their free plan, I have written a Python tool. The utility is available at PyPi repository and you can install it using PIP. I have written some detailed instructions at the GitHub repo of this package.

Installing the Package

Sign in as root using a terminal or PuTTY on Windows and execute the following command:

sudo apt-get update && sudo apt-get install python3-pip

Now install rwssl package:

sudo pip3 --upgrade --force-reinstall install rwssl

Once the package is installed, type this command and hit enter to confirm that the installation went successful:

rwssl -h

The above command should bring up the help menu of rwssl package.

Installing SSL Certificates

To install SSL certificate on a single app, execute this command:

rwssl getcert --app appname

Obviously, you will have to use the actual app name in place of appname. Here is the list of complete commands that you can use in order to manage SSL certificates on your ServerPilot apps.

Command Details Examples
getcert Get letsencrypt cert for an app. rwssl getcert --app foo
getcerts Get letsencrypt certs for all apps. rwssl getcerts for all users apps or rwssl getcerts --user john for john’s apps
removecert Uninstall SSL cert from an app. rwssl removecert --app foo
removecerts Uninstall SSL certs for all apps. rwssl removecerts for all users apps or rwssl removecerts --user john for john’s apps
forcessl Force SSL certificate for an app. rwssl forcessl --app foo
unforcessl Unforce SSL certificate for an app. rwssl unforcessl --app foo
forceall Force HTTPs for all apps. rwssl forceall for all users apps or rwssl forceall --user john for john’s apps
unforceall Unforce HTTPs for all apps. rwssl unforceall for all users apps or rwssl unforceall --user john for john’s apps

Uninstalling rwssl

To uninstall rwssl completely, execute this command:

pip3 uninstall rwssl

A CRON job is added for SSL renewals by rwssl, you can remove the CRON file by running:

rm /etc/cron.weekly/rwssl-sslrenewals

That’s all!

updated_at 18-05-2020