GithubHelp home page GithubHelp logo

will-in-wi / letsencrypt-webfaction Goto Github PK

View Code? Open in Web Editor NEW
351.0 21.0 27.0 323 KB

LetsEncrypt utility client for WebFaction hosts.

License: MIT License

Ruby 99.90% Shell 0.10%
webfaction letsencrypt certificate cron

letsencrypt-webfaction's Introduction

LetsEncrypt WebFaction

LetsEncrypt utility client for WebFaction hosts.

WebFaction is closing down.

Webfaction is sadly closing their doors and will be completely shut down in June. All of my sites have been migrated to Opalstack, and I no longer have a way to test issues. I suspect that most folks who used this tool have also migrated at this point, or will be doing so before long.

As a result, this project is now closed down. THANK YOU to all of you who have filed issues, contributed code and documentation, and helped others solve tickets. You have made this a tremendously fun and rewarding project to work on, and helped out so many fellow WebFaction customers. It has been an honor to work with so many of you on it.

Previous Readme

NOTE: Version 4 is out and requires some manual changes. See the upgrade guide for details.

This tool automates the process of using LetsEncrypt on WebFaction hosts. It can be added to the Cron scheduled task runner where it will validate your domains automatically, obtain the certificates, and then install them using the Webfaction API.

For more documentation, as well as walkthroughs, see the wiki!

Build Status

Gem Version

Code Climate

Note: if you find this useful and are setting up a new account, you can support me a little by using my WebFaction affiliate link. I think I get a 10% referal bonus from whatever you spend at WebFaction. Thanks!

Why not Certbot?

Certbot is the "official" (in that it was the first and to some extent reference client) Let's Encrypt client. Let's Encrypt decided to focus Certbot on a particular use case, namely the configuration of servers which are directly facing the internet and can have the Certbot application run as root. For other use cases, they encourage the implementation of other clients tailored to different cases. This has spawned a wide variety of alternative implementations.

LetsEncrypt WebFaction is just such an alternative implementation. It was built because the WebFaction use case does not fit in the Certbot preconditions, namely that users don't have root access to change the frontend Nginx server configuration. WebFaction has a custom API we use to install the certificate.

Certbot could probably be used in "webroot" mode to create the certificate on disk, and have someone write a custom plugin to install using the API. For various reasons, I decided not to do this. If someone creates instructions to do this, I'd be happy to link to it from the wiki.

Prerequisite topics

Below are a list of server administration topics that it is assumed you know in order to follow the installation and setup instructions. If you find something in the readme that is unclear to you, please open a ticket and I'll try to improve the documentation!

Cron

Cron is an application which will execute commands on a defined schedule. WebFaction has some good documentation on how to use it.

SSH

All of the commands listed below (unless specified otherwise) are run in an SSH session on the server. Again, WebFaction has written a splendid little tutorial on how to get this working.

SFTP

If you're not happy navigating around your server's folders and files through SSH, you might find some of this process easier if you access your server with an FTP client over Secure FTP. WebFaction also has this covered.

Installation

This utility works on CentOS 6 and 7 boxes. The CentOS 5 systems do not have a new enough OpenSSL to include the algorithms required. You may be able to make this work using rbenv and compiling openssl yourself. A tutorial for CentOS 5 is available here: https://github.com/will-in-wi/letsencrypt-webfaction/wiki/Install-custom-OpenSSL-and-Ruby-on-CentOS-5-host

All places where you need to substitute a value specific to your setup will be denoted with square brackets, e.g. [yourdomain.com]. There are cases where shell variables are used, such as $HOME. These should be typed verbatim.

NOTE: You can install letsencrypt_webfaction using rbenv if you are an advanced Ruby user. Replace the following section with these instructions if you choose to do so.

Run the following command in an SSH session to install the letsencrypt_webfaction package via the RubyGems package management site:

GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib gem2.4 install letsencrypt_webfaction

Add the following to ~/.bash_profile (using, for example, an FTP client or your favorite text editor):

function letsencrypt_webfaction {
    GEM_HOME=$HOME/.letsencrypt_webfaction/gems PATH=$PATH:$GEM_HOME/bin RUBYLIB=$GEM_HOME/lib ruby2.4 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction $*
}

This will simplify the running of the LetsEncrypt WebFaction command, by setting some variables in advance.

After saving ~/.bash_profile, run the command source $HOME/.bash_profile to apply the new settings.

Run letsencrypt_webfaction init to generate a registration cert and the config file. Open the config file nano -w ~/letsencrypt_webfaction.toml and edit to reflect your configuration.

Now, you are ready to run letsencrypt_webfaction run from your SSH session to get certificates. Note that by default the config file letsencrypt_webfaction.toml is pointed at the LetsEncrypt staging endpoint (the line that says: directory = "https://acme-staging-v02.api.letsencrypt.org/directory"); meaning you will only get "test" certificates installed while using the stage endpoint. To issue live certificates you will need to comment out default line, and uncomment the production endpoint line (the line that says: directory = "https://acme-v02.api.letsencrypt.org/directory" # Production).

When you have tested with staging, you can remove the certificate from WebFaction control panel (make sure no webapps are using it first) and re-run with the production endpoint.

After you run this command, you will see new certificates in the webfaction admin panel (under Domains / Websites, then SSL certificates), with the names you have provided (ie, the name = variable in the letsencrypt_webfaction.toml config file). You need to change your application to point to this certificate after the certificate has been issued. This change will take some time for Webfaction to deploy before you will be able to successfully connect with the https version of your site. After a short period, Webfaction will copy your generated certficates into the directory /home/yourusername/certificates/. Future runs of this command will update the existing certificate entry and not require a change in the admin panel.

Once you can connect to your site via https you might have broken images and CSS files. Such "mixed content" will need to be fixed: make sure any references to embeded content from your site uses https rather than http.

Finally, if you would like the http site to redirect to your https, follow the Webfaction guidance.

Usage

Syntax

The syntax of the letsencrypt_webfaction command is as follows:

$ letsencrypt_webfaction [init|run] [*options]

The commands are init and run. You can also use --version to get the currently installed version of letsencrypt_webfaction.

init

Generate registration cert and config file.

run

Generate certs and add to them to the control panel. This command has the following options:

  • --config=CONFIG: Use alternative configuration path
  • --force: Re-issue certs regardless of expiration
  • --help: Show help for this command
  • --quiet: Run with minimal output (useful for cron)

Testing

To test certificate issuance, consider using the LetsEncrypt staging server. This doesn't have the rate limit of 5 certs per domain every 7 days. You can change the directory config line to be https://acme-staging-v02.api.letsencrypt.org/directory in order to test the system.

After switching endpoints, you will likely want to run the command with --force in order to reissue all certificates from the new endpoint.

Operation

When letsencrypt_webfaction runs, it places verification files into the public directory specified, validates the domains with LetsEncrypt, and then uploads the certificate to WebFaction's API.

Once you have the certificate installed and working, you will probably want to redirect the HTTP version of your site to the HTTPS version. WebFaction has documentation describing how to do this.

Cron usage

Normally, you will run the script manually once to get the certificate, and then you will use Cron to automate future certificate renewal.

The Cron task should run daily (or however often you prefer) and will only renew or issue certs which have been added, changed, or are near or past expiration.

Your Cron task should look like:

18 3 * * *     PATH=$PATH:$GEM_HOME/bin:/usr/local/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.4 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction run --quiet

Note the usage of --quiet to keep the success message from being shown and emailed.

This would run at 03:18 a.m. every day. Change the exact time of the Cron task so that the load on Let's Encrypt is spread out.

If you want to be notified upon failure, you can add MAILTO=[[email protected]] to the top of the crontab. This will send you an email whenever any cron job outputs standard out or standard error, which is generally good practice. According to the Webfaction Cron documentaion some webfaction servers also require you to add MAILFROM=[[email protected]] to the top of the crontab.

Upgrading

While WebFaction staff maintain your standard server software, the support team will not upgrade your installation of LetsEncrypt WebFaction. You won't usually need to do this unless you have an issue but, as is good practice with most software, it's best kept up to date.

You can find the current version by running letsencrypt_webfaction --version. Sort of. In versions >= 1.1.4 (except for versions v3.0.0-v3.0.1), this will work. In older versions, this will just print letsencrypt_webfaction: version unknown due to an oversight on my part. So if you get the latter output, just upgrade.

The changelog describes changes from version to version.

LetsEncrypt WebFaction follows Semantic Versioning. In a nutshell, a version number such as 1.2.4 is divided as major.minor.patch. When the major version is incremented, you will probably have to change something about the configuration to make it work. The changelog will let you know what changes you need to make. When the minor version is incremented, there are new features but existing features haven't changed. If the patch version is incremented, the changes are all under the hood and shouldn't change or add any existing features.

TL;DR: Be careful with major version upgrades and you should be fine with upgrading to minor or patch releases.

To upgrade, run the following command to fetch and install the newest version from RubyGems:

GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib gem2.4 install letsencrypt_webfaction

Development

If you are interested in contributing to this project with new code or bugfixes, welcome!

To run the script directly from the repository, use:

$ ruby -Ilib exe/letsencrypt_webfaction

See details in the "Testing" section above on how to use the Let's Encrypt stage server when developing, together with usage of the --support_email parameter in a testing environment.

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bin/rake install. To release a new version, update the version number in lib/letsencrypt_webfaction.rb, and then run bin/rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org. This project uses Semantic Versioning.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/will-in-wi/letsencrypt-webfaction

letsencrypt-webfaction's People

Contributors

basetta avatar crantok avatar electricfeet avatar ericdorsey avatar justinph avatar mdinsmore avatar npdoty avatar paulrobertlloyd avatar shannonturner avatar will-in-wi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letsencrypt-webfaction's Issues

uninitialized constant OpenSSL::PKey::EC error

Hi, I've followed the instructions to get this setup but when I try to run the command I get the following error.

[username@web123 ~]$ letsencrypt_webfaction --config ~/le_config.yml
/home/username/.letsencrypt_webfaction/gems/gems/json-jwt-1.5.2/lib/json/jwk/jwkizable.rb:69:in `<top (required)>': uninitialized constant OpenSSL::PKey::EC (NameError)
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/username/.letsencrypt_webfaction/gems/gems/json-jwt-1.5.2/lib/json/jwt.rb:102:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/username/.letsencrypt_webfaction/gems/gems/acme-client-0.3.0/lib/acme-client.rb:5:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/username/.letsencrypt_webfaction/gems/gems/acme-client-0.3.0/lib/acme/client.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/username/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.0.0/lib/letsencrypt_webfaction/application.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/username/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.0.0/exe/letsencrypt_webfaction:3:in `<top (required)>'
    from /home/username/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/username/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

I also can't seem to install any ruby version via rbenv? Any pointers?

Automatic renewal?

I wasn't sure about this from the readme, but with cron usage is it required to contact webfaction every time a new cert is generated to have them install it?

I'm assuming so since each new cert is placed in a new timestamped directory. If the script we to place a copy of the newest certificate in a current directory eg. ~/le_certs/domain.com/current could contacting Webfaction could be avoided?

Thanks!

Cron job for RBEnv

Hi,
Firstly thank you so much for making this possible! It took me a while, probably due to being on web217, but I got there in the end thanks to your readme, the issues, and various wiki pages.

I was unable to download cacert.pem from https://curl.haxx.se/ca/cacert.pem, so ended up getting it from http://mirrors.ircam.fr/pub/crux/core/3.2/ca-certificates/cacert.pem instead. It appeared that the haxx.se website was completely down this morning although it appears to be back up now. Maybe I should have waited, but the ircam.fr file appears to work.

To get your script working I had to use the following command:

SSL_CERT_FILE=~/cacert.pem letsencrypt_webfaction --config ~/le_config.yml --domains example.com,www.example.com --public ~/webapps/htdocs/

I am now setting up the cron job and wanted to make sure the command you have given in your readme will work.

0 4 1 */2 * RBENV_ROOT=~/.rbenv RBENV_VERSION=2.3.0 ~/.rbenv/bin/rbenv exec letsencrypt_webfaction --config ~/le_config.yml --domains example.com,www.example.com --public ~/webapps/htdocs/

  1. Should I also add the SSL_CERT_FILE environment variable onto the beginning of that crontab command?
  2. And is RBEnv 2.3.0 correct? I seem to have 2.2.4 installed, so should I use the lower version instead?
[myuser@web217 ~]$ rbenv version
2.2.4 (set by /home/myuser/.ruby-version)
[myuser@web217 ~]$ rbenv versions
  system
  2.1.0
* 2.2.4 (set by /home/myuser/.ruby-version)
[myuser@web217 ~]$ 

Thank you
Robin

Example letsencrypt_webfaction() bash function doesn't work for ZSH

Tried adding it here: danielbachhuber/dotfiles@ea89fb7

web524.webfaction.com ➜  .dotfiles git:(master) ✗ reload!
web524.webfaction.com ➜  .dotfiles git:(master) ✗ letsencrypt_webfaction --account_email [email protected] --domains github-api.wp-cli.org --public ~/webapps/github_api
zsh: command not found: letsencrypt_webfaction
web524.webfaction.com ➜  .dotfiles git:(master) ✗ bash
bash-4.2$ letsencrypt_webfaction --account_email [email protected] --domains github-api.wp-cli.org --public ~/webapps/github_api
bash-4.2$ echo $?
0

Elaborate instructions for Email configuration and Cron

Thanks for the script. it has helped me a lot.

I am Designer, and i just understand code at the high level.
Can easily follow instructions and i am aware of how to execute CLI commands.

For a user like me, it will be helpful if the documentation has some more steps mentioned.

For example.
I receive the following error when executing the command:

sendmail: recipient address [email protected] not accepted by the server sendmail: server message: 554 5.7.1 <[email protected]>: Sender address rejected: Please use Gmail's SMTP servers sendmail: could not send mail (account default from dummy) sendmail: recipient address [email protected] not accepted by the server sendmail: server message: 554 5.7.1 <[email protected]>: Sender address rejected: Please use Gmail's SMTP servers sendmail: could not send mail (account default from dummy)

I know its regarding server unable to use Gmail to send email (to me and webfaction) and you have already found a solution towards it mentioned here https://github.com/will-in-wi/letsencrypt-webfaction#custom-email-configuration

Doesn't help much to me as a Designer.

What would help :

  1. Where to find this file OR is it to be created new
  2. Where to save this file.
  3. Some more clear instructions on how to use the cron.

You may decide to keep this script as dev oriented, However, a little more documentation will open it to more users.

My Setup:
All WordPress sites.

Thanks.

Problem with apache mod_wsgi

How use this script with apache mod_wsgi django, always shows this error: `validate!': Failed to verify statuses in 10 seconds. (RuntimeError)

help me please!

beginner's guide for migrating a WebFaction site to HTTPS

I've written up a guide on using this tool for migrating a WebFaction site to HTTPS, including the steps needed for configuration and testing, to help friends who might not be sufficiently expert to follow the README alone. If it's useful, please feel free to link from the README or the wiki docs: http://bcc.npdoty.name/directions-to-migrate-your-WebFaction-site-to-HTTPS
Also, corrections or feedback would be welcome; I'm happy to update it.

Apologies for creating a Github issue for this. I would add this to the wiki, but GitHub doesn't allow forks/pull requests on wiki documentation, alas.

Alternative to rbenv

Hey!

I tried a setup using Webfaction's built-in Ruby 2.2 and everything seemed to work fine and saved some time :)

This is what I did:

  1. Added following to ~/.bashrc to set default ruby version (since Webfaction defaults to 1.8 or 2.0)

    export GEM_HOME=$HOME/gems
    export RUBYLIB=$GEM_HOME/lib
    export PATH=$PATH:$GEM_HOME/bin
    alias ruby=ruby2.2
    alias gem=gem2.2
  2. Run source ~/.bashrc

  3. Run gem install letsencrypt_webfaction

  4. Run letsencrypt_webfaction command as normal. For cron usage, I prepended the command with source $HOME/.bashrc; to make it read the .bashrc config.

Error with sendmail and gmail account_email

Hey,

When generating certifications and sending mail to webfaction, sendmail is failing on a particular account that is using a gmail.com address as their account_email.

Running a command like this:

$ letsencrypt_webfaction --account_email [email protected] --admin_notification_email [email protected] --domains mydomain.com,www.mydomain.com --public ~/webapps/mydomain/current/web/
sendmail: recipient address [email protected] not accepted by the server
sendmail: server message: 554 5.7.1 < [email protected]>: Sender address rejected: Please use Gmail's SMTP servers
sendmail: could not send mail (account default from dummy)

I've had no problem using the same basic command on another webfaction account that doesn't use a gmail address as its account_email. Any idea for a workaround other than changing the account email?

Cent OS: centos-release-6-7.el6.centos.12.3.x86_64

activesupport requires Ruby version >= 2.2.2.

Hi there,

Firstly, great package - it'll help us out a great deal - thanks!

I'm probably missing something glaringly obvious...but... when running the command to install, I get the following error:

$ GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib gem2.2 install letsencrypt_webfaction
ERROR:  Error installing letsencrypt_webfaction:
        activesupport requires Ruby version >= 2.2.2.

Is it possible to upgrade the Ruby version? I've tried Googling, but not been successful... Is there something I'm missing?

I have access to Ruby 2.2.1, but not 2.2.2 AFAIK:

$ ruby2.2 --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

I'm on CentOS v7.2.1511.

Thank you in advance!
Sam

Email not sent to Webfaction support

First of all, my question should be: how much time does it takes for a support ticket to appear in the ticket list?

Now... I am on web301 server, I have the latest 1.1 release and used this command:

PATH=$PATH:$GEM_HOME/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction --account_email=[email protected] --admin_notification_email=[email protected] --domains=beerlinked.com,www.beerlinked.com --public=~/webapps/directory/

I have received an email to my admin_notification_email, but nothing on the account email and no ticket created in Webfaction help. I have double checked my account email and it's the one labeled as "emergency, invoice, tickets, all emails". No errors thrown...

Thanks for the help!

Update Wiki

Hi William,
Good news! I've been able to get a few sites working so far :))))))))

Even better news is that I'm writing a How-To for WordPress sites. I wrote it really for myself, as I had several sites to do and a terrible memory. I wrote a lot of it and then realised that Nick Doty's guide covers a lot of the same ground. Mine's more newbie-targeted, explaining what a lot of stuff means (now I've worked it all out for myself).

It could probably go in the Wiki. Are you interested? Shall I attach it here when finished (probably tomorrow)? Or is there a way I can fork the wiki? Layout is markdown; correct?

Handling dynamic webapps

One way I have found practical to handle verification of domains with dynamic webapps that are associated with the root path of the domain (e.g. a Django instance at https://example.com/) was to have a static-only app running at https://example.com/.well-known/. The verification file required by Let's Encrypt would then be created under that app.

Is there anyway to support this rather than requiring a public_html folder?

(I have found this to be a more practical way than the solution proposed in #7)

Complications on Web1XX instances

/home/myuser/.letsencrypt_webfaction/gems/gems/json-jwt-1.5.2/lib/json/jwk/jwkizable.rb:69:in `<top (required)>': uninitialized constant OpenSSL::PKey::EC (NameError)
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/myuser/.letsencrypt_webfaction/gems/gems/json-jwt-1.5.2/lib/json/jwt.rb:102:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.1/lib/acme-client.rb:5:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.1/lib/acme/client.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:3:in `<top (required)>'
    from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

renewal only if impending expiration

Rather than choosing the renewal rate via the regularity of a cron job, it might be nice to take advantage of certbot functionality that renews a cert if and only if it's within one month of expiration.
https://certbot.eff.org/docs/using.html#renewal

That way, we could set the cron job to run daily or weekly and it would just actually create a new certificate whenever one was needed.

Verify that support only gets the instructions and not the wrapper

Per #4 (comment)

This was the email Webfaction received. Probably should only send them the last part?

LetsEncrypt Webfaction has generated a new certificate for domain.com and www.domain.com. The certificates have been placed in /home/domain/le_certs/domain.com/20160324162750. WebFaction support has been contacted with the following message:

Please apply the new certificate in /home/domain/le_certs/domain.com/20160324162750 to domain.com and www.domain.com. Thanks!

Double check that I did this correctly, and if I did, clarify to the user what was indeed sent to support.

What am I missing? No ~/le_certs

I'm not sure what step I've missed but upon (presumably) successful run of letsencrypt_webfaction I get neither a ~/le_certs directory nor any sort of confirmation email. The relevant .well-known directory IS created inside my web app, and I can reach the generated keys via http just fine. The command completes silently, which I am taking to mean success.

Also, I have seen mention of a --support_email parameter to the command but that gets rejected.

I'm using version 2.0.0 of letsencrypt_webfaction. The described behaviour occurs both for production and when fired against the staging server.

Moving domain to a new host

I've moved my domain to a new host and I'm not sure how to move the ssl cert.

I had the tree under git and the .well_known directory came over under the public directory of a node app but it's not working yet. Should this directory be available via http?

I've tried reinstalling with letsencrypt_webfaction but I'm getting the error:

letsencrypt_webfaction --account_email [email protected] --domains idahobot.billbaran.us --public ~/webapps/idahobot/idahobot/public
/home/foo/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/domain_validator.rb:22:in `validate!': Failed to verify statuses in 10 seconds. (RuntimeError)
        from /home/foo/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:24:in `run!'
        from /home/foo/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:5:in `<top (required)>'
        from /home/foo/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
        from /home/foo/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Little addition to install instructions?

Hi,

First, thank you very much! your script is really easy to use and it saved me a lot of headache!

The only problem I had is that being newbie in many of these things i couldn't make letsencrypt_webfaction work after following the steps, a couple of search later I found my mistake:

After adding the lines in bash_profile i must execute

source $HOME/.bash_profile

I suppose that is obvious for many users but for people with few knowledge in paths like me this could be useful to have in your instructions, besides that everything worked perfectly!

Thank you again!

Add pry as a dependancy of this gem

Upgrading to the latest version (1.1.7), I was getting the following error after running letsencrypt_webfaction

[prlloyd@web520 ~]$ letsencrypt_webfaction --help
/usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- pry (LoadError)
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/prlloyd/.letsencrypt/gems/gems/letsencrypt_webfaction-1.1.7/lib/letsencrypt_webfaction/domain_validator.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/prlloyd/.letsencrypt/gems/gems/letsencrypt_webfaction-1.1.7/lib/letsencrypt_webfaction/application.rb:5:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/prlloyd/.letsencrypt/gems/gems/letsencrypt_webfaction-1.1.7/exe/letsencrypt_webfaction:3:in `<top (required)>'
    from /home/prlloyd/.letsencrypt/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/prlloyd/.letsencrypt/gems/bin/letsencrypt_webfaction:23:in `<main>'

I was able to fix this by manually installing pry (gem2.2 install pry). Shouldn’t pry be added as a dependancy of the letsencrypt-webfaction gem?

".well-known" URL returns 404

Hi there. I'm using Django 1.10 and I've created a static app from www.example.com/.well-known to ~/public_html such that if I put a file (say test.html) in ~/public_html and browse to www.example.com/.well-known/test.html it renders properly.

But when I run
$ letsencrypt_webfaction --account_email [email protected] --domains example.com,www.example.com --public /home/username/public_html/

I get 404 errors that it couldn't find www.example.com/.well-known/acme-challenge/some-hash

When I look in ~/public_html, there's nothing in there. Do you have any suggestions?

See if support can be automatically emailed

I have an idea that I haven't explored, where we make the script email [email protected] from your registered account, in order to automatically create the ticket. Hypothetically, this would make it entirely hands-off (for us). However, I haven't verified that emailing them from your email address would actually create the support ticket such that you can see it in the support page.

Tasks:

Gmail configuration issue

Earlier i was getting errors when using GMail.

As instructed i created the le_config.yml file and added the details.
:user_name: '[my gmail address]'
:password: '[used the app specific password without spaces]'

  • I have retained the Square brackets, not sure if that is correct.
  • The password is App Specific Password as i am using 2FA.

The error that i am getting now is as follows:

/usr/local/lib/ruby22/ruby/2.2.0/net/smtp.rb:976:in `check_auth_response': 535-5.7.8 Username and Password not accepted. Learn more at (Net::SMTPAuthenticationError)
        from /usr/local/lib/ruby22/ruby/2.2.0/net/smtp.rb:740:in `auth_plain'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/smtp.rb:732:in `authenticate'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/smtp.rb:567:in `do_start'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/smtp.rb:520:in `start'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/mail-2.6.4/lib/mail/network/delivery_methods/smtp.rb:113:in `deliver!'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/mail-2.6.4/lib/mail/message.rb:253:in `deliver!'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/pony-1.11/lib/pony.rb:176:in `deliver'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/pony-1.11/lib/pony.rb:166:in `mail'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/emailer.rb:27:in `send_to_support!'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/emailer.rb:21:in `send!'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:30:in `run!'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:5:in `<top (required)>'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
        from /home/WF_USERNAME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Should i try using Webfaction hosted email or Non-Gmail ID ?

Please assist.

Letsencript-webfaction (email problems)

Now I tried with only one domain as you recommended:


letsencrypt_webfaction --account_email [email protected] --domains domain1.com,www.domain1.com --public ~/webapps/myApp/ --output_dir ~/home/username/certs1/

But now I get the following error:


sendmail: recipient address [email protected] not accepted by the server
sendmail: server message: 554 5.7.1 [email protected]: Sender address rejected: Please use Yahoo's SMTP servers
sendmail: could not send mail (account default from dummy)
sendmail: recipient address [email protected] not accepted by the server
sendmail: server message: 554 5.7.1 [email protected]: Sender address rejected: Please use Yahoo's SMTP servers
sendmail: could not send mail (account default from dummy)


What went wrong?

certificate verify failed (Faraday::SSLError)

Hello,
I would like to ask if you would please assist with the following error:

[me@web504 my-scripts]$ letsencrypt_webfaction --contact [email protected] --domains cloud.me.com --public ~/webapps/owncloud/htdocs/
/home/me/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock': SSL_connect returned=1 errno=0 state=error: certificate verify failed (Faraday::SSLError)
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:933:in `connect'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:852:in `start'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/2.3.0/net/http.rb:1398:in `request'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:82:in `perform_request'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in `call'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `head'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday.rb:99:in `method_missing'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/acme-client-0.3.0/lib/acme/client/faraday_middleware.rb:92:in `get_nonce'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/acme-client-0.3.0/lib/acme/client/faraday_middleware.rb:85:in `pop_nonce'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/acme-client-0.3.0/lib/acme/client/faraday_middleware.rb:11:in `call'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/acme-client-0.3.0/lib/acme/client.rb:25:in `register'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-0.0.2/lib/letsencrypt_webfaction/application.rb:65:in `register_key!'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-0.0.2/lib/letsencrypt_webfaction/application.rb:20:in `run!'
    from /home/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-0.0.2/exe/letsencrypt_webfaction:5:in `<top (required)>'
    from /home/me/.rbenv/versions/2.3.0/bin/letsencrypt_webfaction:23:in `load'
    from /home/me/.rbenv/versions/2.3.0/bin/letsencrypt_webfaction:23:in `<main>'
[me@web504 my-scripts]$

Thank you!

Error creating new registration

Hi, I try to generate a new certificate.
I updated letsencrypt_webfaction, lanch this command:

letsencrypt_webfaction --account_email [email protected] --domains my.domains.com --public ~/webapps/path --endpoint https://acme-staging.api.letsencrypt.org/ --support_email "[email protected]"

And have this result:

Failed to verify statuses.
my.domains.com: Invalid response from http://my.domains.com/.well-known/acme-challenge/oCm1uCAzKDX45FlML-PyirQEf30iqYmtuP148_WNUZs: "<!DOCTYPE html>
<!--[if lte IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="en" ><![endif]-->
<"
Make sure that you can access http://my.domains.com/.well-known/acme-challenge/oCm1uCAzKDX45FlML-PyirQEf30iqYmtuP148_WNUZs

I try an other time, and have this:

/home/me/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:43:in `raise_on_error!': Error creating new registration (Acme::Client::Error)
    from /home/me/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:33:in `on_complete'
    from /home/me/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:18:in `block in call'
    from /home/me/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
    from /home/me/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:18:in `call'
    from /home/me/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /home/me/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /home/me/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
    from /home/me/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client.rb:45:in `register'
    from /home/me/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/lib/letsencrypt_webfaction/application.rb:70:in `register_key!'
    from /home/me/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/lib/letsencrypt_webfaction/application.rb:21:in `run!'
    from /home/me/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/exe/letsencrypt_webfaction:5:in `<top (required)>'
    from /home/me/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/me/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

For test, I remove the file .well-known/acme-challenge/oCm1uCAzKDX45FlML-PyirQEf30iqYmtuP148_WNUZs and have exactly the same error (the second)

I read than my first error is a webfction matter, but the second looks diffrent

Failed to verify statuses in 10 seconds. (RuntimeError)

Hey,

Just wondering if you can help with the below error? I am running a static(Static only (no .htaccess)) webserver on Webfaction.

Thanks

$ letsencrypt_webfaction --account_email [email protected] --domains ouchkernel.com,www.ouchkernel.com  --public ~/webapps/testapp
/home/ouchkernel/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-1.0.1/lib/letsencrypt_webfaction/domain_validator.rb:22:in `validate!': Failed to verify statuses in 10 seconds. (RuntimeError)
    from /home/ouchkernel/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-1.0.1/lib/letsencrypt_webfaction/application.rb:24:in `run!'
    from /home/ouchkernel/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/letsencrypt_webfaction-1.0.1/exe/letsencrypt_webfaction:5:in `<top (required)>'
    from /home/ouchkernel/.rbenv/versions/2.3.0/bin/letsencrypt_webfaction:22:in `load'
    from /home/ouchkernel/.rbenv/versions/2.3.0/bin/letsencrypt_webfaction:22:in `<main>'

Cronjob configuration ruby2.2 full path

It seems that ruby2.2 resides outside PATH when running a cronjob in WebFaction, so it would be safer to change the documentation to advise people to call ruby2.2 using its full path in the system installation, which is /usr/local/bin/ruby2.2.

The cronjob command would be:

PATH=$PATH:$GEM_HOME/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib /usr/local/bin/ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction --account_email [[email protected]] --domains [yourdomain.com,www.yourdomain.com] --public ~/webapps/[yourapp/your_public_html]/

(I just noticed that my certificates were not being updated due to a failure to execute ruby2.2)

`assign_attributes': undefined method `iso8601' for Time:Class (NoMethodError)

Hey, using the latest version I was getting an the error /home/.../.letsencrypt_webfaction/gems/gems/acme-client-0.4.0/lib/acme/client/resources/authorization.rb:28:inassign_attributes': undefined method iso8601' for Time:Class (NoMethodError) when trying to run letsencrypt_webfaction command, when I rolled back to -v 1.1.0 I ended up at the error Failed to verify statuses in 10 seconds on your troubleshooting page which I then resolved by redirecting http to https.

Problem with accessing the .well-known via the browser

First of all, big thanks for creating this Gem. It has simplified a lot when it comes to managing Let's Encrypt on WebFaction.

Recently I tried to re-new the certificates for some of the domains I used to have them for, however when DomainValidator#validate! runs, it fails to access the challenges' files via the browser (returning a 404). I have contacted already WebFaction's support team, however the only thing they noticed was re-naming the directory which is created during the validation process from .well-known to .wk (just an example).

I've the latest version of the gem installed and I'm using rbenv to manage Ruby version on WebFaction.

Fails to log in to WebFaction API

Thank you for creating the new release!

My certificate is being created, but XMLRPC login fails. I've confirmed I didn't make a typo by logging into WF by copying and pasting from my command. Also, I have used the same credentials by making api calls of my own.

Here's the command and output with sensitive info replaced.

$ letsencrypt_webfaction --letsencrypt_account_email [email protected] --domains example.com --public ~/webapps/example_http/ --username myuser --password LETMEIN --endpoint https://acme-staging.api.letsencrypt.org/

/usr/local/lib/ruby22/ruby/2.2.0/xmlrpc/client.rb:271:in `call': LoginError (XMLRPC::FaultException)
from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-2.0.0/lib/letsencrypt_webfaction/certificate_installer.rb:33:in `session_id'
from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-2.0.0/lib/letsencrypt_webfaction/certificate_installer.rb:14:in `install!'
from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-2.0.0/lib/letsencrypt_webfaction/application.rb:26:in `run!'
from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-2.0.0/exe/letsencrypt_webfaction:5:in `<top (required)>'
from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Error during common usage

Hi

I am trying to use your tool but I have an error.

/home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client/faraday_middleware.rb:37:in `raise_on_error!': algorithm 'none' in JWS header not acceptable (Acme::Client::Error::Malformed)
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client/faraday_middleware.rb:27:in `on_complete'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client/faraday_middleware.rb:12:in `block in call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client/faraday_middleware.rb:12:in `call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client.rb:23:in `register'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.1/lib/letsencrypt_webfaction/application.rb:70:in `register_key!'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.1/lib/letsencrypt_webfaction/application.rb:21:in `run!'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.1/exe/letsencrypt_webfaction:5:in `<top (required)>'
        from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
        from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

config file

key_size: 4096
endpoint: 'https://acme-v01.api.letsencrypt.org/'
account_email: '[email protected]'
support_email: '[email protected]'
domains:
  - 'sub.domain.com'
public: '/home/myuser/webapps/satis_src/public/'

command
letsencrypt_webfaction --config ~/le_config.yml

box 461
no error while installing.
Tnx

Renew command fails with "Connection reseted by Peer"

For testing purposes I tried to run the renew command and I got the following error:

$ PATH=$PATH:$GEM_HOME/bin:/usr/local/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction --account_email [email protected] --domains mysite.dk,www.mysite.dk,dev.mysite.dk --public ~/webapps/mysite_main_redirect/ 

/usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:923:in `connect': Connection reset by peer - SSL_connect (Faraday::ConnectionFailed)
        from /usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:923:in `block in connect'
        from /usr/local/lib/ruby22/ruby/2.2.0/timeout.rb:73:in `timeout'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:923:in `connect'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:863:in `do_start'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:852:in `start'
        from /usr/local/lib/ruby22/ruby/2.2.0/net/http.rb:1375:in `request'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:82:in `perform_request'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in `call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:140:in `head'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday.rb:99:in `method_missing'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:108:in `get_nonce'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:101:in `pop_nonce'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client/faraday_middleware.rb:17:in `call'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/acme-client-0.4.1/lib/acme/client.rb:45:in `register'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/lib/letsencrypt_webfaction/application.rb:70:in `register_key!'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/lib/letsencrypt_webfaction/application.rb:21:in `run!'
        from /home/myuser/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.8/exe/letsencrypt_webfaction:5:in `<top (required)>'
        from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
        from /home/myuser/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Is it supposed to happen because the certificate can't get renewed?

Cron failed

Hmm. I've been following various errors that people have been encountering lately (and also the positive developments on the webfaction side). I haven't really followed well enough to figure out if the errors have been fixed upstream.

I've now gone past crunch-time -- renewal -- and my cron commands clearly didn't work (I'm getting 20-day cert expiry warnings from Let's Encrypt (which is nice of them).

So my issue is: Is the command in the cron job at fault, or did I bump into some of the errors when my renewals ran on 11 Sept? (I hadn't updated my version of LE-WF since August; but I have now.)

Any chance you could double check that my wiki-wordpress-doc cron command is correct?

If it's correct, can I assume I can change the cron date to tonight and it will update correctly? Or are there still some upstream errors around in LE-WF?

Thanks!

Error 404 when acme challenge in version 1.1.8

Hello, I had no problems before. But now when applying the letsencrypt_webfaction command, it returned error ... I checked out the version and the result was unknown. According to the docs, I upgraded and now I got the 1.1.8 version. So I ran the command again and now I have this 404 error on acme challenge.

Failed to verify statuses.
myDomain.com: Invalid response from http://myDomain.com/.well-known/acme-challenge/1aE...
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
Make sure that you can access http://myDomain.com/.well-known/acme-challenge/1aE...

I try that URL on my browser and get the following:


Not Found

The requested URL /avsOVY1C4PXoS.....-qLe8wgw7YVJo was not found on this server.

Looks like the confirmation chain is not displayed.

Any ideas how to fix it?

Lets Encrypt Malformed CSR Advisory

Hi William,

Have received the following message from Lets Encrypt.

Based on a certificate request you have submitted over the last three months we believe you are using a version of Certbot (formerly known as the letsencrypt Python client) less than 0.4.1, or a different client and a version of OpenSSL less than 1.0.2. A bug which has been fixed in newer versions of both Certbot and OpenSSL causes requests produced by the buggy software to be rejected by the Let’s Encrypt server.

Due to the complexities of working around this bug we plan to introduce a hard cut off date for these malformed certificate requests of two months from this notification (November 17th, 2016) after which they will fail.

If you wish to continue issuing certificates after November 17th you must update your client software.

In order to fix this issue you must update your servers to use the newest version of Certbot, or if you are using another client, to use the most recent version of OpenSSL. Depending on which operating system you use this may be as simple as upgrading the packages using your system package manager. For more information about upgrading you can refer to this post on the community forum: https://community.letsencrypt.org/t/openssl-bug-information/19591.

If you are using a client other than Certbot you may also wish to open a support ticket for the client (if one does not already exist) so that the developers can be alerted to the issue and address it. For further information you can link them to this post on the community forum: https://community.letsencrypt.org/t/openssl-bug-information/19591.

Let's Encrypt Team

Could you please advise on how to approach this ? Do i have to work something on the le-wf gem OR update something else.

Thanks.

CSR generated using a pre-1.0.2 OpenSSL with a client that doesn't properly specify the CSR version (Acme::Client::Error::Malformed)

I get the above error when running letsencrypt-webfaction version 1.1.4.
The full traceback follows:

/home/my_user/.letsencrypt_webfaction/gems/gems/acme-client-0.3.6/lib/acme/client/faraday_middleware.rb:37:in `raise_on_error!': CSR generated using a pre-1.0.2 OpenSSL with a client that doesn't properly specify the CSR version (Acme::Client::Error::Malformed)
    from /home/my_user/.letsencrypt_webfaction/gems/gems/acme-client-0.3.6/lib/acme/client/faraday_middleware.rb:27:in `on_complete'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/acme-client-0.3.6/lib/acme/client/faraday_middleware.rb:12:in `block in call'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/response.rb:57:in `on_complete'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/acme-client-0.3.6/lib/acme/client/faraday_middleware.rb:12:in `call'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/faraday-0.9.2/lib/faraday/connection.rb:177:in `post'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/acme-client-0.3.6/lib/acme/client.rb:46:in `new_certificate'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.4/lib/letsencrypt_webfaction/application.rb:51:in `certificate'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.4/lib/letsencrypt_webfaction/application.rb:44:in `certificate_writer'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.4/lib/letsencrypt_webfaction/application.rb:27:in `run!'
    from /home/my_user/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.4/exe/letsencrypt_webfaction:5:in `<top (required)>'
    from /home/my_user/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/my_user/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

The error message seems pretty self explanatory, although without digging into the library it's not clear to me whether it's the call into acme-client that needs to be modified, or whether this is an upstream bug in acme-client.

Fails to run with acme-client >= 0.3.2

Stack trace acme-client 0.3.2:

/home/pedrokiefer/.letsencrypt_webfaction/gems/gems/acme-client-0.3.2/lib/acme/client.rb:1:in `<top (required)>': uninitialized constant Acme (NameError)
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:3:in `<top (required)>'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Stack trace acme-client 0.3.3:

/home/pedrokiefer/.letsencrypt_webfaction/gems/gems/acme-client-0.3.3/lib/acme/client.rb:1:in `<top (required)>': uninitialized constant Acme (NameError)
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:2:in `<top (required)>'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/lib/ruby22/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:3:in `<top (required)>'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
    from /home/pedrokiefer/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Unclear exception message when domains can't be validated

Message: Failed to verify statuses in 10 seconds. (RuntimeError)

Looking through the issue history, this has confused people a few times before. It's technically correct, but not really informative, in that it doesn't say why the failure occurred.

From the code, the actual check routine is in the acme-client logic, but printing a message like the following would probably help to reduce noise and give users enough information to solve the issue:

Failed to verify statuses in 10 seconds. (RuntimeError)
Verify that you can reach each of the following URLs:

SMTP Instead of Sendmail

Having issues with Sendmail:

sendmail: authentication failed (method CRAM-MD5)
sendmail: server message: 535 5.7.0 Error: authentication failed: authentication failure
sendmail: could not send mail (account default from dummy)
sendmail: authentication failed (method CRAM-MD5)
sendmail: server message: 535 5.7.0 Error: authentication failed: authentication failure
sendmail: could not send mail (account default from dummy)

I think they may have changed some of the settings - and have attempted to get Pony to use SMTP instead.

May be worth adding a flag to point to a configuration file or something that Pony would use when specified (Although I'm also having issues with using Webfactions' SMTP too).

`assign_attributes': undefined method `iso8601' for Time:Class (NoMethodError)

I followed these instructions to install and use letsencrypt-webfaction:

https://github.com/will-in-wi/letsencrypt-webfaction

The commands to install run without error, however, when I run the following command

$ letsencrypt_webfaction --account_email --domains <domain[,domain[,domain...]]> --public

with the parameters set to my needs, I get the following output:

/home/myhomedirectory/.letsencrypt_webfaction/gems/gems/acme-client-0.4.0/lib/acme/client/resources/authorization.rb:28:in `assign_attributes': undefined method `iso8601' for Time:Class (NoMethodError)

At WebFaction they advised me to contact you to resolve the issue. I hope I provided you
with sufficient information to help me solve this.

Failed to verify statuses in 10 seconds

Trying to create certs for other domains and getting error as following: Request assistance.

letsencrypt_webfaction --account_email EMAIL_ID --domains DOMAIN.COM --public ~/webapps/webapp_name/
/home/WF_ACCOUNT/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/domain_validator.rb:22:in `validate!': Failed to verify statuses in 10 seconds. (RuntimeError)
        from /home/WF_ACCOUNT/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/lib/letsencrypt_webfaction/application.rb:24:in `run!'
        from /home/WF_ACCOUNT/.letsencrypt_webfaction/gems/gems/letsencrypt_webfaction-1.1.0/exe/letsencrypt_webfaction:5:in `<top (required)>'
        from /home/WF_ACCOUNT/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `load'
        from /home/WF_ACCOUNT/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction:23:in `<main>'

Tried with other email combinations, experimenting with staging endpoint, changing other domain name, But its the same issue.

Thanks.

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.