<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Selfhosting &#8211; AADSIT.COM</title>
	<atom:link href="https://aadsit.com/category/selfhosting/feed/" rel="self" type="application/rss+xml" />
	<link>https://aadsit.com</link>
	<description>Homelab, Selfhosting, 3D and More</description>
	<lastBuildDate>Mon, 20 Jan 2025 15:15:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>Nginx Reverse Proxy Guide for Self-Hosted Services</title>
		<link>https://aadsit.com/selfhosting/143/</link>
					<comments>https://aadsit.com/selfhosting/143/#respond</comments>
		
		<dc:creator><![CDATA[AADSIT]]></dc:creator>
		<pubDate>Mon, 20 Jan 2025 04:40:50 +0000</pubDate>
				<category><![CDATA[Selfhosting]]></category>
		<guid isPermaLink="false">https://aadsit.com/?p=143</guid>

					<description><![CDATA[<p>When it comes to self-hosting, having services available by their IP address and port number can be a hassle [&#8230;]</p>
<p>&lt;p&gt;The post <a rel="nofollow" href="https://aadsit.com/selfhosting/143/">Nginx Reverse Proxy Guide for Self-Hosted Services</a> first appeared on <a rel="nofollow" href="https://aadsit.com">AADSIT.COM</a>.&lt;/p&gt;</p>
]]></description>
										<content:encoded><![CDATA[
<p>When it comes to self-hosting, having services available by their IP address and port number can be a hassle to keep track of. A much more practical solution is to use a Reverse Proxy, which receives requests for a site and acts as an intermediary to connect your request to the right server.</p>



<p><strong>What is a Nginx Reverse Proxy?</strong></p>



<p>A Nginx reverse proxy server is a powerful tool that&#8217;s designed to handle large volumes of traffic while keeping your infrastructure organized. As a web server tool, it&#8217;s often used for hosting websites directly, but its capabilities don&#8217;t stop there. With Nginx&#8217;s Proxy Pass configuration, you can pass requests to another URL or IP/port combination &#8211; even implement load balancing.</p>



<p><strong>Why Choose Nginx as Your Reverse Proxy?</strong></p>



<p>There are many reasons why Nginx is a top choice among web developers and sysadmins. Some of the key benefits include:</p>



<ul class="wp-block-list">
<li><strong>High performance </strong>: Nginx is designed to handle large volumes of traffic while keeping your infrastructure organized.</li>



<li><strong>Load balancing </strong>: With Nginx, you can easily implement load balancing to distribute traffic across multiple servers.</li>



<li><strong>SSL termination </strong>: Nginx makes it easy to terminate SSL certificates and ensure secure connections between clients and servers.</li>
</ul>



<p><strong>Prerequisites</strong></p>



<ol start="1" class="wp-block-list">
<li><strong>Domain Registration </strong>: You should have a registered domain name (e.g., aadsit.com) and ensure that it is correctly pointed to your server. If you have a dynamic IP address I highly recommend setting up a dynamic DNS client!</li>



<li><strong>Public IP Address </strong>: Your server should have a publicly accessible IP address (i.e., not behind a Carrier Grade NAT or firewall ISP).</li>



<li><strong>Proxmox/Networking Setup </strong>: Familiarity with Proxmox or other virtualization software, as well as basic networking concepts (e.g., subnets, ports, etc.) is assumed.</li>
</ol>



<p><strong>Setting Up a Nginx Reverse Proxy Server with Certbot</strong></p>



<p>In my setup, I use two separate Nginx servers: one handles public-facing traffic, while the other is for internal-only traffic. This post focuses on setting up the public-facing Nginx reverse proxy server using <a href="https://certbot.eff.org/" target="_blank" rel="noreferrer noopener">Certbot </a>to obtain Let&#8217;s Encrypt certificates. By following this guide, you&#8217;ll learn how to:</p>



<ul class="wp-block-list">
<li>Set up a Nginx reverse proxy server</li>



<li>Obtain free SSL certificates from Let&#8217;s Encrypt using Certbot</li>
</ul>



<p>To begin we will discuss our lab environment and dive into creating a host for our server. At home I run a Proxmox cluster with High Availability, with most of my servers being virtual machines. In this demo, we will be setting up an individual LXC container for low overhead and quick setup.</p>



<p>The host server is &#8220;Atacama&#8221;:</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="539" height="249" src="https://aadsit.com/wp-content/uploads/2025/01/image-1.png" alt="" class="wp-image-150" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-1.png 539w, https://aadsit.com/wp-content/uploads/2025/01/image-1-300x139.png 300w" sizes="(max-width: 539px) 100vw, 539px" /></figure>



<p>This article doesn&#8217;t cover Proxmox or networking basics and assumes you have these covered. We will create a new LXC container for our demo. I&#8217;m using the ubuntu-22.04-standard image as that is what I have readily downloaded. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="573" height="183" src="https://aadsit.com/wp-content/uploads/2025/01/image-2.png" alt="" class="wp-image-151" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-2.png 573w, https://aadsit.com/wp-content/uploads/2025/01/image-2-300x96.png 300w" sizes="(max-width: 573px) 100vw, 573px" /></figure>



<p>We will get signed into the server and run apt-update to get a list of current packages</p>



<figure class="wp-block-image size-full"><img decoding="async" width="705" height="382" src="https://aadsit.com/wp-content/uploads/2025/01/image-4.png" alt="" class="wp-image-154" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-4.png 705w, https://aadsit.com/wp-content/uploads/2025/01/image-4-300x163.png 300w" sizes="(max-width: 705px) 100vw, 705px" /></figure>



<p>It&#8217;s good practice to get everything updated before continuing, so we will go ahead and run apt full-upgrade -y</p>



<figure class="wp-block-image size-full"><img decoding="async" width="559" height="158" src="https://aadsit.com/wp-content/uploads/2025/01/image-5.png" alt="" class="wp-image-155" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-5.png 559w, https://aadsit.com/wp-content/uploads/2025/01/image-5-300x85.png 300w" sizes="(max-width: 559px) 100vw, 559px" /></figure>



<p>Now that everything is updated we will install Nginx and Certbot, including the module for certbot to interact with Nginx.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="662" height="212" src="https://aadsit.com/wp-content/uploads/2025/01/image-8.png" alt="" class="wp-image-159" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-8.png 662w, https://aadsit.com/wp-content/uploads/2025/01/image-8-300x96.png 300w" sizes="(max-width: 662px) 100vw, 662px" /></figure>



<p>Now that the packages are installed, we need to enable Nnginx to run as a service with &#8220;sudo systemctl enable nginx&#8221;, and then start the service after. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="952" height="96" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035408.png" alt="" class="wp-image-161" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035408.png 952w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035408-300x30.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035408-768x77.png 768w" sizes="(max-width: 952px) 100vw, 952px" /></figure>



<p>Our server is sitting at 192.168.2.3. Specifying HTTP, NOT HTTPS, we see a welcome screen! </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="284" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035521-1024x284.png" alt="" class="wp-image-163" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035521-1024x284.png 1024w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035521-300x83.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035521-768x213.png 768w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-035521.png 1092w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As the focus of this is on setting up a reverse proxy, let&#8217;s next discuss our target. I choose to have a different virtual machine run Docker, hosting websites and similar services in a containerized environment. Without going into the details, this provides easy snapshotting, backups, and even high-availability and live migrations when I do server maintenance. This server is at 192.168.2.8, and I have a WordPress website running on port 9080. We can set up a basic Proxy in Nginx by creating a new file in /etc/nginx/sites-available, such as &#8220;demo&#8221;. I like to use the full name for my configuration files, and this will be a sub domain of aadsit.com, so I will call this &#8220;demo.aadsit.com&#8221;. The text in the &#8220;Demo.aadsit.com&#8221; file:</p>



<pre class="wp-block-code"><code>server {
    server_name demo.aadsit.com;
    listen 80;
    location / {
        proxy_pass http://192.168.2.8:9080;
        client_max_body_size 800M;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port $server_port;
    }


}


</code></pre>



<p class="has-large-font-size"></p>



<h1 class="wp-block-heading">Explained</h1>



<h2 class="wp-block-heading">Server Block</h2>



<p><em>server { </em>: Starting point for an individual server block.<br><em>server_name demo.aadsit.com</em>;: Specifies the domain name that this server block should respond to.<br><em>listen 80</em>;: Tells nginx to listen on port 80 (the standard HTTP port).</p>



<h2 class="wp-block-heading"><strong>Location Block</strong></h2>



<ul class="wp-block-list">
<li><code><em>location /</em> {</code> : Specifies the URL path or pattern that should be handled by this server block (in this case, requests made to <code>/</code>).</li>



<li><code><em>proxy_pass http://192.168.2.8:9080;</em></code>: Forwards incoming traffic to a service located at <code>http://192.168.2.8:9080</code>.</li>



<li><code><em>client_max_body_size 800M;</em></code>: Sets the maximum body size that can be transferred from the client to 800 megabytes. This can be any value, I usually set it to at least a few MB. </li>
</ul>



<h2 class="wp-block-heading"><strong>Proxy Header Settings</strong></h2>



<p>These settings preserve and manipulate information about the original request:</p>



<ul class="wp-block-list">
<li><code><em>proxy_set_header Upgrade</em> <em>$http_upgrade</em>;</code> &amp; <code><em>proxy_set_header Connection "upgrade"</em>;</code>: Set up headers for WebSockets upgrades</li>



<li>Copying specific headers from the original request to the proxied server:
<ul class="wp-block-list">
<li><code>p<em>roxy_set_header Host $host;</em></code></li>



<li><code><em>proxy_set_header X-Real-IP $remote_addr;</em></code></li>



<li><code><em>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</em></code></li>



<li><code><em>proxy_set_header X-Forwarded-Proto $scheme;</em></code></li>



<li><code><em>proxy_set_header X-Forwarded-Host $host;</em></code></li>



<li><code><em>proxy_set_header X-Forwarded-Port $server_port;</em></code></li>
</ul>
</li>
</ul>



<p>After creating the configuration file, you have to link it into the sites-enabled folder. You can do this with &#8220;ln -s&#8221; to create a soft link, as shown below. This is a common way of implementing configuration files, as it allows you to update a file in one spot and be reflected in multiple spots, or otherwise unlink a file without deleting it. I use a script to link all .com and similar website configuration files in one go. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="157" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040551-1024x157.png" alt="" class="wp-image-164" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040551-1024x157.png 1024w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040551-300x46.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040551-768x118.png 768w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040551.png 1107w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>After that let&#8217;s restart Nginx with systemctl restart nginx</p>



<figure class="wp-block-image size-full"><img decoding="async" width="698" height="44" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040719.png" alt="" class="wp-image-167" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040719.png 698w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040719-300x19.png 300w" sizes="(max-width: 698px) 100vw, 698px" /></figure>



<p>Now NGINX is listening and will pass traffic to the target server! We can test this internally by adding &#8220;demo.aadsit.com&#8221; to our hosts file, as shown (in Windows):</p>



<figure class="wp-block-image size-full"><img decoding="async" width="549" height="231" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040900.png" alt="" class="wp-image-168" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040900.png 549w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040900-300x126.png 300w" sizes="(max-width: 549px) 100vw, 549px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="465" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040911-1024x465.png" alt="" class="wp-image-170" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040911-1024x465.png 1024w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040911-300x136.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040911-768x349.png 768w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-040911.png 1202w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>&#8220;You might realize now that your reverse proxy is only reachable internally. That may be a good stopping point for some people, but our goal is to make this externally available! If you&#8217;re just setting up an internal-only reverse proxy and don&#8217;t need public HTTPS encryption, you can consider it complete. However, if you want publicly signed certificates for your website (for HTTPS encryption), the easiest way that we&#8217;ve already set ourselves up for is to use Let&#8217;s Encrypt via Certbot!</p>



<p>Note: Alternatively, if this is an internal-only reverse proxy, visitors can use a certificate signed by a private certificate authority instead.<a href="https://aadsit.com/uncategorized/103/"> Installing the certificate authority on their computer </a>will allow them to see the website as trusted.</p>



<p>I already have DNS in place for demo.aadsit.com to reach my external IP address: </p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="346" height="144" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041107.png" alt="" class="wp-image-171" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041107.png 346w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041107-300x125.png 300w" sizes="(max-width: 346px) 100vw, 346px" /></figure></div>


<p>The next step is to set up SNAT or Port Forwarding on my firewall to direct traffic to the server. In my case, I use Aliases as much as possible, and have an alias &#8220;WebTraffic_Ports&#8221; with port 80 and 443, HTTP and HTTPS respectively. Both are important to have! Your specific situation may vary, and if you do not have a public IP address you will not be able to do this. (Note: if you also use PfSense or other more-capable firewalls, you may need to find and enable the settings for &#8220;NAT Reflection&#8221; to reach websites internally. )</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="62" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041300-1024x62.png" alt="" class="wp-image-173" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041300-1024x62.png 1024w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041300-300x18.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041300-768x46.png 768w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041300.png 1256w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Once we have external access to our website set up, let&#8217;s get some certificates generated! On our demo server we will run &#8220;certbot &#8211;nginx&#8221; </p>



<figure class="wp-block-image size-full"><img decoding="async" width="756" height="479" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041904.png" alt="" class="wp-image-177" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041904.png 756w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-041904-300x190.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></figure>



<p>You will be prompted to answer several questions, and then given a list of server names found in your configuration files. If you have multiple sites being hosted, you can submit a request for all of them in one go. It will then provide a single certificate with all sites included as &#8220;subject alternative names&#8221;. </p>



<p>The next step is to set up SNAT or Port Forwarding on your firewall to direct traffic to the server. However, this step may fail if port 80 is not forwarded to your server correctly! You may also encounter issues if you have geo-blocking or other restrictions in place, which can prevent the Automated Certificate Management Environment (ACME) protocol used by Certbot from completing.</p>



<p>If everything goes well, Certbot will automatically generate the certificate with LetsEncrypt and update your configuration file!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="920" height="240" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042310.png" alt="" class="wp-image-183" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042310.png 920w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042310-300x78.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042310-768x200.png 768w" sizes="(max-width: 920px) 100vw, 920px" /></figure>



<p>You can see that now we have a section listening to port 80 which replies with a redirect to our site with HTTPS, and now it listens at 443 with the letsencrypt certificate! </p>



<figure class="wp-block-image size-full"><img decoding="async" width="902" height="667" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042244.png" alt="" class="wp-image-181" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042244.png 902w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042244-300x222.png 300w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042244-768x568.png 768w" sizes="(max-width: 902px) 100vw, 902px" /></figure>



<p>Finally, try going to your site (ensure you&#8217;ve removed the hosts file entry or local dns if you tried it!) and ensure that you are redirected to HTTPS. In this case, DEMO.AADSIT.COM is failing to load images resources as they are actually at AADSIT.COM, which is offline while I do this demonstration. <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>



<figure class="wp-block-image size-full"><img decoding="async" width="550" height="363" src="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042430.png" alt="" class="wp-image-184" srcset="https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042430.png 550w, https://aadsit.com/wp-content/uploads/2025/01/image-20250120-042430-300x198.png 300w" sizes="(max-width: 550px) 100vw, 550px" /></figure>



<p>In this article, we&#8217;ve covered the basics of setting up a Nginx reverse proxy server on an LXC container using Proxmox as our virtualization platform. We walked through the process of obtaining free SSL certificates from Let&#8217;s Encrypt using Certbot, setting up a basic Nginx configuration to proxy requests to the target server, and configuring the target server to receive traffic.</p>



<p>And that&#8217;s it! With these steps, you should now have a functional reverse proxy setup using Nginx on an LXC container running on Proxmox. This is just the tip of the iceberg &#8211; there are many ways to customize and optimize your reverse proxy setup for your specific needs.</p>



<p>Thanks for reading, and happy self-hosting! </p>



<p>Created with my co-editor Llama3.1 8b running on an Nvidia P4, which was a lot of fun! </p>



<p></p>
<p>&lt;p&gt;The post <a rel="nofollow" href="https://aadsit.com/selfhosting/143/">Nginx Reverse Proxy Guide for Self-Hosted Services</a> first appeared on <a rel="nofollow" href="https://aadsit.com">AADSIT.COM</a>.&lt;/p&gt;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://aadsit.com/selfhosting/143/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Installing Trusted Certificate Authority with JumpCloud</title>
		<link>https://aadsit.com/selfhosting/103/</link>
					<comments>https://aadsit.com/selfhosting/103/#respond</comments>
		
		<dc:creator><![CDATA[AADSIT]]></dc:creator>
		<pubDate>Tue, 21 Mar 2023 00:19:29 +0000</pubDate>
				<category><![CDATA[Selfhosting]]></category>
		<guid isPermaLink="false">https://aadsit.com/?p=103</guid>

					<description><![CDATA[<p>JumpCloud is an up and coming Cloud based user and computer management system, providing online LDAP and RADIUS authentication [&#8230;]</p>
<p>&lt;p&gt;The post <a rel="nofollow" href="https://aadsit.com/selfhosting/103/">Installing Trusted Certificate Authority with JumpCloud</a> first appeared on <a rel="nofollow" href="https://aadsit.com">AADSIT.COM</a>.&lt;/p&gt;</p>
]]></description>
										<content:encoded><![CDATA[
<p>JumpCloud is an up and coming Cloud based user and computer management system, providing online LDAP and RADIUS authentication with bits of RMM and SSO. While JumpCloud has it&#8217;s quirks and can only manage local accounts, it can be an appropriate solution for small decentralized businesses that don&#8217;t have the need for a more traditional Active Directory domain. Additionally, as long as the machine has internet access, MFA, BitLocker, and remote wipe functionality can all help keep company or family data secure. </p>



<p>While it&#8217;s uncommon to see a need for a private Certificate Authority to be installed on a decentralized work force, there may still be the occasion where you have internal resources that you want to have a valid SSL certificate on but do not want to, or cannot, use a Let&#8217;s Encrypt certificate from the web. </p>



<p></p>



<p>In my case it makes my life a tiny bit easier to use pfSense to manage certificates and create a wildcard certificate for my local domain, giving me an easy to install option for local services not running through my web-accessible reverse proxy. For example, we use Paperless-NGX for document management and I would rather keep that as far away from the internet as possible. </p>



<p>In JumpCloud, every two hours the following command runs: </p>



<pre class="wp-block-code has-cyan-bluish-gray-background-color has-background"><code>::https://learn.microsoft.com/en-us/powershell/module/pki/import-certificate?view=windowsserver2022-ps

Import-Certificate -FilePath "C:\Windows\Temp\AADSIT-SUB1-CA.crt" -CertStoreLocation Cert:\LocalMachine\Root
</code></pre>



<p><sub>You might notice, I make it a habit to start code with comments linking to any reference material used in case I need it again <s>and Microsoft hasn&#8217;t broken the link yet.</s> </sub></p>



<p>This is configured as so, applied to all relevant device groups for my home: </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="468" src="https://aadsit.com/wp-content/uploads/2023/03/image-33-1024x468.png" alt="" class="wp-image-104" srcset="https://aadsit.com/wp-content/uploads/2023/03/image-33-1024x468.png 1024w, https://aadsit.com/wp-content/uploads/2023/03/image-33-300x137.png 300w, https://aadsit.com/wp-content/uploads/2023/03/image-33-768x351.png 768w, https://aadsit.com/wp-content/uploads/2023/03/image-33.png 1113w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>JumpCloud allows you to upload files &lt;1MB in size, a .crt is an easy task for this. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="822" height="217" src="https://aadsit.com/wp-content/uploads/2023/03/image-34.png" alt="" class="wp-image-105" srcset="https://aadsit.com/wp-content/uploads/2023/03/image-34.png 822w, https://aadsit.com/wp-content/uploads/2023/03/image-34-300x79.png 300w, https://aadsit.com/wp-content/uploads/2023/03/image-34-768x203.png 768w" sizes="(max-width: 822px) 100vw, 822px" /></figure>



<p>After manually running, we can check the results to confirm that the certificate installation exited with Powershell Code 0, or successful completion: </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="86" src="https://aadsit.com/wp-content/uploads/2023/03/image-35-1024x86.png" alt="" class="wp-image-106" srcset="https://aadsit.com/wp-content/uploads/2023/03/image-35-1024x86.png 1024w, https://aadsit.com/wp-content/uploads/2023/03/image-35-300x25.png 300w, https://aadsit.com/wp-content/uploads/2023/03/image-35-768x64.png 768w, https://aadsit.com/wp-content/uploads/2023/03/image-35.png 1315w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>And indeed we can see this certificate authority is now in the Machine Certificates:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="984" height="133" src="https://aadsit.com/wp-content/uploads/2023/03/image-36.png" alt="" class="wp-image-107" srcset="https://aadsit.com/wp-content/uploads/2023/03/image-36.png 984w, https://aadsit.com/wp-content/uploads/2023/03/image-36-300x41.png 300w, https://aadsit.com/wp-content/uploads/2023/03/image-36-768x104.png 768w" sizes="(max-width: 984px) 100vw, 984px" /></figure>



<p>Now so long as we reach a server through DNS at the correct port we will have a valid certificate and no warning for our users: </p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="347" height="269" src="https://aadsit.com/wp-content/uploads/2023/03/image-38.png" alt="" class="wp-image-109" srcset="https://aadsit.com/wp-content/uploads/2023/03/image-38.png 347w, https://aadsit.com/wp-content/uploads/2023/03/image-38-300x233.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></figure></div>


<p>If you&#8217;re pretty new to certificates and stumbled your way into here, please note that the DNS part is pretty important. If the server certificate says &#8220;I am xyz.local&#8221; but your browser is looking for &#8220;192.168.0.1&#8221;, they won&#8217;t match and you will get an warning unless the certificate has a matching Subject Alternative Name. </p>



<p>If you are interested but haven&#8217;t learned how to set up a certificate authority yet, there are a plenty of videos on YouTube that discuss the process. Find one that closely matches your setup; if you have an AD server then AD Certificate Services may be best for you, or if you have pfSense or opnSense you can use that. I believe you can also install the Certificate Services function in regular Windows 10 so there&#8217;s no hurdle too difficult to get over to start learning.</p>



<p></p>
<p>&lt;p&gt;The post <a rel="nofollow" href="https://aadsit.com/selfhosting/103/">Installing Trusted Certificate Authority with JumpCloud</a> first appeared on <a rel="nofollow" href="https://aadsit.com">AADSIT.COM</a>.&lt;/p&gt;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://aadsit.com/selfhosting/103/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
