{"id":4822,"date":"2026-08-29T18:40:33","date_gmt":"2026-08-29T09:40:33","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/getting-a-lets-encrypt-certificate-2\/"},"modified":"2026-08-29T18:40:34","modified_gmt":"2026-08-29T09:40:34","slug":"getting-a-lets-encrypt-certificate","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/linux-server-network\/getting-a-lets-encrypt-certificate\/","title":{"rendered":"I Tried Obtaining an SSL Certificate with Let&#8217;s Encrypt"},"content":{"rendered":"<p>Today, I&#8217;d like to share my experience using Let&#8217;s Encrypt to obtain a web server certificate. Actually, I used Let&#8217;s Encrypt for the same purpose about 10 years ago, but the environment has changed since then, and some adjustments were necessary.<\/p>\n<hr \/>\n<h2>Looking Back at Records from 10 Years Ago<\/h2>\n<p>When I set up my first web server 10 years ago, I used Let&#8217;s Encrypt to get a certificate. The command from my records back then was as follows:<button class=\"flex gap-1 items-center select-none py-1\"><\/button><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-bash\" data-lang=\"Bash\"><code>docker run -it --rm -p 443:443 -p 80:80 --name certbot quay.io\/letsencrypt\/letsencrypt:latest certonly --standalone -d {\u30c9\u30e1\u30a4\u30f3\u540d}<\/code><\/pre>\n<\/div>\n<p>Using this command allowed me to run Certbot inside a Docker container and easily obtain a certificate. However, with the passage of time, this method started running into issues&#8230;<\/p>\n<hr \/>\n<h2>The Command Doesn&#8217;t Work!<\/h2>\n<p>When I tried running this command again relying on my old records, I discovered that the Docker image hadn&#8217;t been updated in over 5 years. As a result, it wouldn&#8217;t work properly in the current environment.<\/p>\n<hr \/>\n<h2>Trying a New Approach<\/h2>\n<p>The key to obtaining a Let&#8217;s Encrypt certificate is being able to use Certbot. Therefore, I spun up a separate Docker container, installed Certbot inside it, and ran the following command:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-bash\" data-lang=\"Bash\"><code>certbot certonly --standalone -d {\u30c9\u30e1\u30a4\u30f3\u540d}<\/code><\/pre>\n<\/div>\n<div class=\"contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950\">\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"!whitespace-pre hljs language-bash\"><\/code><\/div>\n<\/div>\n<p>As a result, I was able to successfully obtain the certificate!<\/p>\n<hr \/>\n<h2>Applying the Certificate to the Web Server<\/h2>\n<p>After running the command, the certificate and private key are generated in the <code>\/etc\/letsencrypt<\/code> directory. I copied the contents of this directory to the web server and configured the web server&#8217;s configuration file to reference them.<\/p>\n<p>With this, the certificate application was complete, and HTTPS connections became possible.<\/p>\n<hr \/>\n<h2>Conclusion<\/h2>\n<p>Let&#8217;s Encrypt is a remarkably convenient tool that you can use for free, but older methods may not keep up with changing environments, requiring you to seek out the latest approaches. Here are the key takeaways from this experience:<\/p>\n<ol>\n<li>Beware of using outdated Docker images\n<ul>\n<li>This time, issues arose due to an image that hadn&#8217;t been updated in over 5 years.<\/li>\n<\/ul>\n<\/li>\n<li>Certbot is flexibly usable\n<ul>\n<li>As long as your Docker environment is set up, you can run Certbot using alternative containers.<\/li>\n<\/ul>\n<\/li>\n<li>Certificate deployment and reference configuration are required\n<ul>\n<li>Properly applying the generated certificate to your web server completes the transition to HTTPS.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Let&#8217;s Encrypt provides free and reliable certificates\u2014give it a try! Thank you for reading until the end \u2728<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I&#8217;d like to share my experience using Let&#8217;s Encrypt to obtain a web server certificate. Act [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1070,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=114","footnotes":""},"categories":[1170],"tags":[18,52,10,922],"class_list":["post-4822","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-server-network","tag-docker","tag-https","tag-server","tag-922","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4822","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=4822"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4822\/revisions"}],"predecessor-version":[{"id":4825,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/4822\/revisions\/4825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/1070"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=4822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=4822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=4822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}