<?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>Forem: Prajwol Adhikari</title>
    <description>The latest articles on Forem by Prajwol Adhikari (@prajwol-ad).</description>
    <link>https://forem.com/prajwol-ad</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%2F2832799%2F1a77016f-6d1e-4f3e-80b7-fce915def15f.jpg</url>
      <title>Forem: Prajwol Adhikari</title>
      <link>https://forem.com/prajwol-ad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/prajwol-ad"/>
    <language>en</language>
    <item>
      <title>Your Personal Internet Guardian: How to Build a FREE Ad-Blocker in the Cloud! 🚀</title>
      <dc:creator>Prajwol Adhikari</dc:creator>
      <pubDate>Tue, 26 Aug 2025 04:21:23 +0000</pubDate>
      <link>https://forem.com/prajwol-ad/your-personal-internet-guardian-how-to-build-a-free-ad-blocker-in-the-cloud-43jb</link>
      <guid>https://forem.com/prajwol-ad/your-personal-internet-guardian-how-to-build-a-free-ad-blocker-in-the-cloud-43jb</guid>
      <description>&lt;p&gt;Hey everyone! A while back, I wrote a guide on setting up AdGuard Home on Linode. The world of tech moves fast, and it's time for an upgrade! Today, we're going to build our own powerful, network-wide ad-blocker using &lt;strong&gt;Amazon Web Services (AWS)&lt;/strong&gt;, and we'll make it secure with our own domain and SSL certificate.&lt;/p&gt;

&lt;p&gt;Think of this as building a digital gatekeeper for your internet. Before any ads, trackers, or malicious sites can reach your devices, our AdGuard Home server will slam the door shut. The best part? This works on your phone, laptop, smart TV—anything on your network—without installing a single app on them.&lt;/p&gt;

&lt;p&gt;This guide is for everyone, from seasoned tech wizards to curious beginners. We'll break down every step in simple terms, so grab a coffee, and let's build something awesome!&lt;/p&gt;




&lt;h3&gt;
  
  
  ## Chapter 1: Building Our Home in the AWS Cloud ☁️
&lt;/h3&gt;

&lt;p&gt;First, we need a server. We'll use an &lt;strong&gt;Amazon EC2 instance&lt;/strong&gt;, which is just a fancy name for a virtual computer that you rent.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sign Up for AWS:&lt;/strong&gt; If you don't have an account, head to the &lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;AWS website&lt;/a&gt; and sign up. You'll need a credit card for verification, but for this guide, we can often stay within the Free Tier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Launch Your EC2 Instance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to your AWS Console and search for &lt;strong&gt;EC2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Launch instance"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name:&lt;/strong&gt; Give your server a cool name, like &lt;code&gt;AdGuard-Server&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application and OS Images:&lt;/strong&gt; In the search bar, type &lt;code&gt;Debian&lt;/code&gt; and select the latest version (e.g., Debian 12). Make sure it's marked "Free tier eligible".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instance Type:&lt;/strong&gt; Choose &lt;strong&gt;&lt;code&gt;t2.micro&lt;/code&gt;&lt;/strong&gt;. This is your free, trusty little server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Pair (for login):&lt;/strong&gt; This is your digital key to the server's front door. Click &lt;strong&gt;"Create a new key pair"&lt;/strong&gt;, name it something like &lt;code&gt;my-adguard-key&lt;/code&gt;, and &lt;strong&gt;download the &lt;code&gt;.pem&lt;/code&gt; file&lt;/strong&gt;. Keep this file secret and safe!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network settings (The Firewall):&lt;/strong&gt; This is crucial. We need to tell our server which doors to open. Click &lt;strong&gt;"Edit"&lt;/strong&gt;.

&lt;ul&gt;
&lt;li&gt;Check the box for &lt;strong&gt;"Allow SSH traffic from"&lt;/strong&gt; and select &lt;strong&gt;&lt;code&gt;My IP&lt;/code&gt;&lt;/strong&gt;. This lets you securely log in.&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;"Allow HTTPS traffic from the internet"&lt;/strong&gt; and &lt;strong&gt;"Allow HTTP traffic from the internet"&lt;/strong&gt;. We'll need these for our secure dashboard later.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Launch It!&lt;/strong&gt; Hit the "Launch instance" button and watch as your new cloud server comes to life.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Give Your Server a Permanent Address (Elastic IP):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By default, your server's public IP address will change every time it reboots. Let's make it permanent!&lt;/li&gt;
&lt;li&gt;In the EC2 menu on the left, go to &lt;strong&gt;"Elastic IPs"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Allocate Elastic IP address"&lt;/strong&gt; and then &lt;strong&gt;"Allocate"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the new IP address from the list, click &lt;strong&gt;"Actions"&lt;/strong&gt;, and then &lt;strong&gt;"Associate Elastic IP address"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose your &lt;code&gt;AdGuard-Server&lt;/code&gt; instance from the list and click &lt;strong&gt;"Associate"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Your server now has a static IP address that will never change! Make a note of this new IP.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 2: Opening the Doors (Configuring the Firewall) 🚪
&lt;/h3&gt;

&lt;p&gt;Our server is running, but we need to open a few more specific doors for AdGuard Home to work.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Go to your EC2 Instance details, click the &lt;strong&gt;"Security"&lt;/strong&gt; tab, and click on the &lt;strong&gt;Security Group name&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;"Edit inbound rules"&lt;/strong&gt; and &lt;strong&gt;"Add rule"&lt;/strong&gt; for each of the following:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Port &lt;code&gt;3000&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;Custom TCP&lt;/code&gt;, Port &lt;code&gt;3000&lt;/code&gt;, Source &lt;code&gt;My IP&lt;/code&gt;. (For the initial setup).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port &lt;code&gt;53&lt;/code&gt; (TCP):&lt;/strong&gt; &lt;code&gt;Custom TCP&lt;/code&gt;, Port &lt;code&gt;53&lt;/code&gt;, Source &lt;code&gt;Anywhere-IPv4&lt;/code&gt;. (For DNS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port &lt;code&gt;53&lt;/code&gt; (UDP):&lt;/strong&gt; &lt;code&gt;Custom UDP&lt;/code&gt;, Port &lt;code&gt;53&lt;/code&gt;, Source &lt;code&gt;Anywhere-IPv4&lt;/code&gt;. (Also for DNS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port &lt;code&gt;853&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;Custom TCP&lt;/code&gt;, Port &lt;code&gt;853&lt;/code&gt;, Source &lt;code&gt;Anywhere-IPv4&lt;/code&gt;. (For DNS-over-TLS).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;"Save rules"&lt;/strong&gt;. Your firewall is now ready!&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 3: Installing AdGuard Home 🛡️
&lt;/h3&gt;

&lt;p&gt;Now, let's connect to our server and install the magic software.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Connect via SSH:&lt;/strong&gt; Open a terminal (PowerShell on Windows, Terminal on Mac/Linux) and use the key you downloaded to connect. &lt;strong&gt;Use your new Elastic IP address!&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Replace the path and Elastic IP with your own&lt;/span&gt;
ssh &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"path/to/my-adguard-key.pem"&lt;/span&gt; admin@YOUR_ELASTIC_IP
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install AdGuard Home:&lt;/strong&gt; Run this one simple command. It downloads and installs everything for you.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-S&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh]&lt;span class="o"&gt;(&lt;/span&gt;https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh&lt;span class="o"&gt;)&lt;/span&gt; | sh &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run the Setup Wizard:&lt;/strong&gt; The script will give you a link, like &lt;code&gt;http://YOUR_ELASTIC_IP:3000&lt;/code&gt;. Open this in your browser. Follow the on-screen steps to create your admin username and password.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 4: Teaching Your Guardian Who to Trust and What to Block
&lt;/h3&gt;

&lt;p&gt;With AdGuard Home installed, the next step is to configure its core brain: the DNS servers it gets its answers from and the blocklists it uses to protect your network.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Setting Up Upstream DNS Servers&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Think of "Upstream DNS Servers" as the giant, public phonebooks of the internet. When your AdGuard server doesn't know an address (and it's not on a blocklist), it asks one of these upstreams. It's recommended to use a mix of the best encrypted DNS providers for security, privacy, and speed.&lt;/p&gt;

&lt;p&gt;In the AdGuard dashboard, go to &lt;strong&gt;Settings -&amp;gt; DNS settings&lt;/strong&gt;. In the &lt;strong&gt;"Upstream DNS servers"&lt;/strong&gt; box, enter the following, one per line:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dns.quad9.net/dns-query" rel="noopener noreferrer"&gt;https://dns.quad9.net/dns-query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dns.google/dns-query" rel="noopener noreferrer"&gt;https://dns.google/dns-query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dns.cloudflare.com/dns-query" rel="noopener noreferrer"&gt;https://dns.cloudflare.com/dns-query&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quad9:&lt;/strong&gt; Focuses heavily on security, blocking malicious domains.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Google:&lt;/strong&gt; Known for being very fast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloudflare:&lt;/strong&gt; A great all-around choice with a strong focus on privacy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;2. Optimizing DNS Performance&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Still in the &lt;strong&gt;DNS settings&lt;/strong&gt; page, scroll down to optimize how your server queries the upstreams.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parallel requests:&lt;/strong&gt; Select this option. This is the fastest and most resilient mode. It sends your DNS query to all three of your upstream servers at the same time and uses the answer from the very first one that responds. This ensures you always get the quickest possible result.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable EDNS client subnet (ECS):&lt;/strong&gt; Check this box. This is very important for services like Netflix, YouTube, and other content delivery networks (CDNs). It helps them give you content from a server that is geographically closest to you, resulting in faster speeds and a better experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;3. Enabling DNSSEC&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Right below the upstream servers, there's a checkbox for &lt;strong&gt;"Enable DNSSEC"&lt;/strong&gt;. You should check this box. DNSSEC is like a digital wax seal on a letter; it verifies that the DNS answers you're getting are authentic and haven't been tampered with. It's a simple, one-click security boost.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;4. Choosing Your Blocklists&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This is the fun part—the actual ad-blocking! Go to &lt;strong&gt;Filters -&amp;gt; DNS blocklists&lt;/strong&gt;. For a "Balanced &amp;amp; Powerful" setup that blocks aggressively without a high risk of breaking websites, enable the following lists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AdGuard DNS filter:&lt;/strong&gt; A great, well-maintained baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OISD Blocklist Big:&lt;/strong&gt; Widely considered one of the best all-in-one lists for blocking ads, trackers, and malware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HaGeZi's Pro Blocklist:&lt;/strong&gt; A fantastic list that adds another layer of aggressive blocking for privacy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HaGeZi's Threat Intelligence Feed:&lt;/strong&gt; A crucial security-only list that focuses on protecting against active threats like phishing and malware.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This combination will give you robust protection against both annoyances and real dangers.&lt;/p&gt;




&lt;h3&gt;
  
  
  ## Chapter 5: Giving Your Server a Name (Free Domain with No-IP) 📛
&lt;/h3&gt;

&lt;p&gt;An IP address is hard to remember. Let's get a free, memorable name for our server.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Sign Up at No-IP:&lt;/strong&gt; Go to &lt;a href="https://www.noip.com/" rel="noopener noreferrer"&gt;No-IP.com&lt;/a&gt;, create a free account, and create a &lt;strong&gt;hostname&lt;/strong&gt; (e.g., &lt;code&gt;my-dns.ddns.net&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Point it to Your Server:&lt;/strong&gt; When creating the hostname, enter your server's permanent &lt;strong&gt;Elastic IP address&lt;/strong&gt;. Confirm your account via email.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 6: Making It Secure with SSL/TLS 🔐
&lt;/h3&gt;

&lt;p&gt;We'll use &lt;strong&gt;Let's Encrypt&lt;/strong&gt; and &lt;strong&gt;Certbot&lt;/strong&gt; to get a free SSL certificate, which lets us use secure &lt;code&gt;https://&lt;/code&gt; and encrypted DNS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install Certbot:&lt;/strong&gt; In your SSH session, run these commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;certbot &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Get the Certificate:&lt;/strong&gt; Run this command, replacing the email and domain with your own.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# This command will temporarily stop any service on port 80, get the certificate, and then finish.&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;certbot certonly &lt;span class="nt"&gt;--standalone&lt;/span&gt; &lt;span class="nt"&gt;--agree-tos&lt;/span&gt; &lt;span class="nt"&gt;--email&lt;/span&gt; YOUR_EMAIL@example.com &lt;span class="nt"&gt;-d&lt;/span&gt; your-no-ip-hostname.ddns.net
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;If it's successful, it will tell you where your certificate files are saved (usually in &lt;code&gt;/etc/letsencrypt/live/your-no-ip-hostname.ddns.net/&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure AdGuard Home Encryption:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to your AdGuard Home dashboard (&lt;strong&gt;Settings -&amp;gt; Encryption settings&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;"Enable encryption"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;"Server name"&lt;/strong&gt; field, enter your No-IP hostname.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;"Certificates"&lt;/strong&gt;, choose &lt;strong&gt;"Set a certificates file path"&lt;/strong&gt;.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Certificate path:&lt;/strong&gt; &lt;code&gt;/etc/letsencrypt/live/your-no-ip-hostname.ddns.net/fullchain.pem&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private key path:&lt;/strong&gt; &lt;code&gt;/etc/letsencrypt/live/your-no-ip-hostname.ddns.net/privkey.pem&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Save configuration"&lt;/strong&gt;. The page will reload on a secure &lt;code&gt;https://&lt;/code&gt; connection!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 7: Automating SSL Renewal (Cron Job Magic) ✨
&lt;/h3&gt;

&lt;p&gt;Let's Encrypt certificates last for 90 days. We can tell our server to automatically renew them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Open the Cron Editor:&lt;/strong&gt; In SSH, run &lt;code&gt;sudo crontab -e&lt;/code&gt; and choose &lt;code&gt;nano&lt;/code&gt; as your editor.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add the Renewal Job:&lt;/strong&gt; Add this line to the bottom of the file. It tells the server to try renewing the certificate every day at 2:30 AM.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;30 2 * * * /usr/bin/certbot renew --quiet
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save and exit (&lt;code&gt;Ctrl+X&lt;/code&gt;, then &lt;code&gt;Y&lt;/code&gt;, then &lt;code&gt;Enter&lt;/code&gt;). Your server will now keep its certificate fresh forever!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  ## Chapter 8: Testing Your New Superpowers (DoH &amp;amp; DoT) 🧪
&lt;/h3&gt;

&lt;p&gt;For a direct confirmation, I used these commands on my computer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DNS-over-HTTPS (DoH) Test:&lt;/strong&gt; This test checks if the secure web endpoint for DNS is alive.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://your-no-ip-hostname.ddns.net/dns-query]&lt;span class="o"&gt;(&lt;/span&gt;https://your-no-ip-hostname.ddns.net/dns-query&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;I got a "405 Method Not Allowed" error, which sounds bad but is actually &lt;strong&gt;great news&lt;/strong&gt;. It means I successfully connected to the server, which correctly told me I didn't send a real query. The connection works!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DNS-over-TLS (DoT) Test:&lt;/strong&gt; This checks the dedicated secure port for DNS. I used a tool called &lt;code&gt;kdig&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# I had to install it first with: sudo apt install knot-dnsutils&lt;/span&gt;
kdig @your-no-ip-hostname.ddns.net +tls-ca +tls-host&lt;span class="o"&gt;=&lt;/span&gt;your-no-ip-hostname.ddns.net example.com
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The command returned a perfect DNS answer for &lt;code&gt;example.com&lt;/code&gt;, confirming the secure tunnel was working.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  ## Chapter 9: Protecting Your Kingdom (Router &amp;amp; Phone Setup) 🏰
&lt;/h3&gt;

&lt;p&gt;Now, let's point your devices to their new guardian.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On Your Home Router:&lt;/strong&gt; Log in to your router's admin page, find the DNS settings, and enter your server's &lt;strong&gt;Elastic IP&lt;/strong&gt; as the primary DNS server. Leave the secondary field blank! This forces all devices on your Wi-Fi to be protected. Then, restart your router.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On Your Mobile Phone:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Android:&lt;/strong&gt; Go to &lt;strong&gt;Settings -&amp;gt; Network -&amp;gt; Private DNS&lt;/strong&gt;. Choose "Private DNS provider hostname" and enter your No-IP hostname (&lt;code&gt;my-dns.ddns.net&lt;/code&gt;). This gives you ad-blocking everywhere, even on cellular data!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iOS:&lt;/strong&gt; You can use a profile to configure DoH. A simple way is to use a site like &lt;a href="https://adguard-dns.io/en/public-dns.html" rel="noopener noreferrer"&gt;AdGuard's DNS profile generator&lt;/a&gt;, but enter your own server's DoH address (&lt;code&gt;https://my-dns.ddns.net/dns-query&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  ## Chapter 10: The Ultimate Safety Net (Creating a Snapshot) 📸
&lt;/h3&gt;

&lt;p&gt;Finally, let's back up our perfect setup.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; In the EC2 Console, go to your instance details.&lt;/li&gt;
&lt;li&gt; Click the &lt;strong&gt;"Storage"&lt;/strong&gt; tab and click the &lt;strong&gt;"Volume ID"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;"Actions" -&amp;gt; "Create snapshot"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Give it a description, like &lt;code&gt;AdGuard-Working-Setup-Backup&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you ever mess something up, you can use this snapshot to restore your server to this exact working state in minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  ## Bonus Chapter: Common Troubleshooting Tips
&lt;/h3&gt;

&lt;p&gt;If things aren't working, here are a few common pitfalls to check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Browser Overrides Everything:&lt;/strong&gt; If one device isn't blocking ads, check its browser settings! Modern browsers like Chrome have a "Secure DNS" feature that can bypass your custom setup. You may need to turn this off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Your Laptop's DNS:&lt;/strong&gt; Make sure your computer's network settings are set to "Obtain DNS automatically" so it listens to the router. A manually set DNS on your PC will ignore the router's settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Beware of IPv6:&lt;/strong&gt; If you run into trouble on one device, try disabling IPv6 in that device's Wi-Fi adapter properties to force it to use your working IPv4 setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ## It’s a Wrap!
&lt;/h3&gt;

&lt;p&gt;And there you have it! You've successfully built a personal, secure, ad-blocking DNS server in the cloud. You've learned about cloud computing, firewalls, DNS, SSL, and automation. Go enjoy a faster, cleaner, and more private internet experience.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>adguard</category>
      <category>dns</category>
      <category>ssl</category>
    </item>
    <item>
      <title>Running Private Adguard Server on Cloud (Linode)</title>
      <dc:creator>Prajwol Adhikari</dc:creator>
      <pubDate>Sat, 01 Mar 2025 04:44:00 +0000</pubDate>
      <link>https://forem.com/prajwol-ad/running-private-adguard-server-on-cloud-linode-18ef</link>
      <guid>https://forem.com/prajwol-ad/running-private-adguard-server-on-cloud-linode-18ef</guid>
      <description>&lt;h1&gt;
  
  
  What's the buzz about AdGuard Home?
&lt;/h1&gt;

&lt;p&gt;Imagine AdGuard Home as your personal internet guardian. This versatile tool blocks ads, trackers, and other online nuisances across all devices connected to your network. Whether you're browsing on your phone, tablet, or computer, AdGuard Home has your back.&lt;/p&gt;

&lt;p&gt;In today's digital landscape, robust security measures are paramount. Protecting each device shields your family from accidental clicks and malicious attacks, ensuring peace of mind and a secure online environment.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why on the Cloud?
&lt;/h1&gt;

&lt;p&gt;While setting up AdGuard Home on your home network is great, installing it on a cloud server like Linode takes things up a notch. Here's why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On-the-Go Protection&lt;/strong&gt;: Your devices stay protected from ads and trackers, no matter where you are, you can even share it with your family.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Centralized Control&lt;/strong&gt;: Manage and customize your ad-blocking settings from a single dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Privacy&lt;/strong&gt;: Keep your browsing data away from prying eyes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ready to embark on this ad-free adventure? Let's get started!&lt;/p&gt;




&lt;h1&gt;
  
  
  Setting Up The Environment
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Step 1: Create a Linode Cloud Account
&lt;/h2&gt;

&lt;p&gt;Why choose Linode? Through &lt;a href="https://linode.com/networkchuck" rel="noopener noreferrer"&gt;NetworkChuck's referral link&lt;/a&gt;, you receive a generous $100 cloud credit - a fantastic start!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sign Up&lt;/strong&gt;: Navigate to &lt;a href="https://linode.com/networkchuck" rel="noopener noreferrer"&gt;Linode's signup page&lt;/a&gt; and register.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access the Dashboard&lt;/strong&gt;: Log in and select 'Linodes' from the left-side menu.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a Linode&lt;/strong&gt;: Click 'Create Linode,' choose your preferred region, and select an operating system (Debian 11 is a solid choice).
&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%2Favylkbj21se58s82ir2w.jpg" alt=" " width="800" height="451"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose a Plan&lt;/strong&gt;: The Shared 1GB Nanode instance is sufficient for AdGuard Home.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Label and Secure&lt;/strong&gt;: Assign a label to your Linode and set a strong root password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploy&lt;/strong&gt;: Click 'Create Linode' and wait for it to initialize.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once your Linode is up and running, access it via the LISH Console or SSH. (use root as localhost login)&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Installing AdGuard Home on Linode
&lt;/h2&gt;

&lt;p&gt;Yes, we're already into setting up at this point. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Log In&lt;/strong&gt;: Access your Linode using SSH or the LISH Console with your root credentials.&lt;/li&gt;
&lt;li&gt; Update the system:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; apt upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Go ahead and copy this command to Install Adguard Home:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AdGuard Home is installed and running. You can use &lt;strong&gt;CTRL+Shift+V&lt;/strong&gt; to paste into the terminal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Configure AdGuard Home
&lt;/h2&gt;

&lt;p&gt;Post-installation, you'll see a list of IP addresses with port &lt;code&gt;:3000&lt;/code&gt;.&lt;br&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%2Fg762szyxj4cn71wgdx4w.jpg" 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%2Fg762szyxj4cn71wgdx4w.jpg" alt=" " width="800" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Access the Web Interface&lt;/strong&gt;: Open your browser and navigate to the IP address followed by &lt;code&gt;:3000&lt;/code&gt;. If you encounter a security warning, proceed by clicking "Continue to site."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Initial Setup&lt;/strong&gt;: Click 'Get Started' and follow the prompts. When uncertain, default settings are typically fine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set Credentials&lt;/strong&gt;: Set up the Username and Password.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  Step 4: Integrate AdGuard Home with Your Router
&lt;/h2&gt;

&lt;p&gt;After this your AdGuard Home is running, but in order to use it on your devices you need to setup inside your home router for all your devices to be protected. For that, I can't walk you through each and every router settings, but the steps are pretty similar. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find your router IP address, you should be able to find it on the back of your router (commonly 192.168.0.1 or 192.169.1.1) enter it into your browser.&lt;/li&gt;
&lt;li&gt;Login into your router using the credentials mentioned in the back of your router; the default is often admin for both username and password. I suggest you change your default password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure DNS Settings&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable DHCP Server&lt;/strong&gt;: Ensure your router's DHCP server is active.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set DNS Addresses&lt;/strong&gt;: Input your AdGuard Home server's IP as the primary DNS (mine was 96.126.113.207). For secondary DNS, options like &lt;code&gt;1.1.1.1&lt;/code&gt; (Cloudflare), &lt;code&gt;9.9.9.9&lt;/code&gt; (Quad9), or &lt;code&gt;8.8.8.8&lt;/code&gt; (Google) are reliable.&lt;/li&gt;
&lt;li&gt;Save and apply the changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;h1&gt;
  
  
  Fine-Tuning AdGuard Home
&lt;/h1&gt;

&lt;p&gt;If you've done everything till here you should be good, but for those who enjoy customization, AdGuard Home offers a plethora of settings. Some of the customizations I did are:&lt;/p&gt;
&lt;h2&gt;
  
  
  Settings
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go to Settings -&amp;gt; General Settings: You can enable Parental Control and Safe Search.&lt;/li&gt;
&lt;li&gt;You can also make your Statistics last longer than 24hrs which is default.&lt;/li&gt;
&lt;li&gt;Now on Settings -&amp;gt; DNS Settings

&lt;ul&gt;
&lt;li&gt;By default it uses DNS from quad9 which is pretty good but I suggest you add more.&lt;/li&gt;
&lt;li&gt;You can click on list of known DNS providers, where you can choose from.&lt;/li&gt;
&lt;li&gt;I used: 

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dns.quad9.net/dns-query" rel="noopener noreferrer"&gt;https://dns.quad9.net/dns-query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dns.google/dns-query" rel="noopener noreferrer"&gt;https://dns.google/dns-query&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dns.cloudflare.com/dns-query" rel="noopener noreferrer"&gt;https://dns.cloudflare.com/dns-query&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enable 'Load Balancing' to distribute queries evenly.&lt;/li&gt;
&lt;li&gt;Scroll down to 'DNS server configuration' and enable DNSSEC for enhanced security.&lt;/li&gt;
&lt;li&gt;Click on Save.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Filters
&lt;/h2&gt;
&lt;h3&gt;
  
  
  DNS blocklists
&lt;/h3&gt;

&lt;p&gt;Go to Filters -&amp;gt; DNS blocklists, here you can add blocklist that people have created and use it to block even more things. By default AdGuard uses AdGuard DNS filter, and you can add more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on Add blocklist -&amp;gt; Choose from the list&lt;/li&gt;
&lt;li&gt;Don't choose too many from the list cause it may slow your internet requests.
&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%2F2o089a01w7g6goeqzr40.png" alt=" " width="800" height="498"&gt;
These are the blocklists I added. And just like that you are blocking more and more things.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  DNS rewrites
&lt;/h3&gt;

&lt;p&gt;Go to Filters -&amp;gt; DNS rewrites, here you can add your own DNS entries, so I added AdGuard here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on Add DNS rewrite&lt;/li&gt;
&lt;li&gt;Type in domain adguardforme.local and your IP address for AdGuard Home.
&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%2Fqcthakwgoisle9bc5z5y.jpg" alt=" " width="745" height="770"&gt;
&lt;/li&gt;
&lt;li&gt;And save it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, when I want to go on AdGuard Home dashboard I just type in adguardforme.local and I'm into AdGuard, I don't have to remember the IP address.&lt;/p&gt;
&lt;h3&gt;
  
  
  Custom filtering rules
&lt;/h3&gt;

&lt;p&gt;Go to Filters -&amp;gt; Custom filtering rules. For some reason when I use Facebook on mobile device stories and videos does not load up, so I added custom filtering rules.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@@||graph.facebook.com^$important
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>adguard</category>
      <category>linode</category>
      <category>dns</category>
      <category>doh</category>
    </item>
    <item>
      <title>Dive into AI Fun: Running DeepSeek-R1 on Docker Container on Ubuntu</title>
      <dc:creator>Prajwol Adhikari</dc:creator>
      <pubDate>Sat, 01 Mar 2025 04:23:28 +0000</pubDate>
      <link>https://forem.com/prajwol-ad/dive-into-ai-fun-running-deepseek-r1-on-docker-container-on-ubuntu-2b89</link>
      <guid>https://forem.com/prajwol-ad/dive-into-ai-fun-running-deepseek-r1-on-docker-container-on-ubuntu-2b89</guid>
      <description>&lt;h1&gt;
  
  
  What's a Docker Container?
&lt;/h1&gt;

&lt;p&gt;Before we dive into setting up DeepSeek-R1, let me explain what a Docker container is. Imagine you have a toy that works perfectly on your birthday but gets broken if you move it to another room. A Docker container is like a magic box that keeps your AI model (the toy) in perfect condition wherever you take it, whether it's running as a background task, on a web server, or even in the cloud.&lt;/p&gt;

&lt;p&gt;Docker containers encapsulate everything required to run an application: the code, dependencies, and environment settings. This ensures consistency across different machines, which is super important for AI models that rely on precise configurations.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting Up The Environment
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Step 1: Install Ubuntu on Windows (If You Haven't Already)
&lt;/h2&gt;

&lt;p&gt;If you're using Windows, the easiest way to get an Ubuntu environment is through the Microsoft Store. Here's how:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Microsoft Store and search for Ubuntu.&lt;/li&gt;
&lt;li&gt;Click Get and let it install.&lt;/li&gt;
&lt;li&gt;Once installed, open Ubuntu from the Start menu and follow the setup instructions.&lt;/li&gt;
&lt;li&gt;Update the system:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you have an Ubuntu terminal running on Windows!&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Install Docker (If You Haven't Already)
&lt;/h2&gt;

&lt;p&gt;First, let's check if you have Docker installed. Open a terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that returns a version number, congrats! If not, install Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install docker.io -y
sudo systemctl enable --now docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Prerequisites for NVIDIA GPU
&lt;/h2&gt;

&lt;p&gt;Install NVIDIA Container Toolkit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring the production repository:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&amp;amp;&amp;amp; curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Update the package list:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install the NVIDIA Container Toolkit:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install -y nvidia-container-toolkit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Running Ollama Inside Docker
&lt;/h1&gt;

&lt;p&gt;Run these commands(P.S. shoutout to NetworkChuck):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d \
--gpus all \
-v ollama:/root/.ollama \
-p 11434:11434 \
--security-opt=no-new-privileges \
--cap-drop=ALL \
--cap-add=SYS_NICE \
--memory=8g \
--memory-swap=8g \
--cpus=4 \
--read-only \
--name ollama \
ollama/ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Running DeepSeek-R1 Locally
&lt;/h1&gt;

&lt;p&gt;Time to bring DeepSeek-R1 to life locally and containerized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it ollama ollama run deepseek-r1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or you can run other versions of deepseek-r1 just by typing in the version at the end after a colon(:)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it ollama ollama run deepseek-r1:7b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, play around with the AI, if you wanna exit just type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bye
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Starting Deepseek-R1
&lt;/h1&gt;

&lt;p&gt;To Start Deepseek-R1 from next time go to Ubuntu and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker start ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will start ollama docker container; then type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it ollama ollama run deepseek-r1:7b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>deepseek</category>
      <category>docker</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
