{"id":624,"date":"2018-12-18T21:31:04","date_gmt":"2018-12-18T12:31:04","guid":{"rendered":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/?p=624"},"modified":"2022-05-21T23:51:36","modified_gmt":"2022-05-21T14:51:36","slug":"lets-encrypt%e3%81%8b%e3%82%89%e5%8f%96%e5%be%97%e3%81%97%e3%81%9f%e3%82%b5%e3%83%bc%e3%83%90%e8%a8%bc%e6%98%8e%e6%9b%b8%e3%81%ae%e6%9b%b4%e6%96%b0","status":"publish","type":"post","link":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/624","title":{"rendered":"Let&#8217;s Encrypt\u304b\u3089\u53d6\u5f97\u3057\u305f\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u306e\u66f4\u65b0"},"content":{"rendered":"\n<p>OS: Ubuntu Server 16.04.5 LTS<br>certbot 0.26.1<\/p>\n\n\n\n<p><a href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/566\">\u5617\u3066\u53d6\u5f97\u3057\u305f\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8<\/a>\u306e\u6709\u52b9\u671f\u9650\u304c30\u65e5\u3092\u5207\u308a\u66f4\u65b0\u306e\u5b9f\u65bd\u304c\u53ef\u80fd\u306b\u306a\u3063\u305f\u304b\u3089\u3092\u3053\u308c\u3092\u5b9f\u65bd\u3057\u3088\u3046\u3068\u3044\u3046\u3082\u306e\u3067\u3042\u308b\u300230\u65e5\u4ee5\u4e0a\u306e\u671f\u9650\u3092\u6b8b\u3057\u3066\u3044\u3066\u3082 <code>force-renewal<\/code> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3067\u4ee5\u3063\u3066\u5f37\u5236\u7684\u306b\u66f4\u65b0\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3042\u308b\u3051\u308c\u3069\u3082\u3001\u4eca\u822c\u306f\u30bb\u30aa\u30ea\u30fc\u901a\u308a\u3001<code>renewal<\/code> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u306b\u3088\u308b\u901a\u5e38\u306e\u66f4\u65b0\u306a\u306e\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo certbot certificates\n(snip)\nFound the following certs:\n  Certificate Name: www7390uo.sakura.ne.jp\n    Domains: www7390uo.sakura.ne.jp\n    Expiry Date: 2019-01-13 16:41:16+00:00 (<strong class=\"orange\">VALID: 29 days<\/strong>)<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert1.png\" alt=\"\" class=\"wp-image-625\" width=\"353\" height=\"437\" srcset=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert1.png 470w, https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert1-242x300.png 242w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/a><figcaption>\u56f31. \u8a3c\u660e\u66f8\u306e\u60c5\u5831<\/figcaption><\/figure><\/div>\n\n\n\n<p>\u7136\u3057\u4e4d\u3089\u3044\u3056\u8a3c\u660e\u66f8\u3092\u66f4\u65b0\u3059\u308b\u6bb5\u306b\u306a\u3063\u3066\u6539\u3081\u3066\u6709\u52b9\u671f\u9650\u3092\u78ba\u8a8d\u3059\u308b\u306889\u65e5\u9593\u306b\u306a\u3063\u3066\u3044\u3066\u307e\u3063\u305f\u304f\u9b42\u6d88\u305f\u3002\u77e5\u3089\u306c\u9593\u306b\u66f4\u65b0\u304c\u6e08\u3093\u3067\u3044\u305f\u6a21\u69d8\u3067\u3042\u308b\u3002\u6b64\u306f\u5982\u4f55\u306b\u3001\u3068\u601d\u6848\u3057\u8abf\u3079\u308b\u3068\u3069\u3046\u3084\u3089systemd\u3067\u4ee5\u3063\u3066\u81ea\u52d5\u7684\u306b\u66f4\u65b0\u3055\u308c\u308b\u3088\u3046\u624b\u914d\u3055\u308c\u3066\u3044\u305f\u3088\u3046\u3067\u3042\u308b\u3002\u95a2\u308f\u308a\u306e\u3042\u308b\u30e6\u30cb\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f2\u3064\u3067\u3001\u305d\u308c\u305e\u308c\u4e0b\u8a18\u306b\u914d\u3055\u308c\u3066\u3044\u308b\u6a21\u69d8\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/lib\/systemd\/system\/certbot.timer\n\/lib\/systemd\/system\/certbot.service<\/pre>\n\n\n\n<p><code>certbot.service<\/code> \u306b\u306f\u8a3c\u660e\u66f8\u3092\u66f4\u65b0\u3059\u308b\u30b3\u30de\u30f3\u30c9\u304c\u8a18\u8ff0\u3055\u308c\u3066\u304a\u308a\u3001\u5176\u306e\u5185\u5bb9\u306f <code>\/usr\/bin\/certbot -q renew<\/code> \u3068\u3044\u3046\u5177\u5408\u3067\u3042\u308b\u3002\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u306f <code>certbot.timer<\/code> \u306b\u3088\u3063\u3066\u652f\u914d\u3055\u308c\u3066\u304a\u308a\u3001\u6bce\u65e50\u6642\u306812\u6642\u306b0\uff5e43200\u79d2\u9593\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u79d2\u6570\u3060\u3051\u5f85\u6a5f\u3057\u3066\u304b\u3089\u767a\u52d5\u3059\u308b\u3088\u3046\u8a08\u753b\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ systemctl list-timers\nNEXT                         LEFT          LAST                         PASSED       UNIT                         ACTIVATES\nTue 2018-12-18 08:43:21 JST  6h left       Mon 2018-12-17 19:54:17 JST  5h 56min ago certbot.timer                certbot.service<\/pre>\n\n\n\n<p>\u66f4\u65b0\u306e\u969b\u306b\u306fLet&#8217;s Encrypt\u306evalidation server\u304b\u3089\u30a2\u30af\u30bb\u30b9\u304c\u3042\u308b\u304b\u3089\u3001\u53b3\u6b63\u306a\u30a2\u30af\u30bb\u30b9\u5236\u9650\u3092\u65bd\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u66f4\u65b0\u306e\u59a8\u3052\u306b\u306a\u3089\u306c\u3088\u3046\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\u3057\u3066\u3084\u3089\u306d\u3070\u306a\u3089\u306a\u3044\u3002IP\u30a2\u30c9\u30ec\u30b9\u306f13.58.30.69\u300134.213.106.112\u300152.29.173.72\u300164.78.149.164\u300166.133.109.36\u306e\u5c11\u306a\u304f\u3068\u30825\u3064\u304c\u89b3\u6e2c\u3055\u308c\u305f\u3002<\/p>\n\n\n\n<p>\u307e\u305fSystemd\u3092\u63a1\u7528\u3057\u3066\u3044\u306a\u3044Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u70ba\u306bCRON\u3067\u4ee5\u3063\u3066\u540c\u7b49\u306e\u66f4\u65b0\u51e6\u7406\u304c\u306a\u3055\u308c\u308b\u3088\u3046\u62f5\u3048\u3066\u3042\u3063\u305f\u3002\u3053\u3046\u3057\u3066\u77e5\u3089\u306c\u9593\u306b\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u304c\u66f4\u65b0\u3055\u308c\u308b\u306e\u3067\u3042\u308b\u3051\u308c\u3069\u3082\u3001Web\u30b5\u30fc\u30d0\u3092\u518d\u8d77\u52d5\u3057\u306a\u3044\u3068\u65b0\u305f\u306a\u8a3c\u660e\u66f8\u304c\u6709\u52b9\u306b\u306a\u3089\u306a\u3044\u304b\u3089\u6c17\u306b\u7559\u3081\u3066\u304a\u304b\u306d\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cat \/etc\/cron.d\/certbot\n# \/etc\/cron.d\/certbot: crontab entries for the certbot package\n(snip)\n0 *\/12 * * * root test -x \/usr\/bin\/certbot -a \\! -d \/run\/systemd\/system &amp;&amp; perl -e 'sleep int(rand(43200))' &amp;&amp; certbot -q renew<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert2.png\" alt=\"\" class=\"wp-image-626\" width=\"353\" height=\"437\" srcset=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert2.png 470w, https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-content\/uploads\/2018\/12\/update-cert2-242x300.png 242w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/a><figcaption>\u56f32. \u66f4\u65b0\u5f8c\u306e\u8a3c\u660e\u66f8\u60c5\u5831<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"link\">\u53c2\u8003:<\/h3>\n<ul>\n <li><a href=\"https:\/\/community.letsencrypt.org\/t\/cerbot-cron-job\/23895\">Cerbot cron job?<\/a><\/li>\n <li><a href=\"https:\/\/letsencrypt.readthedocs.io\/en\/latest\/using.html#automated-renewals\">Automated Renewals<\/a><\/li>\n <li><a href=\"https:\/\/wiki.archlinux.jp\/index.php\/Systemd\/%E3%82%BF%E3%82%A4%E3%83%9E%E3%83%BC#.E3.82.B5.E3.83.BC.E3.83.93.E3.82.B9.E3.83.A6.E3.83.8B.E3.83.83.E3.83.88\">systemd\/\u30bf\u30a4\u30de\u30fc<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>OS: Ubuntu Server 16.04.5 LTScertbot 0.26.1 \u5617\u3066\u53d6\u5f97\u3057\u305f\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u306e\u6709\u52b9\u671f\u9650\u304c30\u65e5\u3092\u5207\u308a\u66f4\u65b0\u306e\u5b9f\u65bd\u304c\u53ef\u80fd\u306b\u306a\u3063\u305f\u304b\u3089\u3092\u3053\u308c\u3092\u5b9f\u65bd\u3057\u3088\u3046\u3068\u3044\u3046\u3082\u306e\u3067\u3042\u308b\u300230\u65e5\u4ee5\u4e0a\u306e\u671f\u9650\u3092\u6b8b\u3057\u3066\u3044\u3066\u3082 force-renewal \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3067\u4ee5\u3063\u3066\u5f37\u5236\u7684\u306b\u66f4\u65b0\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3042\u308b\u3051\u308c\u3069\u3082\u3001\u4eca\u822c\u306f\u30bb\u30aa\u30ea\u30fc\u901a\u308a\u3001renewal \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u306b\u3088\u308b\u901a\u5e38\u306e\u66f4\u65b0\u306a\u306e\u3067\u3042\u308b\u3002  &#8230; <a title=\"Let&#8217;s Encrypt\u304b\u3089\u53d6\u5f97\u3057\u305f\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u306e\u66f4\u65b0\" class=\"read-more\" href=\"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/archives\/624\" aria-label=\"Let&#8217;s Encrypt\u304b\u3089\u53d6\u5f97\u3057\u305f\u30b5\u30fc\u30d0\u8a3c\u660e\u66f8\u306e\u66f4\u65b0 \u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8aad\u3080\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":1176,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[157],"tags":[191,192],"class_list":["post-624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-lets-encrypt","tag-192"],"views":2277,"_links":{"self":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":0,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/media\/1176"}],"wp:attachment":[{"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www7390uo.sakura.ne.jp\/wordpress\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}