<?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>Homelab on D. Sébastien Taggart</title>
    <link>https://www.sebastientaggart.com/tags/homelab/</link>
    <description>Recent content in Homelab on D. Sébastien Taggart</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Oct 2026 22:13:05 -0400</lastBuildDate>
    <atom:link href="https://www.sebastientaggart.com/tags/homelab/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Self-Hosting a Minecraft Server for My Son: Privacy, Control, and Fun with Docker</title>
      <link>https://www.sebastientaggart.com/writing/discover-the-fun-of-self-hosting-minecraft-for-your-kids/</link>
      <pubDate>Fri, 02 Sep 2022 21:52:40 -0500</pubDate>
      <guid>https://www.sebastientaggart.com/writing/discover-the-fun-of-self-hosting-minecraft-for-your-kids/</guid>
      <description>&lt;p&gt;Minecraft has transcended its status as merely a game; it’s a vibrant canvas for creativity, collaboration, and connection—especially for my son, Alexander. For him, Minecraft is more than just building elaborate castles or fending off creepers. It&amp;rsquo;s a realm where he can explore, learn, and share experiences with his friends.&lt;/p&gt;
&lt;p&gt;As a parent, however, I’m acutely aware of the risks associated with public or third-party servers. Concerns about online privacy, intrusive ads, and a lack of control over the gaming environment loom large. That’s precisely why I chose to self-host a Minecraft server for Alexander. This decision not only ensures a safe, private space for him to play, but also allows me to manage the server on our own terms.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Minecraft has transcended its status as merely a game; it’s a vibrant canvas for creativity, collaboration, and connection—especially for my son, Alexander. For him, Minecraft is more than just building elaborate castles or fending off creepers. It&rsquo;s a realm where he can explore, learn, and share experiences with his friends.</p>
<p>As a parent, however, I’m acutely aware of the risks associated with public or third-party servers. Concerns about online privacy, intrusive ads, and a lack of control over the gaming environment loom large. That’s precisely why I chose to self-host a Minecraft server for Alexander. This decision not only ensures a safe, private space for him to play, but also allows me to manage the server on our own terms.</p>
<p>And here’s the bonus: using Docker makes the whole process surprisingly straightforward. In this post, I’ll share why self-hosting is a worthy endeavor, how Docker fits into the picture, and provide a step-by-step setup guide to get you started.</p>
<hr>
<h2 id="why-self-host-a-minecraft-server">Why Self-Host a Minecraft Server?</h2>
<h3 id="1-privacy-and-security">1. Privacy and Security</h3>
<p>Public servers often demand accounts on third-party platforms, exposing players to strangers and increasing the risk of inappropriate interactions or data collection. By self-hosting, you gain control over who accesses the server, ensuring a safer environment for your child.</p>
<h3 id="2-full-control">2. Full Control</h3>
<p>With a self-hosted server, you can customize everything—from gameplay rules to mods and plugins. Want a creative-only world? Consider it done. Prefer to whitelist only Alexander’s friends? Easy as pie.</p>
<h3 id="3-no-ads-or-hidden-costs">3. No Ads or Hidden Costs</h3>
<p>Unlike some third-party services that market themselves as “free” while bombarding players with ads or microtransactions, a self-hosted server is distraction-free and fully under your control.</p>
<h3 id="4-a-learning-opportunity">4. A Learning Opportunity</h3>
<p>Setting up a server introduces both Alexander and me to fundamental concepts like hosting, networking, and system administration. It’s a hands-on lesson in how the internet operates.</p>
<hr>
<h2 id="why-use-docker-for-a-minecraft-server">Why Use Docker for a Minecraft Server?</h2>
<p>Docker streamlines the process of running applications such as a Minecraft server by encapsulating them in isolated containers. Here’s why it’s an excellent fit for this purpose:</p>
<ul>
<li><strong>Portability</strong>: Docker containers operate the same way across different systems—be it Linux, macOS, or Windows.</li>
<li><strong>Ease of Updates</strong>: Updating a Docker container is as simple as pulling the latest image.</li>
<li><strong>Resource Efficiency</strong>: Containers are lightweight, consuming fewer resources than traditional virtual machines.</li>
<li><strong>Simplicity</strong>: Docker Compose simplifies managing and configuring the server.</li>
</ul>
<hr>
<h2 id="setting-up-a-minecraft-server-with-docker">Setting Up a Minecraft Server with Docker</h2>
<h3 id="prerequisites">Prerequisites</h3>
<ol>
<li>
<p><strong>Install Docker and Docker Compose</strong></p>
<ul>
<li>Follow the official Docker installation guide for your operating system.</li>
<li>Install Docker Compose by following the provided instructions.</li>
</ul>
</li>
<li>
<p><strong>Have a Basic Understanding of Docker Commands</strong><br>
While this guide will be step-by-step, familiarity with <code>docker</code> and <code>docker-compose</code> commands will be beneficial.</p>
</li>
</ol>
<hr>
<h3 id="step-1-create-a-project-directory">Step 1: Create a Project Directory</h3>
<p>Let’s start by creating a directory for your Minecraft server setup:</p>
<pre tabindex="0"><code>mkdir minecraft-server
cd minecraft-server
</code></pre><hr>
<h3 id="step-2-write-the-docker-compose-file">Step 2: Write the Docker Compose File</h3>
<p>In your <code>minecraft-server</code> directory, create a file named <code>docker-compose.yml</code> with the following content:</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.8&#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">minecraft</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">itzg/minecraft-server:latest</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">minecraft_server</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;25565:25565&#34;</span><span class="w"> </span><span class="c"># Minecraft server port</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">EULA</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;TRUE&#34;</span><span class="w">               </span><span class="c"># Accept Minecraft&#39;s EULA</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">MAX_PLAYERS</span><span class="p">:</span><span class="w"> </span><span class="m">10</span><span class="w">            </span><span class="c"># Maximum players</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">ONLINE_MODE</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;TRUE&#34;</span><span class="w">        </span><span class="c"># Enable Mojang account verification</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">WHITELIST</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;TRUE&#34;</span><span class="w">          </span><span class="c"># Enable whitelist</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">./data:/data            </span><span class="w"> </span><span class="c"># Persist server data</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></code></pre></div><p><strong>Key Points</strong>:</p>
<ul>
<li><strong>EULA</strong>: Acceptance of the Minecraft End User License Agreement is mandatory to run a server.</li>
<li><strong>ONLINE_MODE</strong>: This setting ensures that only legitimate Mojang accounts can connect.</li>
<li><strong>WHITELIST</strong>: This restricts access to pre-approved players.</li>
</ul>
<hr>
<h3 id="step-3-start-the-server">Step 3: Start the Server</h3>
<p>To start the server, run the following command:</p>
<pre tabindex="0"><code>docker-compose up -d
</code></pre><p>The <code>-d</code> flag runs the container in detached mode, allowing it to operate in the background.</p>
<hr>
<h3 id="step-4-configure-the-server">Step 4: Configure the Server</h3>
<p>Once the server starts for the first time, it will generate configuration files in the <code>data</code> directory. To edit the whitelist or server settings:</p>
<ol>
<li>
<p>Open the <code>data/whitelist.json</code> file to add approved players (e.g., Alexander and his friends).
Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">[</span>
</span></span><span class="line"><span class="cl">  <span class="p">{</span> <span class="nt">&#34;uuid&#34;</span><span class="p">:</span> <span class="s2">&#34;player-uuid&#34;</span><span class="p">,</span> <span class="nt">&#34;name&#34;</span><span class="p">:</span> <span class="s2">&#34;PlayerName&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">]</span>
</span></span></code></pre></div></li>
<li>
<p>Modify <code>data/server.properties</code> to customize game settings like difficulty, game mode, and spawn radius.</p>
</li>
<li>
<p>Restart the server to apply changes:</p>
<pre tabindex="0"><code>docker-compose restart
</code></pre></li>
</ol>
<hr>
<h3 id="step-5-connecting-to-the-server">Step 5: Connecting to the Server</h3>
<ol>
<li>Launch Minecraft on Alexander’s computer.</li>
<li>Select <strong>Multiplayer</strong> &gt; <strong>Add Server</strong>.</li>
<li>Enter the server address: <code>localhost</code> (if hosting locally) or your LAN/External IP (if hosting remotely).</li>
</ol>
<p>For external access, you’ll need to configure port forwarding on your router to allow connections to port <code>25565</code>.</p>
<hr>
<h3 id="step-6-monitor-and-maintain-the-server">Step 6: Monitor and Maintain the Server</h3>
<ul>
<li>
<p><strong>Check Logs</strong>:<br>
To troubleshoot, view server logs using:</p>
<pre tabindex="0"><code>docker-compose logs -f minecraft
</code></pre></li>
<li>
<p><strong>Update the Server</strong>:<br>
To update the Minecraft server image, run:</p>
<pre tabindex="0"><code>docker-compose pull
docker-compose up -d
</code></pre></li>
<li>
<p><strong>Back Up Data</strong>:<br>
Regular backups of the <code>data</code> directory are crucial to preserve worlds and configurations:</p>
<pre tabindex="0"><code>tar -czvf minecraft-backup.tar.gz data/
</code></pre></li>
</ul>
<hr>
<h2 id="extra-features-to-consider">Extra Features to Consider</h2>
<ul>
<li>
<p><strong>Install Mods or Plugins</strong>:<br>
Consider using Forge or PaperMC (available via the same Docker image) to add mods or plugins for a richer gaming experience.</p>
</li>
<li>
<p><strong>Enable Resource Limits</strong>:<br>
Add resource constraints in your <code>docker-compose.yml</code> to prevent the server from consuming excessive CPU or memory:</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">deploy</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">resources</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">limits</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">cpus</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;1.0&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">memory</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;2G&#34;</span><span class="w">
</span></span></span></code></pre></div></li>
</ul>
<hr>
<h2 id="final-thoughts">Final Thoughts</h2>
<p>This setup is about more than just playing Minecraft; it’s about crafting a space for creativity, learning, and collaboration while imparting valuable lessons about technology and privacy.</p>
<p>And perhaps most rewarding of all? I can rest easy knowing that Alexander’s digital playground is safe, ad-free, and entirely under our control.</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>
  </channel>
</rss>
