summaryrefslogtreecommitdiff
path: root/posts/2020-11-17-Lets-Encrypt-DuckDns
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-12-01 21:09:10 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-12-01 21:09:10 +0530
commitffcdb996592117fff2be0782dfe54edd225a7c09 (patch)
treed67a70b4e408fad02ffae5488fa00763f518a9d4 /posts/2020-11-17-Lets-Encrypt-DuckDns
parent06dac0da05a3526558cb62e7f8d3de879099ad75 (diff)
Publish deploy 2020-12-01 21:09old-published-via-swiftmaster
Diffstat (limited to 'posts/2020-11-17-Lets-Encrypt-DuckDns')
-rw-r--r--posts/2020-11-17-Lets-Encrypt-DuckDns/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/posts/2020-11-17-Lets-Encrypt-DuckDns/index.html b/posts/2020-11-17-Lets-Encrypt-DuckDns/index.html
index af947fe..32cc575 100644
--- a/posts/2020-11-17-Lets-Encrypt-DuckDns/index.html
+++ b/posts/2020-11-17-Lets-Encrypt-DuckDns/index.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><title>Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan</title><meta name="twitter:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan"/><meta name="og:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan"/><meta name="description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="twitter:description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="og:description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script async src="//gc.zgo.at/count.js" data-goatcounter="https://navanchauhan.goatcounter.com/count"></script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li><li><a href="/feed.rss">RSS</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">3 minute read</span><span class="reading-time">Created on November 17, 2020</span><h1>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><pre><code><div class="highlight"><span></span>sudo apt update <span class="o">&amp;&amp;</span> sudo apt install certbot -y
+<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDns"/><title>Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan</title><meta name="twitter:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan"/><meta name="og:title" content="Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt | Navan Chauhan"/><meta name="description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="twitter:description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="og:description" content="Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS."/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script async src="//gc.zgo.at/count.js" data-goatcounter="https://navanchauhan.goatcounter.com/count"></script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li><li><a href="/feed.rss">RSS Feed</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">3 minute read</span><span class="reading-time">Created on November 17, 2020</span><h1>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><pre><code><div class="highlight"><span></span>sudo apt update <span class="o">&amp;&amp;</span> sudo apt install certbot -y
</div></code></pre><h2>Get the Certificate</h2><pre><code><div class="highlight"><span></span>sudo certbot certonly --manual --preferred-challenges dns-01 --email senpai@email.com -d mydomain.duckdns.org
</div></code></pre><p>After you accept that you are okay with you IP address being logged, it will prompt you with updating your dns record. You need to create a new <code>TXT</code> record in the DNS settings for your domain.</p><p>For DuckDNS users it is as simple as entering this URL in their browser:</p><pre><code><div class="highlight"><span></span>http://duckdns.org/update?domains<span class="o">=</span>mydomain<span class="p">&amp;</span><span class="nv">token</span><span class="o">=</span>duckdnstoken<span class="p">&amp;</span><span class="nv">txt</span><span class="o">=</span>certbotdnstxt
</div></code></pre><p>Where <code>mydomain</code> is your DuckDNS domain, <code>duckdnstoken</code> is your DuckDNS Token ( Found on the dashboard when you login) and <code>certbotdnstxt</code> is the TXT record value given by the prompt.</p><p>You can check if the TXT records have been updated by using the <code>dig</code> command:</p><pre><code><div class="highlight"><span></span>dig navanspi.duckdns.org TXT