更新dokku的letsencrypt

遇到的问题

最近新搭建一个dokku的app,需要做个SSL加密。就正常使用了dokku的letsencrypt 插件。

dokku letsencrypt newapp

然后就发现有error了

log大致长这样

=====> Let's Encrypt newapp
-----> Updating letsencrypt docker image...
latest: Pulling from dokkupaas/letsencrypt-simp_le
Digest: sha256:398e9173f8e9662df66cb6d0dfa6c6ac07f1e3d65b7994177d487d36eb9b10be
Status: Image is up to date for dokkupaas/letsencrypt-simp_le:latest
       done updating
-----> Enabling ACME proxy for yliape...
-----> Getting letsencrypt certificate for yliape...
        - Domain 'newapp.example.com'
darkhttpd/1.12, copyright (c) 2003-2016 Emil Mikulic.
listening on: http://0.0.0.0:80/
2017-12-06 01:35:49,188:INFO:__main__:1211: Generating new account key
TOS hash mismatch. Found: cc88d8d9517f490191401e7b54e9ffd12a2b9082ec7a1d4cec6101f9f1647e7b.

Debugging tips: -v improves output verbosity. Help is available under --help.
-----> Certificate retrieval failed!
-----> Disabling ACME proxy for newapp...
       done

解决方法

看了一下,发现是letsencrypt更新了tos。我们只需要更新一下dokku的插件就行了。

dokku plugin:update letsencrypt

输出:

Plugin (letsencrypt) updated

然后再使用 dokku letsencrypt newapp 就行了。