summaryrefslogtreecommitdiff
path: root/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html')
-rw-r--r--docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html79
1 files changed, 56 insertions, 23 deletions
diff --git a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
index 1bc0bb3..5d5a40f 100644
--- a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
+++ b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
@@ -2,14 +2,27 @@
<html lang="en">
<head>
- <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
+ <meta name="theme-color" content="#6a9fb5">
+
+ <title>Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt</title>
+
+ <!--
+ <link rel="stylesheet" href="https://unpkg.com/latex.css/style.min.css" />
+ -->
+
+ <link rel="stylesheet" href="/assets/c-hyde.css" />
+
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
+
<link rel="stylesheet" href="/assets/main.css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt</title>
<meta name="og:site_name" content="Navan Chauhan" />
<link rel="canonical" href="https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html" />
- <meta name="twitter:url" content="https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html />
+ <meta name="twitter:url" content="https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html" />
<meta name="og:url" content="https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html" />
<meta name="twitter:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt" />
<meta name="og:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt" />
@@ -26,35 +39,54 @@
<script data-goatcounter="https://navanchauhan.goatcounter.com/count"
async src="//gc.zgo.at/count.js"></script>
<script defer data-domain="web.navan.dev" src="https://plausible.io/js/plausible.js"></script>
- <link rel="manifest" href="manifest.json" />
+ <link rel="manifest" href="/manifest.json" />
</head>
-<body>
- <center><nav style="display: block;">
-|
-<a href="/">home</a> |
-<a href="/about/">about/links</a> |
-<a href="/posts/">posts</a> |
-<!--<a href="/publications/">publications</a> |-->
-<!--<a href="/repo/">iOS repo</a> |-->
-<a href="/feed.rss">RSS Feed</a> |
-</nav>
-</center>
-
-<main>
+<body class="theme-base-0d">
+ <div class="sidebar">
+ <div class="container sidebar-sticky">
+ <div class="sidebar-about">
+ <h1><a href="/">Navan</a></h1>
+ <p class="lead" id="random-lead">Alea iacta est.</p>
+ </div>
+
+ <ul class="sidebar-nav">
+ <li><a class="sidebar-nav-item" href="/about/">about/links</a></li>
+ <li><a class="sidebar-nav-item" href="/posts/">posts</a></li>
+ <li><a class="sidebar-nav-item" href="/3D-Designs/">3D designs</a></li>
+ <li><a class="sidebar-nav-item" href="/feed.rss">RSS Feed</a></li>
+ <li><a class="sidebar-nav-item" href="/colophon/">colophon</a></li>
+ </ul>
+ <div class="copyright"><p>&copy; 2019-2024. Navan Chauhan <br> <a href="/feed.rss">RSS</a></p></div>
+ </div>
+</div>
- <h1>Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt</h1>
+<script>
+let phrases = [
+ "Something Funny", "Veni, vidi, vici", "Alea iacta est", "In vino veritas", "Acta, non verba", "Castigat ridendo mores",
+ "Cui bono?", "Memento vivere", "अहम् ब्रह्मास्मि", "अनुगच्छतु प्रवाहं", "चरन्मार्गान्विजानाति", "coq de cheval", "我愛啤酒"
+ ];
+
+let new_phrase = phrases[Math.floor(Math.random()*phrases.length)];
+
+let lead = document.getElementById("random-lead");
+lead.innerText = new_phrase;
+</script>
+ <div class="content container">
+
+ <div class="post">
+ <h1 id="generating-https-certificate-using-dns-a-challenge-through-lets-encrypt">Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt</h1>
<p>I have a Raspberry-Pi running a Flask app through Gunicorn (Ubuntu 20.04 LTS). I am exposing it to the internet using DuckDNS.</p>
-<h2>Dependencies</h2>
+<h2 id="dependencies">Dependencies</h2>
<div class="codehilite">
<pre><span></span><code>sudo<span class="w"> </span>apt<span class="w"> </span>update<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>certbot<span class="w"> </span>-y
</code></pre>
</div>
-<h2>Get the Certificate</h2>
+<h2 id="get-the-certificate">Get the Certificate</h2>
<div class="codehilite">
<pre><span></span><code>sudo<span class="w"> </span>certbot<span class="w"> </span>certonly<span class="w"> </span>--manual<span class="w"> </span>--preferred-challenges<span class="w"> </span>dns-01<span class="w"> </span>--email<span class="w"> </span>senpai@email.com<span class="w"> </span>-d<span class="w"> </span>mydomain.duckdns.org
@@ -99,11 +131,11 @@ navanspi.duckdns.org.<span class="w"> </span><span class="m">60</span><span c
<p>Once you can ensure that the TXT record changes has been successfully applied and is visible through the <code>dig</code> command, press enter on the Certbot prompt and your certificate should be generated.</p>
-<h2>Renewing</h2>
+<h2 id="renewing">Renewing</h2>
<p>As we manually generated the certificate <code>certbot renew</code> will fail, to renew the certificate you need to simply re-generate the certificate using the above steps.</p>
-<h2>Using the Certificate with Gunicorn</h2>
+<h2 id="using-the-certificate-with-gunicorn">Using the Certificate with Gunicorn</h2>
<p>Example Gunicorn command for running a web-app:</p>
@@ -121,14 +153,15 @@ navanspi.duckdns.org.<span class="w"> </span><span class="m">60</span><span c
<p>Caveats with copying the certificate: If you renew the certificate you will have to re-copy the files</p>
+ </div>
<blockquote>If you have scrolled this far, consider subscribing to my mailing list <a href="https://listmonk.navan.dev/subscription/form">here.</a> You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.</blockquote>
<script data-isso="https://comments.navan.dev/"
src="https://comments.navan.dev/js/embed.min.js"></script>
<section id="isso-thread">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
-</main>
+ </div>
<script src="assets/manup.min.js"></script>
<script src="/pwabuilder-sw-register.js"></script>
</body>