mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 02:46:39 +07:00
1 line
No EOL
11 KiB
JSON
1 line
No EOL
11 KiB
JSON
{"_path":"/linux/certbot-well-known-auto-renew","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Certbot Well Known Auto Renew","description":"This is translation of article from clsv.ru, which explains how to automate certbot's well-known, also known as HTTP challenge for wildcard certs renewal.","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is translation of article from "},{"type":"element","tag":"a","props":{"href":"https://clsv.ru/linux/lets_encrypt_eto_legko_i_prosto_60","rel":["nofollow"]},"children":[{"type":"text","value":"clsv.ru"}]},{"type":"text","value":", which explains how to automate certbot's well-known, also known as HTTP challenge for wildcard certs renewal."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You'll need 4 scripts:"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Authentication script, which will write authentication file:"}]}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\necho $CERTBOT_VALIDATION > /var/www/html/.well-known/$CERTBOT_TOKEN\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\necho $CERTBOT_VALIDATION > /var/www/html/.well-known/$CERTBOT_TOKEN\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Cleanup script, that will delete that"}]}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\nrm -f /var/www/html/.well-known/$CERTBOT_TOKEN\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"#!/bin/bash\nrm -f /var/www/html/.well-known/$CERTBOT_TOKEN\n"}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Initial cert acquiring script:"}]}]},{"type":"element","tag":"code","props":{"code":"certbot certonly \\\n --preferred-challenges=http --manual \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /oath/to/clean.sh \n -d \"vault48.org,*.vault48.org\" \\\n --manual-public-ip-logging-ok\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"certbot certonly \\\n --preferred-challenges=http --manual \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /oath/to/clean.sh \n -d \"vault48.org,*.vault48.org\" \\\n --manual-public-ip-logging-ok\n"}]}]}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Renewal script itself to put it in crontab"}]}]},{"type":"element","tag":"code","props":{"code":"certbot renew --manual-public-ip-logging-ok \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /path/to/clean.sh\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"certbot renew --manual-public-ip-logging-ok \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /path/to/clean.sh\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to configure your http server to serve "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".well-known"}]},{"type":"text","value":"."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is translation of article from "},{"type":"element","tag":"a","props":{"href":"https://clsv.ru/linux/lets_encrypt_eto_legko_i_prosto_60","rel":["nofollow"]},"children":[{"type":"text","value":"clsv.ru"}]},{"type":"text","value":", which explains how to automate certbot's well-known, also known as HTTP challenge for wildcard certs renewal."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You'll need 4 scripts:"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Authentication script, which will write authentication file:"}]}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\necho $CERTBOT_VALIDATION > /var/www/html/.well-known/$CERTBOT_TOKEN\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-81a646"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-3ca3c5"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f375d2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-86cc0f"},"children":[{"type":"text","value":"CERTBOT_VALIDATION"}]},{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-c4b8e9"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" /var/www/html/.well-known/"}]},{"type":"element","tag":"span","props":{"class":"ct-f375d2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-86cc0f"},"children":[{"type":"text","value":"CERTBOT_TOKEN"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":2},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Cleanup script, that will delete that"}]}]},{"type":"element","tag":"code","props":{"code":"#!/bin/bash\nrm -f /var/www/html/.well-known/$CERTBOT_TOKEN\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-81a646"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":"rm -f /var/www/html/.well-known/"}]},{"type":"element","tag":"span","props":{"class":"ct-f375d2"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-86cc0f"},"children":[{"type":"text","value":"CERTBOT_TOKEN"}]}]}]}]}]},{"type":"element","tag":"ol","props":{"start":3},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Initial cert acquiring script:"}]}]},{"type":"element","tag":"code","props":{"code":"certbot certonly \\\n --preferred-challenges=http --manual \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /oath/to/clean.sh \n -d \"vault48.org,*.vault48.org\" \\\n --manual-public-ip-logging-ok\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":"certbot certonly \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --preferred-challenges=http --manual \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --manual-auth-hook /path/to/auth.sh \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --manual-cleanup-hook /oath/to/clean.sh "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" -d "}]},{"type":"element","tag":"span","props":{"class":"ct-637e18"},"children":[{"type":"text","value":"\"vault48.org,*.vault48.org\""}]},{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --manual-public-ip-logging-ok"}]}]}]}]}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Renewal script itself to put it in crontab"}]}]},{"type":"element","tag":"code","props":{"code":"certbot renew --manual-public-ip-logging-ok \\\n --manual-auth-hook /path/to/auth.sh \\\n --manual-cleanup-hook /path/to/clean.sh\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":"certbot renew --manual-public-ip-logging-ok \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --manual-auth-hook /path/to/auth.sh \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8ed7c8"},"children":[{"type":"text","value":" --manual-cleanup-hook /path/to/clean.sh"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Don't forget to configure your http server to serve "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":".well-known"}]},{"type":"text","value":"."}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-637e18{color:#A5D6FF}.ct-c4b8e9{color:#FF7B72}.ct-86cc0f{color:#C9D1D9}.ct-f375d2{color:#C9D1D9}.ct-8ed7c8{color:#C9D1D9}.ct-3ca3c5{color:#79C0FF}.ct-81a646{color:#8B949E}.light .ct-81a646{color:#93A1A1}.light .ct-3ca3c5{color:#268BD2}.light .ct-8ed7c8{color:#657B83}.light .ct-f375d2{color:#859900}.light .ct-86cc0f{color:#268BD2}.light .ct-c4b8e9{color:#859900}.light .ct-637e18{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Certbot well-known auto renew.md","_source":"content","_file":"Linux/Certbot well-known auto renew.md","_extension":"md"} |