Code Monkey home page Code Monkey logo

serverpilot-letsencrypt's Introduction

Serverpilot Let's Encrypt Ubuntu 14.04 Ubuntu 16.04Ubuntu 18.04

Bash script to generate and install Let's Encrypt certificate for your websites on your free/paid ServerPilot account. Currently, the only easy way to add SSL to your ServerPilot-powered websites is by subscribing to the paid plan.

How to install

  • ssh to your server, sudo su to act as root
  • Copy sple.sh to your /usr/local/bin folder
    cd /usr/local/bin && wget https://raw.githubusercontent.com/lesaff/serverpilot-letsencrypt/master/sple.sh
    
  • Run sudo chmod +x sple.sh to make it executable

How to use

  • Run sple.sh anywhere from your console as root
  • Follow the on-screen instructions

Why root?

This script updates/create script in the /etc/nginx-sp that requires root access

IF things go wrong

  • Check /var/log/letsencrypt for detailed error messages
  • ssh to your sp server as root
    cd /etc/nginx-sp/vhosts.d
  • List all the ssl config files
    ls *ssl*
  • Delete the <appname>.ssl.conf that is causing problem

Restart nginx sudo service nginx-sp restart

Schedule auto renewal

Add the following to your crontab (crontab -e)

For Ubuntu 14.04

0 */12 * * * /usr/local/bin/certbot-auto renew --quiet --no-self-upgrade --post-hook "service nginx-sp reload"

For Ubuntu 16.04

0 */12 * * * letsencrypt renew && service nginx-sp reload

For Ubuntu 18.04

0 */12 * * * letsencrypt renew && service nginx-sp reload

Notes

  • This script assumes that you did not change your default ServerPilot installation folder
  • When entering your domain names, please list the primary root domain name first
  • To force HTTPS on your website, please follow instructions here
  • To redirect www to non-www or non-www to www on your website, please follow instructions here
  • Obey/observe the rate limits. Read the full documentation on the Let's Encrypt website for more information.

serverpilot-letsencrypt's People

Contributors

caroseuk avatar dandawson avatar ilearnbydoing avatar maungthuu avatar rudyaffandi avatar slowmail avatar ymhuang0808 avatar

Watchers

 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.