Скрипты для получения wildcard-сертификата от Let's Encrypt для домена, делегированного Яндекс 360 для бизнеса.
sudo apt install curl jq
git clone https://github.com/solodyagin/certbot-dns-yandex360.git
cd ./certbot-dns-yandex360
Получите доступ к Яндекс 360 API (подробнее в документации)
- Перейдите на страницу создания приложения https://oauth.yandex.ru/client/new/
- Введите произвольное название сервиса
- Выберите платформу и в поле "Redirect URI" укажите
https://oauth.yandex.ru/verification_code
- Добавьте разрешение на управление DNS-записями
- Укажите ваш email
- Создайте приложение
- Перейдите на страницу https://oauth.yandex.ru/authorize?response_type=token&client_id=$CLIENT_ID
где $CLIENT_ID - это идентификатор созданного приложения ClientID (https://oauth.yandex.ru)- Теперь у вас есть $OAUTH_TOKEN для аутентификатора
- Перейдите на страницу https://admin.yandex.ru/company-profile
- Найдите ID в левом нижнем углу страницы
- Теперь у вас есть $ORG_ID
nano ./config.sh
Вместо example.com
укажите свой домен
sudo certbot certonly \
-d "example.com" \
-d "*.example.com" \
--email [email protected] \
--agree-tos \
--preferred-challenges dns \
--manual \
--manual-auth-hook ../certbot-dns-yandex360/authenticator.sh \
--manual-cleanup-hook ../certbot-dns-yandex360/cleanup.sh
certbot renew \
--force-renew \
--agree-tos \
--preferred-challenges dns \
--manual \
--manual-auth-hook ../certbot-dns-yandex360/authenticator.sh \
--manual-cleanup-hook ../certbot-dns-yandex360/cleanup.sh