Enabling the nginx plugin for letsencrypt


I thought the instructions for enabling plugins in letsencrypt were very confusing so here is a small guide for anyone else stuck on the same problem.

It's pretty simple once you realize it's just a bunch of python packages. My instructions are for Ubuntu but it should be easy to translate.

  • Install system dependencies
    sudo apt-get install python-dev python-virtualenv libffi-dev libssl-dev
  • Create a virtualenv with Python 2 (important!) and enter it
    virtualenv -p /usr/bin/python2 venv
    . venv/bin/activate
  • Install acme
    cd acme
    python setup.py install
  • Go back to the top and install the letsencrypt module:
    cd ..
    python setup.py install
  • And finally install the letsencrypt-nginx module
    cd letsencrypt-nginx
    python setup.py install

Now you have a working letsencrypt command in your virtualenv and can enable nginx with the --nginx flag.

However since you have to run letsencrypt as root and sudo throws away a lot of your current environtmen you have to do something like:

sudo -s
. venv/bin/activate
letsencrypt --nginx

Good luck encrypting!

Currently unrated


There are currently no comments

New Comment


required (not published)


Recent Tweets

  • Fredrick Rybarczyk

    Fredrick Rybarczyk @Fredrick_R

    Ernst Sjöstrand

    SLUTA skriva som om lärarbehörighet vore en särskilt relevant. Våra elever måste få träffa lärare med ämneskunskape… https://t.co/VYMawBky4O
    1 day, 10 hours ago

  • Myq Kaplan

    Myq Kaplan @myqkaplan

    Ernst Sjöstrand

    TRUMP: Mexicans are bad TRUMP: Muslims are bad TRUMP: Media are bad EVERYONE: what about Nazis TRUMP: let's not single anyone out
    2 days, 5 hours ago

  • Åsa Schwarz

    Åsa Schwarz @AsaSchwarz

    Ernst Sjöstrand

    Regeringen börjar nu använda Sveriges tunga kompetens inom cybersäkerhet rätt. @amelsec tillträder som styrelsemedlem hos Trafikverket. =>
    1 week ago

Recent Posts







RSS / Atom