세상을 삐딱하게 바라보는 또 다른 우리의 눈 따기닷컴
리눅스

docker letsencrypt install

설치

>>> docker pull linuxserver/letsencrypt

>>> sudo docker create \
–cap-add=NET_ADMIN \
–name=letsencrypt \
-v /mnt/data/letsencrypt/config:/config \ // 볼륨수정
-e PGID=$(id -g $USER) \
-e PUID=$UID \
-e EMAIL=<이메일수정> \
-e URL=도메인수정 \
-e SUBDOMAINS=<서브도메인1>,<서브도메인2>,<서브도메인3> \
-e ONLY_SUBDOMAINS=true \
-e VALIDATION=http \
-p 80:80 \
-p 443:443 \
-e TZ=Asia/Seoul \
–restart=unless-stopped \
linuxserver/letsencrypt

>>> 설치시 중간에 나오는 key 로 도메인 TXT 에 입력 후 인증

설치

>>> docker run -it –rm –name certbot \
-v ‘/mnt/data/letsencrypt:/etc/letsencrypt’ \
-v ‘/mnt/data/letsencrypt:/var/lib/letsencrypt’ \
certbot/certbot certonly -d 도메인.com -d *.도메인.com –manual –preferred-challenges dns –server https://acme-v02.api.letsencrypt.org/directory

갱신

docker run -it –rm –name certbot \
-v ‘/mnt/data/letsencrypt:/etc/letsencrypt’ \
-v ‘/mnt/data/letsencrypt:/var/lib/letsencrypt’ \
certbot/certbot renew –manual –preferred-challenges dns –server https://acme-v02.api.letsencrypt.org/directory