{"id":850,"date":"2018-07-06T21:13:07","date_gmt":"2018-07-06T20:13:07","guid":{"rendered":"http:\/\/www.marcinwilk.eu\/?page_id=850"},"modified":"2022-06-20T19:59:00","modified_gmt":"2022-06-20T18:59:00","slug":"pure-ftpd-lets-encrypt","status":"publish","type":"page","link":"https:\/\/www.marcinwilk.eu\/en\/projects\/linux-scripts\/pure-ftpd-lets-encrypt\/","title":{"rendered":"Pure-FTPd + Let's Encrypt"},"content":{"rendered":"The script presented below allows the Pure-FTPd server to work with certificates signed with Let's Encrypt. The script compares the currently used Let's Encrypt certificate with the one used by the FTP server. If it detects changes, the script creates a new file compatible with Pure-FTPd. Script should work in the cron and check certificates periodically.<\/p>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#000000;border-radius:3px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#333333;color:#FFFFFF;border-top-left-radius:1px;border-top-right-radius:1px\">Download &amp; start (must be logged in as root):<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:1px;border-bottom-right-radius:1px\"># cd \/opt<br \/>\n# wget <a href=\"\/crtchk.sh\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.marcinwilk.eu\/crtchk.sh<\/a><br \/>\n# chmod +x crtchk.sh<\/p>\n<p>You must edit this script and set paths according to Your files position.<\/p>\n<p># vim crtchk.sh<\/p>\n<p>.\/crtchk.sh<\/div><\/div>\n<p>To make your work easier, you can add this script to the cron so you don't have to watch and run it yourself every time your certificate is renewed by Let's Encrypt.<\/p>\n<div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#000000;border-radius:3px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#333333;color:#FFFFFF;border-top-left-radius:1px;border-top-right-radius:1px\">Adding cyclic script launch every 10 minutes:<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:1px;border-bottom-right-radius:1px\"># crontab -e<\/p>\n<p>Add line:<br \/>\n*\/10 * * * * \/opt\/crtchk.sh &gt;&gt; \/dev\/null<\/p>\n<p>And save changes.<\/div><\/div>\n<p>If certificate will be updated, then there will be output log in \/var\/log\/pure-ftpd-crt.log file.\n<input class=\"fooboxshare_post_id\" type=\"hidden\" value=\"850\"\/>","protected":false},"excerpt":{"rendered":"<p>The script presented below allows the Pure-FTPd server to work with certificates signed with Let's Encrypt. The script compares the currently used Let's Encrypt certificate with the one used by the FTP server. If it detects changes, the script creates a new file compatible with Pure-FTPd. Script should work in the cron and check certificates &hellip; <a href=\"https:\/\/www.marcinwilk.eu\/en\/projects\/linux-scripts\/pure-ftpd-lets-encrypt\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> \"Pure-FTPd + Let's Encrypt\"<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1179,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-850","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/pages\/850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/comments?post=850"}],"version-history":[{"count":0,"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/pages\/850\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/pages\/1179"}],"wp:attachment":[{"href":"https:\/\/www.marcinwilk.eu\/en\/wp-json\/wp\/v2\/media?parent=850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}