Skip to content

solodyagin/certbot-dns-yandex360

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

certbot-dns-yandex360

Скрипты для получения wildcard-сертификата от Let's Encrypt для домена, делегированного Яндекс 360 для бизнеса.

1. Установите зависимости

sudo apt install curl jq

2. Склонируйте репозиторий

git clone https://github.com/solodyagin/certbot-dns-yandex360.git
cd ./certbot-dns-yandex360

3. Укажите учётные данные

3.1. Получите доступ к Яндекс 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 для аутентификатора
3.2. Получите идентификатор организации
3.3. Внесите полученные значения OAUTH_TOKEN и ORG_ID в config.sh
nano ./config.sh

4. Сгенерируйте wildcard-сертификат (разово)

Замените example.com на свой домен, а также замените info@example.com на свою почту

sudo certbot certonly \
	-d "example.com" \
	-d "*.example.com" \
	--email info@example.com \
	--agree-tos \
	--preferred-challenges dns \
	--manual \
	--manual-auth-hook ~/certbot-dns-yandex360/authenticator.sh \
	--manual-cleanup-hook ~/certbot-dns-yandex360/cleanup.sh

5. Периодически выпускайте новый сертификат

sudo certbot renew \
	--cert-name example.com \
	--force-renew \
	--agree-tos \
	--preferred-challenges dns \
	--manual \
	--manual-auth-hook ~/certbot-dns-yandex360/authenticator.sh \
	--manual-cleanup-hook ~/certbot-dns-yandex360/cleanup.sh

About

Yandex 360 API for certbot --manual-auth-hook --manual-cleanup-hook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%