<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ashwin Belbase</title>
    <description>The latest articles on DEV Community by Ashwin Belbase (@shad0wcrawl3r).</description>
    <link>https://dev.to/shad0wcrawl3r</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F987806%2Fe63f63a1-bd4e-44ed-9cfe-82b50e8dcfe9.png</url>
      <title>DEV Community: Ashwin Belbase</title>
      <link>https://dev.to/shad0wcrawl3r</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shad0wcrawl3r"/>
    <language>en</language>
    <item>
      <title>Setting up a Homelab: Part 1 Proxmox and LetsEncrypt</title>
      <dc:creator>Ashwin Belbase</dc:creator>
      <pubDate>Fri, 26 Apr 2024 13:51:40 +0000</pubDate>
      <link>https://dev.to/shad0wcrawl3r/setting-up-a-homelab-part-1-proxmox-and-letsencrypt-3jn8</link>
      <guid>https://dev.to/shad0wcrawl3r/setting-up-a-homelab-part-1-proxmox-and-letsencrypt-3jn8</guid>
      <description>&lt;p&gt;As someone who likes to tinker around with stuff, I tend to break my system quite often. For a long time, I have wanted to allow myself to test applications and operating systems without breaking my ongoing OS install.&lt;br&gt;&lt;br&gt;
One way to test application is by using virtual machines or docker. While I use docker quite a lot for testing and for production workloads, testing an entire operating system on docker is not feasible. For this reason, I wanted to use virtual machines. But I also did not want to run Virtual Machines on my laptop, as I do not like my laptop getting hot everytime I want to test something new. Recently, I got my hands on a used desktop, a decent machine on which I could start building my home lab.&lt;br&gt;&lt;br&gt;
As I wanted to run a bunch of Virtual Machines and containers on the server, Proxmox seemed to be a good fit as it supports both VMs and Containers using KVM and LXC.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;P.S. This is not supposed to be a tutorial. I only wrote this piece so that I can look back on it after a year and hopefully remember how I did stuff.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;To install Proxmox VE, I just followed the documentation on the Proxmox website and completed a standard installation. As the installer is straightforward, the installation itself was quite easy. &lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;Right after I installed Proxmox, I tried logging into the web console, and I saw this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo74vy7ec6dgj805niah5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo74vy7ec6dgj805niah5.png" alt="Insecure Connection: Invalid Common Name Warning" width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A self-signed certificate was generated and used by Proxmox which will always generate a warning on the browser. I did not like seeing this when trying to work on my home lab. So, I started looking for ways to put a valid SSL certificate in Proxmox.&lt;br&gt;&lt;br&gt;
During my research, I found that Proxmox could be made to integrate with &lt;a href="https://github.com/acmesh-official/acme.sh" rel="noopener noreferrer"&gt;acme.sh&lt;/a&gt;; a free SSL certificate generator powered by ACME(Let's Encrypt).&lt;/p&gt;

&lt;h3&gt;
  
  
  Generate and Apply SSL Certificate
&lt;/h3&gt;

&lt;p&gt;Docs: &lt;a href="https://pve.proxmox.com/wiki/Certificate_Management" rel="noopener noreferrer"&gt;https://pve.proxmox.com/wiki/Certificate_Management&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After skimming through the documentation, I thought that the integration would be quite easy, and indeed it was, after a couple of failed attempts.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can register and deactivate ACME accounts over the web interface Datacenter -&amp;gt; ACME or using the pvenode command-line tool.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Following this excerpt from the documentation, I went to &lt;code&gt;Datacenter -&amp;gt; ACME -&amp;gt; Accounts -&amp;gt; Add&lt;/code&gt;, and registered an account with Lets Encrypt V2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1e7ghuhztbw1i0promb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1e7ghuhztbw1i0promb.png" alt="Add ACME Account" width="459" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since The Proxmox instance was not accessible directly from the public internet, I proceeded to add the plugin for DNS challenge based verification.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To add a Challenge Plugin:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the challenge plugins section, click on Add.
&lt;/li&gt;
&lt;li&gt;In the popup that appears, give a name to the plugin that you will create in the Plugin ID section. Remember this value as the PLUGIN_NAME.
&lt;/li&gt;
&lt;li&gt;Set the &lt;code&gt;DNS API&lt;/code&gt; option to DNS provider, and fill in the generated form as required. Then clock on save. &lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;In my case, I am using Cloudflare, so I filled in the CF_Account_ID, CF_Email, CF_Token and CF_Zone_ID fields.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt0qewqxi4vtxjbh46q7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt0qewqxi4vtxjbh46q7.png" alt="Challenge Plugin" width="554" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You might only need the CF_TOKEN but the process failed due to some reason when only the CF_TOKEN was used. So I filled in all the applicable fields. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, to generate the certificated for a node, you need to go to the &lt;code&gt;Datacenter -&amp;gt; NODE_NAME -&amp;gt; System -&amp;gt; Certificates&lt;/code&gt; to generate/setup the certificate. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the ACME Section, Click on Add. &lt;/li&gt;
&lt;li&gt;In the popup that appears, select challenge type as DNS, and the Plugin type as the name that you used when creating the DNS plugin (PLUGIN_NAME). &lt;/li&gt;
&lt;li&gt;In the domain field, fill in the domain name that you want to generate the SSL certificate for. Now click on apply. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw5dcs6r3qgq8yhkn1q2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw5dcs6r3qgq8yhkn1q2.png" alt="SSL Certificate Creation" width="455" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The certificate should be generated and applied. Proxmox will restart the webproxy to apply the new certificate.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lvi6nk1hs0qpyajnmuc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0lvi6nk1hs0qpyajnmuc.png" alt="SSL Certificate Description" width="550" height="675"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>homelab</category>
      <category>proxmox</category>
      <category>letsencrypt</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
