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-a4046e"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-98da3d"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f42651"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-698d1a"},"children":[{"type":"text","value":"CERTBOT_VALIDATION"}]},{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-f170fc"},"children":[{"type":"text","value":">"}]},{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":" /var/www/html/.well-known/"}]},{"type":"element","tag":"span","props":{"class":"ct-f42651"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-698d1a"},"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-a4046e"},"children":[{"type":"text","value":"#!/bin/bash"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":"rm -f /var/www/html/.well-known/"}]},{"type":"element","tag":"span","props":{"class":"ct-f42651"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"class":"ct-698d1a"},"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-83c20d"},"children":[{"type":"text","value":"certbot certonly \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":" --preferred-challenges=http --manual \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"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-83c20d"},"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-83c20d"},"children":[{"type":"text","value":" -d "}]},{"type":"element","tag":"span","props":{"class":"ct-a8b618"},"children":[{"type":"text","value":"\"vault48.org,*.vault48.org\""}]},{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"children":[{"type":"text","value":" \\"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-83c20d"},"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-83c20d"},"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-83c20d"},"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-83c20d"},"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-a8b618{color:#A5D6FF}.ct-f170fc{color:#FF7B72}.ct-698d1a{color:#C9D1D9}.ct-f42651{color:#C9D1D9}.ct-83c20d{color:#C9D1D9}.ct-98da3d{color:#79C0FF}.ct-a4046e{color:#8B949E}.light .ct-a4046e{color:#93A1A1}.light .ct-98da3d{color:#268BD2}.light .ct-83c20d{color:#657B83}.light .ct-f42651{color:#859900}.light .ct-698d1a{color:#268BD2}.light .ct-f170fc{color:#859900}.light .ct-a8b618{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"} |