Coder Social home page Coder Social logo

serverpilot-letsencrypt's Introduction

Let's Encrypt on Your ServerPilot Free Plan

Automate the installation of Let's Encrypt SSL on the free plan of ServerPilot

About the script

ServerPilot's paid plan costs only $10 per month that unlocks auto installation of Let's Encrypt SSL along with some other premium features. But if you don't want to spend that $10 then this script can automate the installation of the SSL on your ServerPilot servers. When you activate the SSL for an app, this script adds a cron job as well that takes care of the renewal of your Let's Encrypt SSL.

Getting started

Clone the repo

Run this command to clone the reposity and to add the CRON job for auto-renewal of the certs:

$ git clone https://github.com/rehmatworks/serverpilot-letsencrypt.git && cd serverpilot-letsencrypt && sudo mv sple.sh /usr/local/bin/rwssl && sudo chmod +x /usr/local/bin/rwssl && (crontab -l ; echo "@monthly \"sudo service nginx-sp stop && yes | letsencrypt --standalone renew &>/dev/null && service nginx-sp start && service nginx-sp reload\"")| crontab - && service cron reload

Successful execution of the above command will clone the script to your system and the script will be copied to /usr/local/bin and will be made executable as rwssl. After that, you can execute it easily by running rwssl command.

Install SSL

$ rwssl

You will be prompted to provide the required information and your SSL will be installed in matter of a few seconds.

Any questions? Ask me in my blog post here.

How to Uninstall

First of all, uninstall the SSL from each domain by choosing uninstall option after executing rwssl command. This step is optional and this removes the added vhosts. If you don't want to remove the vhosts and only want to remove the script, then ignore this step.

Next, execute this command in your terminal to delete the script:

sudo rm /usr/local/bin/rwssl

Lastly, edit the crontab by running crontab -e command delete the added CRON jobs responsible for SSL auto-renewals.

serverpilot-letsencrypt's People

Contributors

rehmatworks avatar

Watchers

James Cloos avatar OpenCubicles avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.