<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Self Hosted on D. Sébastien Taggart</title>
    <link>https://www.sebastientaggart.com/categories/self-hosted/</link>
    <description>Recent content in Self Hosted on D. Sébastien Taggart</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Oct 2026 23:02:59 -0400</lastBuildDate>
    <atom:link href="https://www.sebastientaggart.com/categories/self-hosted/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Setting Up Monica CRM with Docker Compose: A Step-by-Step Guide</title>
      <link>https://www.sebastientaggart.com/writing/setting-up-monica-crm-with-docker-compose-a-step-by-step-guide/</link>
      <pubDate>Sun, 27 Aug 2023 08:05:25 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/setting-up-monica-crm-with-docker-compose-a-step-by-step-guide/</guid>
      <description>&lt;h2 id=&#34;setting-up-monica-crm-with-docker-compose-a-step-by-step-guide&#34;&gt;Setting Up Monica CRM with Docker Compose: A Step-by-Step Guide&lt;/h2&gt;
&lt;p&gt;Monica is more than just a personal relationship management (PRM) tool; it’s your digital assistant, designed to help you cultivate and maintain the important connections in your life. Think of it as a CRM tailored for personal relationships rather than sales leads. Whether you want to remember friends&amp;rsquo; birthdays, track interactions, or simply keep your social life organized, Monica stands out as a powerful ally. And deploying it via Docker Compose? That’s like giving yourself the best toolkit for the job.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="setting-up-monica-crm-with-docker-compose-a-step-by-step-guide">Setting Up Monica CRM with Docker Compose: A Step-by-Step Guide</h2>
<p>Monica is more than just a personal relationship management (PRM) tool; it’s your digital assistant, designed to help you cultivate and maintain the important connections in your life. Think of it as a CRM tailored for personal relationships rather than sales leads. Whether you want to remember friends&rsquo; birthdays, track interactions, or simply keep your social life organized, Monica stands out as a powerful ally. And deploying it via Docker Compose? That’s like giving yourself the best toolkit for the job.</p>
<p>In this guide, I’ll walk you through the process of deploying Monica with Docker Compose, along with some recommendations to optimize your experience after setup.</p>
<hr>
<h3 id="step-1-prerequisites">Step 1: Prerequisites</h3>
<p>Before diving in, ensure you have Docker and Docker Compose installed on your machine. If this is your first experience with Docker, welcome to the world of containerization—where applications run consistently across environments, making deployment and updates a breeze.</p>
<ol>
<li><strong>Install Docker:</strong> Head over to <a href="https://docs.docker.com/get-docker/">Docker’s official website</a> for installation instructions tailored to your operating system.</li>
<li><strong>Install Docker Compose:</strong> Follow the <a href="https://docs.docker.com/compose/install/">Docker Compose installation instructions</a> to get set up.</li>
</ol>
<hr>
<h3 id="step-2-create-a-docker-composeyml-file">Step 2: Create a <code>docker-compose.yml</code> File</h3>
<p>Next, we’ll create a <code>docker-compose.yml</code> file to define how Monica will be set up. This file serves as a roadmap, detailing how to deploy the Monica application alongside a MySQL database—an essential component for storing your data.</p>
<p>Open your terminal, navigate to the directory where you want Monica to reside, and create a new <code>docker-compose.yml</code> file. Here’s a sample configuration to get you started:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">monica</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">monica:latest</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">env_file</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">.env</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="s2">&#34;8080:80&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">depends_on</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">db</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">db</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">mysql:5.7</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">environment</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MYSQL_ROOT_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">rootpassword</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MYSQL_DATABASE</span><span class="p">:</span><span class="w"> </span><span class="l">monica</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MYSQL_USER</span><span class="p">:</span><span class="w"> </span><span class="l">monica</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MYSQL_PASSWORD</span><span class="p">:</span><span class="w"> </span><span class="l">monicapassword</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">monica_db_data:/var/lib/mysql</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">monica_db_data</span><span class="p">:</span><span class="w">
</span></span></span></code></pre></div><p>In this setup:</p>
<ul>
<li><strong>Monica</strong> runs as a dedicated service, pulling the latest image from Docker Hub.</li>
<li><strong>MySQL</strong> operates as a separate service, managing the database with specified environment variables for security.</li>
</ul>
<blockquote>
<p><strong>Note</strong>: Be sure to replace <code>rootpassword</code> and <code>monicapassword</code> with secure passwords.</p>
</blockquote>
<h3 id="step-3-create-an-env-file-for-monicas-environment-variables">Step 3: Create an <code>.env</code> File for Monica’s Environment Variables</h3>
<p>To keep sensitive information like database credentials separate from the <code>docker-compose.yml</code> file, we’ll create an <code>.env</code> file. This makes it easier to manage environment variables without editing the core configuration.</p>
<p>In the same directory, create a file named <code>.env</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nv">APP_KEY</span><span class="o">=</span>base64:YOUR_APP_KEY
</span></span><span class="line"><span class="cl"><span class="nv">APP_ENV</span><span class="o">=</span>production
</span></span><span class="line"><span class="cl"><span class="nv">APP_DEBUG</span><span class="o">=</span><span class="nb">false</span>
</span></span><span class="line"><span class="cl"><span class="nv">APP_URL</span><span class="o">=</span>http://localhost:8080
</span></span><span class="line"><span class="cl"><span class="nv">DB_HOST</span><span class="o">=</span>db
</span></span><span class="line"><span class="cl"><span class="nv">DB_DATABASE</span><span class="o">=</span>monica
</span></span><span class="line"><span class="cl"><span class="nv">DB_USERNAME</span><span class="o">=</span>monica
</span></span><span class="line"><span class="cl"><span class="nv">DB_PASSWORD</span><span class="o">=</span>monicapassword
</span></span></code></pre></div><p>For the <code>APP_KEY</code>, you’ll generate a new key after running the Monica container for the first time.</p>
<h3 id="step-4-run-docker-compose">Step 4: Run Docker Compose</h3>
<p>With your <code>docker-compose.yml</code> and <code>.env</code> files in place, it’s time to launch Monica:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose up -d
</span></span></code></pre></div><p>Docker Compose will pull the necessary images, create the defined services, and start them in the background.</p>
<h4 id="step-5-generate-monicas"><strong>Step 5: Generate Monica’s <code>APP_KEY</code></strong></h4>
<p>To complete the application initialization, generate your <code>APP_KEY</code> by entering the Monica container:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose <span class="nb">exec</span> monica php artisan key:generate --show
</span></span></code></pre></div><p>This command will output a new key that you should add to the <code>APP_KEY</code> field in your <code>.env</code> file. Once you’ve updated the key, restart the container:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose down
</span></span><span class="line"><span class="cl">docker-compose up -d
</span></span></code></pre></div><p>Congratulations! Monica is now fully configured and accessible at <code>http://localhost:8080</code>.</p>
<hr>
<h2 id="initial-setup-recommendations">Initial Setup Recommendations</h2>
<p>After logging into the Monica dashboard for the first time, consider these steps to maximize your PRM experience:</p>
<h3 id="1-create-a-user-account">1. Create a User Account</h3>
<p>Start by setting up your initial user account. Follow the prompts, providing essential information and a secure password.</p>
<h3 id="2-configure-personal-details-and-preferences">2. Configure Personal Details and Preferences</h3>
<p>In your profile settings, add details like your name and birthday. These particulars enhance reminders and reports, so it’s worth taking a moment to fill them in.</p>
<h3 id="3-add-your-contacts">3. Add Your Contacts</h3>
<p>Begin by entering a few close contacts. Monica allows you to store extensive information for each person—birthdays, addresses, contact details, and even custom notes. As you add contacts, consider incorporating tags and relationships (e.g., family, friend, coworker) to help you stay organized.</p>
<h3 id="4-set-up-reminders-and-notifications">4. Set Up Reminders and Notifications</h3>
<p>Take advantage of Monica&rsquo;s ability to set reminders for birthdays, anniversaries, and other significant dates. This feature is a cornerstone of what makes Monica such a valuable PRM tool, so configure your reminders thoughtfully.</p>
<h3 id="5-explore-custom-fields-and-tags">5. Explore Custom Fields and Tags</h3>
<p>If you have specific information to track—like favorite activities or meeting history—utilize custom fields and tags. Tags are particularly useful for grouping contacts by characteristics like “work,” “family,” or “volunteer group,” making it easy to filter and find relevant connections.</p>
<h3 id="6-integrate-with-email-and-calendars">6. Integrate with Email and Calendars</h3>
<p>Monica can seamlessly integrate with various email and calendar applications, centralizing your reminders and events. Check the integrations section in settings for options that can streamline your contact management.</p>
<h3 id="7-regularly-back-up-your-data">7. Regularly Back Up Your Data</h3>
<p>While Docker Compose simplifies managing and maintaining your Monica installation, regular data backups are essential—especially if you’re entering sensitive or irreplaceable information. Consider setting up periodic backups of your database or using Docker volumes to create snapshots.</p>
<hr>
<h2 id="maintenance-tips">Maintenance Tips</h2>
<ul>
<li>
<p><strong>Updating Monica</strong>: When a new version of Monica is released, update by pulling the latest image and restarting the container with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose pull
</span></span><span class="line"><span class="cl">docker-compose up -d
</span></span></code></pre></div></li>
<li>
<p><strong>Checking Logs</strong>: To troubleshoot any issues, view logs for both services using <code>docker-compose logs monica</code> or <code>docker-compose logs db</code>.</p>
</li>
<li>
<p><strong>Restoring from Backup</strong>: Regular backups of the <code>monica_db_data</code> volume will simplify data recovery if needed.</p>
</li>
</ul>
<hr>
<p>With Docker Compose, deploying Monica CRM is straightforward and reliable. The application’s user-friendly interface and feature set make it an invaluable tool for managing personal relationships. Once you’re set up, you’ll find that Monica becomes a trusted assistant, helping you navigate life’s most important connections with ease.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Three Gates of Right Speech: A Guide to Mindful Communication for Parents and Kids</title>
      <link>https://www.sebastientaggart.com/writing/the-three-gates-of-right-speech-a-guide-to-mindful-communication/</link>
      <pubDate>Sun, 02 Oct 2022 07:32:31 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/the-three-gates-of-right-speech-a-guide-to-mindful-communication/</guid>
      <description>&lt;p&gt;Words are powerful tools. They can heal or hurt, build bridges or burn them down. As parents, we hold a profound responsibility: teaching our children to communicate mindfully. This is where the &lt;strong&gt;Three Gates of Right Speech&lt;/strong&gt; come into play — a framework designed to help us consider our words before they leave our lips. By guiding kids to pause, reflect, and evaluate their speech, we nurture empathy, kindness, and emotional intelligence in them.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Words are powerful tools. They can heal or hurt, build bridges or burn them down. As parents, we hold a profound responsibility: teaching our children to communicate mindfully. This is where the <strong>Three Gates of Right Speech</strong> come into play — a framework designed to help us consider our words before they leave our lips. By guiding kids to pause, reflect, and evaluate their speech, we nurture empathy, kindness, and emotional intelligence in them.</p>
<h2 id="the-origins-of-the-three-gates">The Origins of the Three Gates</h2>
<p>The concept of the Three Gates of Right Speech has deep roots in ancient wisdom traditions, particularly those found in Buddhism and Sufi teachings. These teachings resonate across various philosophies and religions, emphasizing the importance of thoughtful communication.</p>
<ul>
<li><strong>In Buddhism</strong>, Right Speech is one of the steps on the Noble Eightfold Path, a key component of ethical living. The Buddha urged us to speak truthfully, kindly, and only when necessary to promote harmony and understanding.</li>
<li><strong>Sufi Wisdom</strong> offers a similar framework, inviting us to evaluate our words through three gates:
<ol>
<li>Is it true?</li>
<li>Is it necessary?</li>
<li>Is it kind?</li>
</ol>
</li>
</ul>
<p>These principles remind us that speaking is an act of mindfulness—one that requires thought, care, and intention.</p>
<hr>
<h2 id="the-three-gates-a-simple-framework-for-thoughtful-communication">The Three Gates: A Simple Framework for Thoughtful Communication</h2>
<p>The Three Gates provide a straightforward yet profound method for reflecting on our words.</p>
<h3 id="gate-1-is-it-true"><strong>Gate 1: Is It True?</strong></h3>
<p>The first gate centers on honesty. Before speaking, we ask ourselves: <em>Is this objectively true?</em></p>
<ul>
<li><strong>Why It Matters</strong>: Honesty fosters trust and integrity. Kids who grasp the value of truth learn to take responsibility for their words and actions.</li>
<li><strong>Teaching Kids</strong>: Encourage your child to pause and contemplate before repeating something they’ve heard. Prompt them with questions like, <em>“Do you know this is true?”</em></li>
<li><strong>Example for Kids</strong>: A child might feel inclined to embellish a story to impress friends. Reminding them to reflect on the truth of their words teaches them to value authenticity over mere approval.</li>
</ul>
<h3 id="gate-2-is-it-necessary"><strong>Gate 2: Is It Necessary?</strong></h3>
<p>The second gate emphasizes discernment. Before speaking, we consider: <em>Do I <em>need</em> to say this?</em></p>
<ul>
<li><strong>Why It Matters</strong>: Not everything that is true needs to be spoken. Teaching kids to assess whether their words serve a purpose helps them avoid unnecessary conflict or hurt.</li>
<li><strong>Teaching Kids</strong>: Explain that “necessary” speech typically involves helping someone, solving a problem, or sharing vital information. Encourage them to ask themselves, <em>“Will saying this improve the situation?”</em></li>
<li><strong>Example for Kids</strong>: If a sibling spills juice, does pointing out the mistake help? Or would offering to assist with the cleanup be more constructive?</li>
</ul>
<h3 id="gate-3-is-it-kind"><strong>Gate 3: Is It Kind?</strong></h3>
<p>The final gate focuses on compassion. Before speaking, we ask: <em>Is this kind?</em> This is often the most challenging for kids, as it requires thinking from an empathetic perspective.</p>
<ul>
<li><strong>Why It Matters</strong>: Kindness builds connection and understanding. Teaching kids to select words that uplift rather than harm fosters empathy and strengthens relationships.</li>
<li><strong>Teaching Kids</strong>: Help your child recognize the impact their words have. Encourage them to reframe their speech when emotions run high. Instead of blurting out, <em>“You’re so annoying!”</em> they might say, <em>“I need some space right now.”</em></li>
<li><strong>Example for Kids</strong>: When a friend makes a mistake in class, pointing it out might be true and even necessary — but doing so kindly preserves friendship.</li>
</ul>
<hr>
<h2 id="why-the-three-gates-matter-for-kids"><strong>Why the Three Gates Matter for Kids</strong></h2>
<p>Parenting can feel like a tightrope walk between teaching boundaries and nurturing independence. The Three Gates provide a gentle, actionable guide for encouraging thoughtful speech without being overly directive. Here’s how kids benefit:</p>
<ol>
<li><strong>Emotional Awareness</strong><br>
Learning to evaluate their words fosters mindfulness regarding their emotions and the effects they have on others.</li>
<li><strong>Conflict Resolution</strong><br>
By pausing to consider if their words are true, necessary, and kind, kids develop tools for resolving disagreements constructively.</li>
<li><strong>Empathy and Connection</strong><br>
Thoughtful communication helps kids cultivate deeper, more meaningful relationships with peers, siblings, and adults.</li>
<li><strong>Self-Confidence</strong><br>
Knowing they’ve spoken truthfully and kindly reinforces a child’s sense of integrity and self-worth.</li>
</ol>
<hr>
<h2 id="the-three-gates-in-parenting"><strong>The Three Gates in Parenting</strong></h2>
<p>The Three Gates aren’t just valuable for kids; they serve as a powerful tool for parents too. When tempers flare or patience runs thin, reflecting on whether our words are true, necessary, and kind can prevent unnecessary conflict and foster a calmer household.</p>
<hr>
<h2 id="historical-context-meets-modern-parenting"><strong>Historical Context Meets Modern Parenting</strong></h2>
<p>The Three Gates remind us that the wisdom of the past remains relevant today. Whether rooted in Buddhist teachings or Sufi traditions, the idea that words should be intentional and mindful transcends culture and time. As parents, we have the opportunity to carry these lessons forward—teaching our children to communicate with clarity, kindness, and care.</p>
<p>In a world where impulsive communication often reigns, the Three Gates offer a roadmap for raising thoughtful, empathetic, and emotionally intelligent kids. And who knows? Along the way, they might just provide us with valuable lessons in becoming better communicators ourselves.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Setting Up and Configuring MKDocs with Docker Compose: A Complete Guide</title>
      <link>https://www.sebastientaggart.com/writing/setting-up-and-configuring-mkdocs-with-docker-compose-a-complete-guide/</link>
      <pubDate>Sat, 20 Aug 2022 08:24:57 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/setting-up-and-configuring-mkdocs-with-docker-compose-a-complete-guide/</guid>
      <description>&lt;p&gt;MKDocs is a powerful static site generator tailored specifically for crafting project documentation. With MKDocs, you can transform your Markdown files into professional, searchable, and visually appealing documentation sites with remarkable speed and ease. By leveraging Docker Compose, you encapsulate all dependencies, simplifying the installation, configuration, and maintenance of MKDocs across various development environments. This combination not only streamlines your documentation workflow but also makes it scalable and manageable over time.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>MKDocs is a powerful static site generator tailored specifically for crafting project documentation. With MKDocs, you can transform your Markdown files into professional, searchable, and visually appealing documentation sites with remarkable speed and ease. By leveraging Docker Compose, you encapsulate all dependencies, simplifying the installation, configuration, and maintenance of MKDocs across various development environments. This combination not only streamlines your documentation workflow but also makes it scalable and manageable over time.</p>
<h2 id="step-1-prerequisites">Step 1: Prerequisites</h2>
<p>Before we dive into the setup, let’s ensure you have the essential tools ready to go: Docker and Docker Compose.</p>
<ol>
<li><strong>Install Docker:</strong> Start by following the instructions on <a href="https://docs.docker.com/get-docker/">Docker’s official website</a> to install Docker for your operating system.</li>
<li><strong>Install Docker Compose:</strong> Next, follow the <a href="https://docs.docker.com/compose/install/">Docker Compose installation instructions</a>.</li>
</ol>
<h2 id="step-2-create-a-project-directory-and-add-initial-files">Step 2: Create a Project Directory and Add Initial Files</h2>
<p>Let’s set up a dedicated space for your documentation.</p>
<ol>
<li>
<p><strong>Create a new directory</strong> for your project documentation. For example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">mkdir my_docs_project
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> my_docs_project
</span></span></code></pre></div></li>
<li>
<p>Within this directory, you&rsquo;ll need to create two files:</p>
<ul>
<li><code>docker-compose.yml</code>: This file will define how Docker sets up MKDocs.</li>
<li><code>mkdocs.yml</code>: This is MKDocs’ configuration file.</li>
</ul>
</li>
</ol>
<h2 id="step-3-define-the-docker-composeyml-file">Step 3: Define the <code>docker-compose.yml</code> File</h2>
<p>In your <code>my_docs_project</code> directory, create the <code>docker-compose.yml</code> file. This is where you’ll specify the Docker service that will run MKDocs.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">mkdocs</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">squidfunk/mkdocs-material:latest</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">.:/docs</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="s2">&#34;8000:8000&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">command</span><span class="p">:</span><span class="w"> </span><span class="l">mkdocs serve -a 0.0.0.0:8000</span><span class="w">
</span></span></span></code></pre></div><h3 id="breaking-it-down">Breaking It Down:</h3>
<ul>
<li><strong>image</strong>: This specifies the <code>squidfunk/mkdocs-material</code> Docker image, which includes MKDocs along with the highly popular Material theme.</li>
<li><strong>volumes</strong>: By mounting the current directory to <code>/docs</code> in the container, MKDocs can access your files and reflect changes in real-time.</li>
<li><strong>ports</strong>: This maps port 8000 on your local machine to port 8000 in the container, allowing you to access MKDocs at <code>http://localhost:8000</code>.</li>
<li><strong>command</strong>: Here, we instruct MKDocs to serve the documentation at <code>0.0.0.0:8000</code>.</li>
</ul>
<hr>
<h2 id="step-4-configure-mkdocs-in-mkdocsyml">Step 4: Configure MKDocs in <code>mkdocs.yml</code></h2>
<p>Next, create the <code>mkdocs.yml</code> configuration file in the same directory. This file dictates how MKDocs behaves and displays your documentation.</p>
<p>Here’s a sample <code>mkdocs.yml</code> configuration:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">site_name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;My Project Documentation&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">theme</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;material&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">nav</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">Home</span><span class="p">:</span><span class="w"> </span><span class="l">index.md</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">About</span><span class="p">:</span><span class="w"> </span><span class="l">about.md</span><span class="w">
</span></span></span></code></pre></div><h3 id="configuration-insights">Configuration Insights:</h3>
<ul>
<li><strong>site_name</strong>: Sets the title of your site.</li>
<li><strong>theme</strong>: Specifies the theme to &ldquo;material&rdquo; (the one provided by the Docker image we used).</li>
<li><strong>nav</strong>: Defines the navigation structure of the site, linking each item to a corresponding Markdown file.</li>
</ul>
<hr>
<h2 id="step-5-create-sample-markdown-files">Step 5: Create Sample Markdown Files</h2>
<p>To see anything displayed, MKDocs needs some content. In your project directory, create the <code>index.md</code> and <code>about.md</code> files as specified in the navigation structure.</p>
<ul>
<li>
<p><strong>index.md</strong></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl"><span class="gh"># Welcome to My Documentation
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">This is the home page of the documentation for my project.
</span></span></code></pre></div></li>
<li>
<p><strong>about.md</strong></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl"><span class="gh"># About
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">This page provides information about the project and its purpose.
</span></span></code></pre></div></li>
</ul>
<h2 id="step-6-launch-mkdocs-with-docker-compose">Step 6: Launch MKDocs with Docker Compose</h2>
<p>With your configuration and Markdown files in place, it&rsquo;s time to get MKDocs up and running using Docker Compose:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose up
</span></span></code></pre></div><p>Docker will pull the necessary image (if it&rsquo;s not already downloaded), create the container, and start MKDocs. Once it&rsquo;s running, navigate to <code>http://localhost:8000</code> in your web browser to view your documentation.</p>
<p>As you edit the Markdown files, MKDocs will automatically refresh the page to display your updates in real-time.</p>
<h2 id="step-7-building-a-static-site-with-docker-compose">Step 7: Building a Static Site with Docker Compose</h2>
<p>To create a static version of your documentation site, you can use the <code>mkdocs build</code> command within Docker. This command compiles your Markdown files into static HTML, ready for deployment on any web server.</p>
<ol>
<li>
<p>Run the following command to build the site:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker-compose run mkdocs mkdocs build
</span></span></code></pre></div></li>
<li>
<p>After the build process, you’ll find the generated static files in a <code>site/</code> directory within your project. You can then transfer these files to your preferred web server or hosting service.</p>
</li>
</ol>
<h2 id="advanced-configuration-options">Advanced Configuration Options</h2>
<p>Once MKDocs and Docker Compose are running smoothly, consider exploring some advanced configuration options in <code>mkdocs.yml</code>:</p>
<ul>
<li>
<p><strong>Enabling Search</strong>: MKDocs features a built-in search functionality that indexes your content automatically. Just ensure you’re using a theme that supports it (like Material).</p>
</li>
<li>
<p><strong>Adding Plugins</strong>: MKDocs supports various plugins, such as <code>mkdocs-material-extensions</code> for additional customization. To add plugins, simply update <code>mkdocs.yml</code> like so:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">plugins</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">search</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">markdownextradata</span><span class="w">
</span></span></span></code></pre></div></li>
<li>
<p><strong>Using Custom CSS</strong>: For those who wish to add a personal touch, you can include custom CSS to style your documentation further. Create a CSS file in your project (e.g., <code>extra.css</code>) and update <code>mkdocs.yml</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">extra_css</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">extra.css</span><span class="w">
</span></span></span></code></pre></div></li>
<li>
<p><strong>Adding Code Syntax Highlighting</strong>: If your documentation includes code snippets, MKDocs can automatically apply syntax highlighting for numerous programming languages. This feature is enabled by default with the Material theme.</p>
</li>
</ul>
<hr>
<p>In conclusion, setting up MKDocs with Docker Compose is a straightforward process that equips you with a robust, scalable solution for creating and maintaining documentation. With Docker Compose, managing dependencies becomes a breeze, allowing you to run MKDocs in any environment and even generate static builds for web deployment. Once established, MKDocs offers a clean, responsive, and well-organized documentation experience, complete with search functionality and theme customization. So, let’s get documenting!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Set Up a Home Logger with Grafana, Promtail, and Loki in Docker Compose</title>
      <link>https://www.sebastientaggart.com/writing/set-up-a-home-logger-with-grafana-promtail-and-loki-in-docker-compose/</link>
      <pubDate>Sun, 19 Dec 2021 07:26:46 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/set-up-a-home-logger-with-grafana-promtail-and-loki-in-docker-compose/</guid>
      <description>&lt;p&gt;We&amp;rsquo;re about to embark on an exciting journey into the realm of log aggregation using Grafana, Promtail, and Loki—all orchestrated through Docker Compose. This trio not only empowers you to take complete control over your logging but also extends a user-friendly graphical interface to explore your data with ease.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before we dive in, ensure that Docker and Docker Compose are installed on your home server. If you&amp;rsquo;re new to Docker, think of it as a toolkit that simplifies the process of developing, shipping, and running applications by leveraging containerization. For installation guidance, I recommend checking out the official Docker documentation.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>We&rsquo;re about to embark on an exciting journey into the realm of log aggregation using Grafana, Promtail, and Loki—all orchestrated through Docker Compose. This trio not only empowers you to take complete control over your logging but also extends a user-friendly graphical interface to explore your data with ease.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before we dive in, ensure that Docker and Docker Compose are installed on your home server. If you&rsquo;re new to Docker, think of it as a toolkit that simplifies the process of developing, shipping, and running applications by leveraging containerization. For installation guidance, I recommend checking out the official Docker documentation.</p>
<h2 id="setting-up-loki-and-promtail">Setting Up Loki and Promtail</h2>
<p>At the heart of our setup is Loki, a horizontally-scalable, highly-available log aggregation system inspired by Prometheus. Unlike traditional logging systems, Loki is designed for efficiency—it doesn’t index the content of logs but rather utilizes a set of labels for each log stream. This makes it both cost-effective and easy to operate.</p>
<p>Promtail acts as our log shipper, collecting log paths and metadata before pushing them to Loki. Let’s get started by crafting a <code>docker-compose.yml</code> file that will define our services:</p>
<pre tabindex="0"><code>version: &#34;3&#34;

services:
    loki:
        image: grafana/loki
        ports:
        - &#34;3100:3100&#34;
        command: -config.file=/etc/loki/local-config.yaml
        volume:
        - ./loki-local-config.yaml:/etc/loki/local-config.yaml
    promtail:
        image: grafana/promtail
        volumes:
        - ./promtail-config.yaml:/etc/promtail/config.yaml
        - /var/log:/var/log
        command: -config.file=/etc/promtail/config.yaml
</code></pre><h2 id="create-configuration-files">Create Configuration Files</h2>
<p>In the same directory as your <code>docker-compose.yml</code>, create two files: <code>loki-local-config.yaml</code> and <code>promtail-config.yaml</code>.</p>
<p>For <code>loki-local-config.yaml</code>, use the following configuration:</p>
<pre tabindex="0"><code>auth_enabled: false
server:
  http_listen_port: 3100
ingester:
  lifecycler:
    address: 127.0.0.1
    ring:
      kvstore:
        store: inmemory
      replication_factor: 1
      final_sleep: 0s
chunk_idle_period: 3m
max_chunk_age: 1h
chunk_target_size: 1048576
schema_config:
  configs:
  - from: 2020-10-24
    store: boltdb-shipper
    object_store: filesystem
    schema: v11
    index:
      prefix: index_
      period: 24h
</code></pre><p>And for <code>promtail-config.yaml</code>, input:</p>
<pre tabindex="0"><code>server:
  http_listen_port: 9080
  grpc_listen_port: 0
positions:
  filename: /tmp/positions.yaml
clients:
  - url: http://loki:3100/loki/api/v1/push
scrape_configs:
  - job_name: system
    static_configs:
      - targets:
          - localhost
        labels:
          job: varlogs
          __path__: /var/log/*log
</code></pre><h2 id="run-the-docker-compose">Run the Docker Compose</h2>
<p>With all the configuration files in place, it’s time to bring our setup to life. Navigate to the directory housing your <code>docker-compose.yml</code> file and execute the command:</p>
<pre tabindex="0"><code>docker-compose up
</code></pre><h2 id="setting-up-grafana">Setting Up Grafana</h2>
<p>Now we turn our attention to Grafana, the multi-platform visualization tool that transforms your data into stunning graphs, charts, and alerts.</p>
<p>Create a new Docker Compose file for Grafana with the following:</p>
<pre tabindex="0"><code>version: &#34;3&#34;
services:
    grafana:
        image: grafana/grafana
        ports:
        - 3000:3000
        volumes:
        - grafana_storage:/var/lib/grafana

volumes:
    grafana_storage:
</code></pre><p>Run this Docker Compose file just as you did for Loki and Promtail. Once it&rsquo;s up, navigate to Grafana by entering <code>http://localhost:3000</code> in your browser.</p>
<p>To integrate Grafana with Loki:</p>
<ol>
<li>Click on the gear icon in the side menu.</li>
<li>Select &ldquo;Data Sources.&rdquo;</li>
<li>Click on &ldquo;Add data source.&rdquo;</li>
<li>Choose &ldquo;Loki.&rdquo;</li>
<li>In the URL field, input: <code>http://localhost:3100</code>.</li>
</ol>
<p>Congratulations! If all has gone according to plan, you now have a fully functional logging solution right at your fingertips. Happy logging!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Compiling Marlin 2.0 Firmware for the Ender 3 with BLTouch: A Comprehensive Guide</title>
      <link>https://www.sebastientaggart.com/writing/compiling-marlin-20-firmware-for-the-ender-3-with-bltouch-a-comprehensive-guide/</link>
      <pubDate>Mon, 26 Apr 2021 08:05:58 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/compiling-marlin-20-firmware-for-the-ender-3-with-bltouch-a-comprehensive-guide/</guid>
      <description>&lt;p&gt;3D printing is more than just a technological novelty; it’s a transformative force reshaping the manufacturing and prototyping landscape. By granting manufacturers the autonomy to create customized solutions, 3D printing is not just keeping pace with industry demands—it’s setting the stage for the future. At the heart of this revolution are machines like the Ender 3, which leverage sophisticated firmware and accessories, such as the BLTouch, to enhance their capabilities.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>3D printing is more than just a technological novelty; it’s a transformative force reshaping the manufacturing and prototyping landscape. By granting manufacturers the autonomy to create customized solutions, 3D printing is not just keeping pace with industry demands—it’s setting the stage for the future. At the heart of this revolution are machines like the Ender 3, which leverage sophisticated firmware and accessories, such as the BLTouch, to enhance their capabilities.</p>
<p>Understanding the role of firmware—specifically Marlin—in this ecosystem is essential for harnessing the full potential of your 3D printer.</p>
<h2 id="understanding-marlin-20-firmware">Understanding Marlin 2.0 Firmware</h2>
<p>At its core, Marlin is open-source firmware designed for RepRap project-based FDM (Fused Deposition Modeling) 3D printers. Think of Marlin as the brain of your 3D printer, translating complex 3D model data into precise commands that guide the printer’s stepper motors, endstops, heated bed, and extruder. The latest iteration, Marlin 2.0, not only enhances performance but introduces a suite of new features, making it a go-to choice for enthusiasts eager to push the boundaries of what their printers can achieve.</p>
<h2 id="what-is-ender-3">What is Ender 3?</h2>
<p>The Ender 3, manufactured by Creality, is a cost-effective yet highly accurate 3D printer that has won the hearts of both newcomers and seasoned makers. Its versatility in supporting various firmware and accessories, such as the BLTouch, makes it a favored choice across the board. Whether you’re crafting intricate prototypes or simply exploring the world of 3D printing, the Ender 3 stands as a reliable companion.</p>
<h2 id="getting-to-know-bltouch">Getting to Know BLTouch</h2>
<p>Enter the BLTouch—a game-changer in bed leveling technology. This 3D printer bed leveling sensor ensures your print bed is perfectly calibrated before the printing process begins. By deploying a probe to measure the tilt and unevenness of the bed, the BLTouch allows the firmware to make real-time adjustments to the Z-axis during printing. The result? Significantly improved print quality and consistency.</p>
<h2 id="compiling-marlin-20-for-ender-3-with-bltouch">Compiling Marlin 2.0 for Ender 3 with BLTouch</h2>
<p>Compiling Marlin 2.0 for your Ender 3 with BLTouch might seem daunting, but it’s an empowering venture that optimizes printer performance and integrates automated bed leveling seamlessly. As with any technical endeavor, a basic familiarity with programming environments, particularly the Arduino IDE, will serve you well.</p>
<p>Here’s a step-by-step guide to help you through this process:</p>
<ol>
<li>
<p><strong>Download and Configure Marlin 2.0</strong>: Head over to the official Marlin GitHub repository to download the latest version of the firmware. You’ll want to edit the <code>Configuration.h</code> and <code>Configuration_adv.h</code> files to align with the specifications of your Ender 3 and BLTouch setup.</p>
</li>
<li>
<p><strong>Compile the Firmware</strong>: Open Arduino IDE and compile the Marlin firmware. If you run into errors, it’s often a sign that there’s a mismatch in the configurations—think of it as the firmware’s way of saying, “Let’s check our math.”</p>
</li>
<li>
<p><strong>Upload the Firmware</strong>: Once the compilation is successful, upload the firmware to your Ender 3 using Arduino IDE and a data-capable USB cable.</p>
</li>
<li>
<p><strong>Check and Test the Configuration</strong>: After uploading, verify that the firmware is functioning as expected. A small test print will help confirm that the BLTouch is leveling the bed correctly.</p>
</li>
</ol>
<p>While the compilation and configuration process may appear complex, the dividends it pays in customization and control are well worth the effort. In the realm of 3D printing, precision is paramount, and every detail counts.</p>
<p>As you embark on this journey, remember to approach the update process with caution. Equip yourself with knowledge, and when in doubt, don’t hesitate to seek guidance from someone more experienced. After all, the world of 3D printing is as much about community and collaboration as it is about technology and innovation.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Netdata with Docker</title>
      <link>https://www.sebastientaggart.com/writing/netdata-with-docker/</link>
      <pubDate>Mon, 22 Feb 2021 18:21:04 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/netdata-with-docker/</guid>
      <description>&lt;h1 id=&#34;netdata-with-docker&#34;&gt;Netdata with Docker&lt;/h1&gt;
&lt;p&gt;Deploying Netdata with Docker offers a streamlined approach to monitoring your systems. The beauty lies in its configuration details, neatly encapsulated within the &lt;code&gt;docker-compose.yml&lt;/code&gt; file. This not only simplifies tracking and updating but also fosters a collaborative environment where sharing configurations becomes a breeze.&lt;/p&gt;
&lt;h2 id=&#34;setting-up-your-docker-composeyml&#34;&gt;Setting Up Your &lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a straightforward example of a &lt;code&gt;docker-compose.yml&lt;/code&gt; setup for Netdata:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;version&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;3&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;services&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;netdata&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;image&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;netdata/netdata&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;container_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;netdata&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;hostname&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;example.com&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;c&#34;&gt;# Set this to the fully qualified domain name of your host&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ports&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;m&#34;&gt;19999&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;19999&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;restart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;unless-stopped&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;cap_add&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;SYS_PTRACE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;security_opt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;apparmor:unconfined&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;volumes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;./config:/etc/netdata&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;/etc/passwd:/host/etc/passwd:ro&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;/etc/group:/host/etc/group:ro&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;/proc:/host/proc:ro&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;/sys:/host/sys:ro&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;/etc/os-release:/host/etc/os-release:ro&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this configuration, we direct Docker to map the necessary volumes, ensuring that Netdata has access to critical system information for accurate monitoring.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h1 id="netdata-with-docker">Netdata with Docker</h1>
<p>Deploying Netdata with Docker offers a streamlined approach to monitoring your systems. The beauty lies in its configuration details, neatly encapsulated within the <code>docker-compose.yml</code> file. This not only simplifies tracking and updating but also fosters a collaborative environment where sharing configurations becomes a breeze.</p>
<h2 id="setting-up-your-docker-composeyml">Setting Up Your <code>docker-compose.yml</code></h2>
<p>Here&rsquo;s a straightforward example of a <code>docker-compose.yml</code> setup for Netdata:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;3&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">netdata</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l">netdata/netdata</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">container_name</span><span class="p">:</span><span class="w"> </span><span class="l">netdata</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">hostname</span><span class="p">:</span><span class="w"> </span><span class="l">example.com</span><span class="w"> </span><span class="c"># Set this to the fully qualified domain name of your host</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">ports</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="m">19999</span><span class="p">:</span><span class="m">19999</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">restart</span><span class="p">:</span><span class="w"> </span><span class="l">unless-stopped</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cap_add</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">SYS_PTRACE</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">security_opt</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">apparmor:unconfined</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">volumes</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">./config:/etc/netdata</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/etc/passwd:/host/etc/passwd:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/etc/group:/host/etc/group:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/proc:/host/proc:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/sys:/host/sys:ro</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="l">/etc/os-release:/host/etc/os-release:ro</span><span class="w">
</span></span></span></code></pre></div><p>In this configuration, we direct Docker to map the necessary volumes, ensuring that Netdata has access to critical system information for accurate monitoring.</p>
<h3 id="the-configuration-directory">The Configuration Directory</h3>
<p>This setup anticipates a <code>./config/</code> directory housing the <code>netdata.conf</code> file. A crucial point to note: this file must exist prior to the initial container launch. Here’s a reference snippet for your <code>netdata.conf</code>:</p>
<pre tabindex="0"><code class="language-conf" data-lang="conf"># netdata configuration
#
# Download the latest version of this file with:
# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
# or
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
#
# You can uncomment and modify any of the options below.
# The values shown in the commented settings are the defaults.
#
# global netdata configuration
[global]
  # hostname = basement-server.thetaggarthouse.com
  # other configurations...
</code></pre><h3 id="why-this-matters">Why This Matters</h3>
<p>Understanding the configuration settings is vital. It allows you to tailor Netdata&rsquo;s behavior to suit your environment, ensuring optimal performance and resource utilization. Each parameter provides insight into how Netdata interacts with your system — a small adjustment can lead to significant improvements in monitoring efficiency.</p>
<h3 id="next-steps">Next Steps</h3>
<p>After you’ve set up your <code>docker-compose.yml</code> and <code>netdata.conf</code>, consider diving deeper into Netdata’s features. Explore how to visualize your data, or perhaps integrate it with other monitoring tools. Each step you take enhances your understanding of both the system and the tool, fostering a more resilient infrastructure.</p>
<p>In conclusion, deploying Netdata via Docker is not just a technical task; it’s an opportunity to refine your monitoring strategy. Embrace the process, iterate on your configurations, and watch your system insights flourish.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Ultimate Guide to Setting Up Cloudflare Zero Trust Tunnels</title>
      <link>https://www.sebastientaggart.com/writing/the-ultimate-guide-to-setting-up-cloudflare-zero-trust-tunnels/</link>
      <pubDate>Fri, 01 Jan 2021 20:33:35 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/the-ultimate-guide-to-setting-up-cloudflare-zero-trust-tunnels/</guid>
      <description>&lt;p&gt;The Cloudflare Zero Trust paradigm is reshaping our approach to security in the realm of self-hosted services. As concerns about privacy and data breaches continue to escalate for both individuals and organizations, the innovative security model of Cloudflare Zero Trust emerges as a beacon of hope. This guide is designed to walk you through the process of securely exposing your private, self-hosted services using this groundbreaking approach. We will utilize NGINX Proxy Manager and Docker, managing everything with a single Docker Compose file.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>The Cloudflare Zero Trust paradigm is reshaping our approach to security in the realm of self-hosted services. As concerns about privacy and data breaches continue to escalate for both individuals and organizations, the innovative security model of Cloudflare Zero Trust emerges as a beacon of hope. This guide is designed to walk you through the process of securely exposing your private, self-hosted services using this groundbreaking approach. We will utilize NGINX Proxy Manager and Docker, managing everything with a single Docker Compose file.</p>
<h2 id="what-is-cloudflare-zero-trust">What is Cloudflare Zero Trust?</h2>
<p>At its core, Cloudflare Zero Trust is a security framework crafted to address the complexities of modern threats. Its standout feature allows users to safely expose local services to the internet, guarding those services with the same rigor as a well-fortified fortress—impervious to unauthorized access. In a landscape where every click can open the door to vulnerabilities, this model is a game changer.</p>
<h2 id="setting-up-cloudflare-zero-trust-tunnels">Setting Up Cloudflare Zero Trust Tunnels</h2>
<p>Let’s roll up our sleeves and delve into the specifics of setting up Cloudflare Zero Trust Tunnels.</p>
<h3 id="step-1-create-your-cloudflare-account-and-domain">Step 1: Create Your Cloudflare Account and Domain</h3>
<p>To get started, you’ll need both a Cloudflare account and a domain. Once your domain is configured on Cloudflare, navigate to <strong>SSL/TLS</strong> &gt; <strong>Origin Server</strong> &gt; <strong>Create Certificate.</strong> This step will generate a certificate for your origin server (the server running your applications). Make sure to store your certificate and private key securely—it’s your digital lifeline.</p>
<h3 id="step-2-establish-the-cloudflare-tunnel">Step 2: Establish the Cloudflare Tunnel</h3>
<p>Next, let’s install Cloudflared, the utility that will create and manage your tunnel. After installation, authenticate using the command:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cloudflared tunnel login
</span></span></code></pre></div><p>Follow the prompts to link Cloudflared with your Cloudflare account.</p>
<p>Now, create your tunnel with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cloudflared tunnel create <span class="o">[</span>your tunnel name<span class="o">]</span>
</span></span></code></pre></div><p>Remember to jot down your Tunnel ID.</p>
<p>To route traffic from your domain to this tunnel, execute:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">cloudflared tunnel route dns <span class="o">[</span>your tunnel name<span class="o">]</span> <span class="o">[</span>your domain<span class="o">]</span>
</span></span></code></pre></div><p>Congratulations! Your tunnel is now established.</p>
<h3 id="step-3-setting-up-nginx-proxy-manager">Step 3: Setting Up NGINX Proxy Manager</h3>
<p>NGINX Proxy Manager (NPM) simplifies application management. To set it up, we’ll use Docker and Docker Compose. Here’s a streamlined configuration:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">version: <span class="s1">&#39;3&#39;</span>
</span></span><span class="line"><span class="cl">services:
</span></span><span class="line"><span class="cl">  app:
</span></span><span class="line"><span class="cl">    image: <span class="s1">&#39;jc21/nginx-proxy-manager:latest&#39;</span>
</span></span><span class="line"><span class="cl">    ports:
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;80:80&#39;</span>
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;81:81&#39;</span>
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;443:443&#39;</span>
</span></span><span class="line"><span class="cl">    environment:
</span></span><span class="line"><span class="cl">      DB_MYSQL_HOST: <span class="s2">&#34;db&#34;</span>
</span></span><span class="line"><span class="cl">      DB_MYSQL_PORT: <span class="m">3306</span>
</span></span><span class="line"><span class="cl">      DB_MYSQL_USER: <span class="s2">&#34;npm&#34;</span>
</span></span><span class="line"><span class="cl">      DB_MYSQL_PASSWORD: <span class="s2">&#34;npm&#34;</span>
</span></span><span class="line"><span class="cl">      DB_MYSQL_NAME: <span class="s2">&#34;npm&#34;</span>
</span></span><span class="line"><span class="cl">    volumes:
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;./data:/data&#39;</span>
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;./letsencrypt:/etc/letsencrypt&#39;</span>
</span></span><span class="line"><span class="cl">  db:
</span></span><span class="line"><span class="cl">    image: <span class="s1">&#39;jc21/mariadb-aria:latest&#39;</span>
</span></span><span class="line"><span class="cl">    environment:
</span></span><span class="line"><span class="cl">      MYSQL_ROOT_PASSWORD: <span class="s1">&#39;npm&#39;</span>
</span></span><span class="line"><span class="cl">      MYSQL_DATABASE: <span class="s1">&#39;npm&#39;</span>
</span></span><span class="line"><span class="cl">      MYSQL_USER: <span class="s1">&#39;npm&#39;</span>
</span></span><span class="line"><span class="cl">      MYSQL_PASSWORD: <span class="s1">&#39;npm&#39;</span>
</span></span><span class="line"><span class="cl">    volumes:
</span></span><span class="line"><span class="cl">      - <span class="s1">&#39;./data/mysql:/var/lib/mysql&#39;</span>
</span></span></code></pre></div><p>With this Docker Compose file in hand, start NPM and set up your proxy hosts.</p>
<h3 id="step-4-connecting-everything">Step 4: Connecting Everything</h3>
<p>Now, let&rsquo;s integrate all the components with another Docker Compose file:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">version: <span class="s1">&#39;3&#39;</span>
</span></span><span class="line"><span class="cl">services:
</span></span><span class="line"><span class="cl">  cloudflared:
</span></span><span class="line"><span class="cl">    image: cloudflare/cloudflared:2021.4.0
</span></span><span class="line"><span class="cl">    command: tunnel --no-autoupdate --url tcp://proxymanager_app_1:8080
</span></span><span class="line"><span class="cl">    networks:
</span></span><span class="line"><span class="cl">      - proxy
</span></span><span class="line"><span class="cl">    volumes:
</span></span><span class="line"><span class="cl">      - ./certs:/etc/cloudflared
</span></span><span class="line"><span class="cl">    restart: always
</span></span></code></pre></div><p>In this snippet, replace <code>proxymanager_app_1</code> with the name of your application. The <code>certs</code> folder will house the origin server certificates generated in Cloudflare.</p>
<h2 id="wrapping-up">Wrapping Up</h2>
<p>And there you have it! You’ve successfully exposed your self-hosted service through a secure tunnel, all managed seamlessly via Docker Compose. By leveraging the Cloudflare Zero Trust model, you’ve fortified your service hosting with a level of security that’s both robust and intuitive. Happy hosting!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Forward SSH Port Using UFW/Iptables</title>
      <link>https://www.sebastientaggart.com/writing/iptables-forward-default-ssh/</link>
      <pubDate>Sat, 04 Jan 2020 21:11:38 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/iptables-forward-default-ssh/</guid>
      <description>How to forward the default SSH port from the public internet to an internal containerized service.</description>
      <content:encoded><![CDATA[<p>When managing self-hosted services like Git, you may find yourself needing to forward non-standard ports—say, <code>:10022</code>. This could lead to a Git address that looks like <code>ssh://git@git.sebastientaggart.com:10022/sebastientaggart/my-project.git</code>. While this setup can function smoothly, using a non-standard port comes with its own set of challenges: public networks might block those ports, you’ll need more extensive documentation, and let’s be honest—non-standard ports can detract from the overall aesthetic of your URLs.</p>
<p>In this guide, we’ll focus on how to utilize <code>ufw</code> (Uncomplicated Firewall) to forward traffic from a standard SSH port (<code>:22</code>) on one server to a non-standard port on another. Think of this as setting up a traffic cop for your network, ensuring that requests get to their intended destination without unnecessary fuss.</p>
<h3 id="setting-up-port-forwarding">Setting Up Port Forwarding</h3>
<p>Start by editing the <code>before.rules</code> file for <code>ufw</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo vi /etc/ufw/before.rules
</span></span></code></pre></div><p>Add the following lines to the file:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">*nat
</span></span><span class="line"><span class="cl">:PREROUTING ACCEPT <span class="o">[</span>0:0<span class="o">]</span>
</span></span><span class="line"><span class="cl">:POSTROUTING ACCEPT <span class="o">[</span>0:0<span class="o">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Forward traffic from this server (1.1.1.1:22) to a remote server (2.2.2.2:10022)</span>
</span></span><span class="line"><span class="cl">-A PREROUTING -i eth0 -d 1.1.1.1 -p tcp --dport <span class="m">22</span> -j DNAT --to-destination 2.2.2.2:10022
</span></span><span class="line"><span class="cl">-A POSTROUTING -o eth0 -j MASQUERADE
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">COMMIT
</span></span></code></pre></div><p>Replace <code>1.1.1.1</code> with the IP address of your server, and <code>2.2.2.2</code> with the IP of the target server.</p>
<p>After making these changes, reload <code>ufw</code> to apply the new rules:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl restart ufw
</span></span></code></pre></div><p>To ensure everything is functioning as intended, verify your settings with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo iptables -t nat -L -n -v
</span></span></code></pre></div><p>Once you’ve completed these steps, your port <code>:22</code> will successfully forward to <code>:10022</code> on the remote server. Your Git addresses will now appear as follows: <code>ssh://git@git.sebastientaggart.com/sebastientaggart/my-project.git</code>.</p>
<h3 id="modifying-existing-rules">Modifying Existing Rules</h3>
<p>Now, what if you need to tweak existing rules? Flushing all iptables rules with <code>sudo iptables -F</code> is often too blunt an instrument; it can wreak havoc on your setup. Instead, it’s wiser to list your existing rules and delete them one by one as necessary.</p>
<p>To do this, list your current NAT rules with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">iptables -t nat --line-numbers -L -n -v
</span></span></code></pre></div><p>The <code>--line-numbers</code> option is crucial, as it allows you to reference specific rules when you want to delete them. For example, if you want to remove the second rule in the <code>PREROUTING</code> chain, you’d issue:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">iptables -t nat -D PREROUTING <span class="m">2</span>
</span></span></code></pre></div><p>Remember, the instructions above assume you&rsquo;re adding rules to <code>/etc/ufw/before.rules</code> for the first time. If modifications are necessary, be sure to remove the old rules using the <code>-D</code> option before restarting <code>ufw</code> with <code>systemctl</code>.</p>
<h3 id="in-closing">In Closing</h3>
<p>By following these steps, you can seamlessly forward SSH ports using <code>ufw</code> and ensure that your self-hosted services run smoothly. Embracing a standard like port <code>:22</code> can simplify access and improve the security posture of your applications. After all, clarity in technology often leads to enhanced usability—and who doesn’t appreciate that?</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
