Ask A Question


You’re not receiving notifications from this thread.

Free SSL with Rails and Nginx using Let's Encrypt

Chris Oliver asked in General

nice tutorial! exactly what i was looking for!



Alejandro Ventura Alejandro Ventura

I got this error after running *./letsencrypt-auto*

Setting up python-pkg-resources (20.7.0-1) ...
Setting up python-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up python3-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up virtualenv (15.0.1+ds-3ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Creating virtual environment...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/", line 2363, in <module>
File "/usr/lib/python3/dist-packages/", line 719, in main
File "/usr/lib/python3/dist-packages/", line 988, in create_environment
File "/usr/lib/python3/dist-packages/", line 918, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/", line 812, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/deploy/.local/...ncrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 1

Any help with this?

Jaunty Kaushal Jaunty Kaushal

I used: sudo apt install letsencrypt

It worked well (you just have to update the paths for the command).


Getting the following error after running `./letsencrypt-auto`

`Failed to install a working "virtualenv" command, exiting`


I followed these steps and found that `sudo apt-get install letsencrypt` got me up and running. No need to install from github source.


@excid3:disqus what do you mean by `Add the following lines to your server block for your app and be sure to change to your domain.`

Where do I find the `server block`? Is this the `/etc/nginx/nginx.conf` file `server { }`


Or in my case as I am running passenger `sudo nano /etc/nginx/sites-enabled/default`


Awesome! So is there any way to know for sure that the renew cron job is running? I guess one way is to just make sure I'm not getting renewal emails? It'd be nice if there was some way to check the status of a cert, or to know that the job ran?


Let's encrypt should write logs somewhere, or you could tack on a little bash snippet have it output top your own log file too and write the last timestamp it ran.

vic turuthi vic turuthi

Awesome tutorial Chris. You're the best. I restarted the server with no error. However, the browser still shows that my connection is insecure and doesn't show a green padlock. SSL checker shows that the two domains and are encrypted. What could be the issue?


Hey Chris Oliver any tips for doing this when running multiple domains on one server or having subdomains. ie and I have two server blocks for nginx but they are trying to share the same certificate so chrome throws an error around security.


You'd want two server blocks like you said and each one would point to different SSL certs if you wanted them both on SSL.


Failed authorization procedure. time out


Hi! Thanks for the awesome tutorial. I have a problem after the certbot installation on server. And now I can't run rake assets:precompile as usual. How can I fix this? I post my issue here:



Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.