<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Farhan Hamid Lubis</title>
    <description>The latest articles on DEV Community by Farhan Hamid Lubis (@farhan_hl).</description>
    <link>https://dev.to/farhan_hl</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4275429%2Fefb0cb7f-23d7-4c9e-95aa-a31d0e82c516.png</url>
      <title>DEV Community: Farhan Hamid Lubis</title>
      <link>https://dev.to/farhan_hl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhan_hl"/>
    <language>en</language>
    <item>
      <title>I Built a Self-Hosted Cloud. Here's What Happened When My Family Started Using It</title>
      <dc:creator>Farhan Hamid Lubis</dc:creator>
      <pubDate>Wed, 02 Dec 2026 04:32:52 +0000</pubDate>
      <link>https://dev.to/farhan_hl/i-built-a-self-hosted-cloud-heres-what-happened-when-my-family-started-using-it-1fcp</link>
      <guid>https://dev.to/farhan_hl/i-built-a-self-hosted-cloud-heres-what-happened-when-my-family-started-using-it-1fcp</guid>
      <description>&lt;p&gt;Architecture diagrams always look tidy on paper. Reality shows up when you start uploading thousands of family videos and actually depend on your home server every day.&lt;/p&gt;

&lt;p&gt;In this final post, I'll share some of the problems and improvements that came out of daily use: a 3.5-hour GPU transcoding freeze, setting up photo synchronization for me and my family, building a zero-cloud backup script using only built-in Windows tools, and running a live Vaultwarden restore drill to make sure the backups actually work.&lt;/p&gt;

&lt;p&gt;Let's get into it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj5hx8yzenkipzbz2iz7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj5hx8yzenkipzbz2iz7b.png" alt=" Zero-cloud family home server flow showing two phones backing up over WireGuard Tailscale to an 8 GB home server running Immich with VAAPI transcoding and Vaultwarden, paired with daily encrypted restic backups, native Windows pull, and a verified restore drill" width="800" height="450"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h2&gt;
  
  
  1. The 3.5-Hour Video Transcoding Freeze (and the One-Setting Fix)
&lt;/h2&gt;

&lt;p&gt;During our initial bulk upload of phone videos into &lt;strong&gt;Immich (&lt;code&gt;CT 121&lt;/code&gt;)&lt;/strong&gt;, the video conversion queue suddenly stopped making progress.&lt;/p&gt;

&lt;p&gt;The confusing part was that everything looked healthy on the surface.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ops-health-check&lt;/code&gt; showed all four Immich containers as &lt;code&gt;Up (healthy)&lt;/code&gt;. The container still had around 3 GB of free RAM, and Proxmox &lt;code&gt;dmesg&lt;/code&gt; showed no OOM kills or GPU hangs.&lt;/p&gt;

&lt;p&gt;So, what was happening?&lt;/p&gt;

&lt;p&gt;I checked &lt;code&gt;docker logs&lt;/code&gt; and inspected the running processes directly on &lt;code&gt;CT 121&lt;/code&gt;. That's where I found the culprit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every previous video had finished transcoding in &lt;strong&gt;2 to 10 seconds&lt;/strong&gt; using Intel Quick Sync (&lt;code&gt;QSV&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Then, at 6:46 PM, one &lt;code&gt;.mov&lt;/code&gt; file triggered a problem with the 7th-gen integrated graphics (HD 630 / Kaby Lake).&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;ffmpeg&lt;/code&gt; process running &lt;code&gt;h264_qsv&lt;/code&gt; and &lt;code&gt;scale_qsv&lt;/code&gt; had deadlocked at &lt;strong&gt;0.0% CPU usage&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It wasn't crashing. It wasn't consuming resources. It was simply stuck, quietly blocking the entire video conversion queue for three and a half hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  The fix, without restarting Docker
&lt;/h3&gt;

&lt;p&gt;I didn't want to restart the entire Immich stack just to deal with one stuck worker.&lt;/p&gt;

&lt;p&gt;Here's what I did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unstick the worker.&lt;/strong&gt; I ran &lt;code&gt;kill -9 &amp;lt;ffmpeg-pid&amp;gt;&lt;/code&gt; on &lt;code&gt;CT 121&lt;/code&gt;. This immediately released the queue without restarting Docker, PostgreSQL, or the Web UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch hardware acceleration from QSV to VAAPI.&lt;/strong&gt; In the Immich Admin UI, under &lt;strong&gt;Settings &amp;gt; Video Transcoding Settings&lt;/strong&gt;, I switched the hardware acceleration option to VAAPI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update the documentation.&lt;/strong&gt; I updated &lt;code&gt;kb/services/zone2-immich-121.md&lt;/code&gt; and the corresponding Ansible role message so future deployments would use VAAPI by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;VAAPI still uses the same &lt;code&gt;/dev/dri/renderD128&lt;/code&gt; hardware device, so I could keep hardware acceleration without relying on the QSV path that was causing trouble on this machine.&lt;/p&gt;

&lt;p&gt;One thing I learned here: a healthy container doesn't necessarily mean a healthy application. Sometimes you have to look one layer deeper.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Making It Painless for Us: Immich, Vaultwarden, and Tailscale
&lt;/h2&gt;

&lt;p&gt;A self-hosted cloud only makes sense as a replacement for commercial services if the people using it don't have to fight with it.&lt;/p&gt;

&lt;p&gt;I didn't build this just for myself. My family needs to be able to back up photos, browse albums, and access our shared services without worrying about how the infrastructure works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up separate Immich accounts
&lt;/h3&gt;

&lt;p&gt;I wanted my family to have separate accounts while still having a shared photo experience.&lt;/p&gt;

&lt;p&gt;The setup is fairly straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One account per person.&lt;/strong&gt; I keep the Admin account for maintenance and created a regular User account for my family.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure Storage Labels before the first upload.&lt;/strong&gt; I assigned labels such as &lt;code&gt;admin&lt;/code&gt; and a readable label for my family. This keeps original files organized on disk under paths like &lt;code&gt;library/&amp;lt;label&amp;gt;/2026/11-November/...&lt;/code&gt; instead of relying on random UUID folders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enable Partner Sharing and Shared Albums.&lt;/strong&gt; Partner Sharing with "Show in timeline" enabled gives us an effortless shared timeline while keeping account ownership separate. For family trips and events, Shared Albums with Editor access work well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Back up the metadata.&lt;/strong&gt; User accounts, face detection, named People, Smart Search embeddings, Partner Sharing, albums, and UI settings are stored in Immich's PostgreSQL database. That database is included in the nightly Track 1 &lt;code&gt;restic&lt;/code&gt; backup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This last point is important. Backing up the original photos alone isn't enough if you also want to preserve the organization and experience you've built around them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile backups without self-signed SSL headaches
&lt;/h3&gt;

&lt;p&gt;For remote access, I use a single &lt;strong&gt;Tailscale subnet router (&lt;code&gt;CT 132&lt;/code&gt;)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It advertises &lt;code&gt;192.168.100.0/24&lt;/code&gt;, with key expiry disabled, and uses Split DNS to resolve:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;haytham.internal -&amp;gt; 192.168.100.30&lt;/code&gt; (Pi-hole)&lt;/p&gt;

&lt;p&gt;This gives our devices access to the home network without opening ports on the home router.&lt;/p&gt;

&lt;p&gt;For browser access on laptops and desktops, &lt;strong&gt;Nginx Proxy Manager (&lt;code&gt;CT 131&lt;/code&gt;)&lt;/strong&gt; handles HTTPS using a wildcard self-signed certificate (&lt;code&gt;*.haytham.internal&lt;/code&gt;). The certificate has an 825-day validity period for Apple compatibility.&lt;/p&gt;

&lt;p&gt;After locking Vaultwarden signups back down with &lt;code&gt;SIGNUPS_ALLOWED="false"&lt;/code&gt;, I also stored all three certificate files (&lt;code&gt;.crt&lt;/code&gt;, &lt;code&gt;.key&lt;/code&gt;, and &lt;code&gt;.cnf&lt;/code&gt;) as encrypted attachments inside Vaultwarden.&lt;/p&gt;

&lt;p&gt;There's one mobile-specific detail worth mentioning.&lt;/p&gt;

&lt;p&gt;Instead of pointing the Immich mobile apps to the internal HTTPS hostname, I configured them to use:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://192.168.100.21:2283&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The connection goes through Tailscale. When we're connected to home Wi-Fi, uploads travel directly over the local network. When we're on cellular, Tailscale provides WireGuard end-to-end encryption.&lt;/p&gt;

&lt;p&gt;This also avoids the iOS self-signed certificate friction that can get in the way of background photo backups.&lt;/p&gt;

&lt;p&gt;The result is pretty simple: my family and I can use Immich without having to think about certificates, reverse proxies, or network routing.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Zero-Cloud, Zero-Samba Backups Using Only Built-In Windows Tools
&lt;/h2&gt;

&lt;p&gt;I wanted our backups to exist on more than one physical drive.&lt;/p&gt;

&lt;p&gt;The setup uses the Proxmox 1 TB SSD as the primary storage, with copies pulled to my local PC and an external USB drive.&lt;/p&gt;

&lt;p&gt;The requirements were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No cloud storage.&lt;/li&gt;
&lt;li&gt;No Samba shares.&lt;/li&gt;
&lt;li&gt;No dependency on the disposable &lt;code&gt;haytham-ctl&lt;/code&gt; control VM.&lt;/li&gt;
&lt;li&gt;A backup copy that remains available even if the homelab itself becomes inaccessible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's how the two backup tracks work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Proxmox Host (.2)
 ├── Track 1 (Daily 03:00)
 │     SQLite .backup + pg_dumpall
 │     └── Encrypted restic repository (7d / 4w)
 │
 ├── Track 1b (Sun 03:30)
 │     Proxmox vzdump snapshots (zstd)
 │
 ├── Track 1 Pull (atomic swap)
 │     └──► Local PC / External USB
 │          Dedicated break-glass SSH key
 │          pull-homelab-backups.bat
 │          Windows ssh.exe + tar.exe
 │
 └── Track 2 Incremental Pull (no deletes)
      CT 121 Immich (.21)
       └── library/, upload/, profile/
            └──► Local PC / External USB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Track 1 pulls the encrypted backup repository and Proxmox snapshots. Track 2 separately pulls the original Immich library data.&lt;/p&gt;

&lt;p&gt;I use a simple Windows batch script, scripts/pull-homelab-backups.bat, to handle the transfers. It relies on Windows' built-in SSH and TAR tools, so I don't need WSL, Samba shares, or additional software just to retrieve my backups.&lt;/p&gt;

&lt;p&gt;I also made Track 2 incremental. It checks relative paths and file sizes, skipping files that have already been backed up.&lt;/p&gt;

&lt;p&gt;One deliberate decision: Track 2 never propagates deletions.&lt;/p&gt;

&lt;p&gt;If I accidentally delete something from Immich, that deletion won't wipe the corresponding file from my PC backup.&lt;/p&gt;

&lt;p&gt;I want the local copy to protect me from mistakes, not reproduce them.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Proving It Works: A Live Vaultwarden Restore Drill
&lt;/h2&gt;

&lt;p&gt;An untested backup is just a wish.&lt;/p&gt;

&lt;p&gt;I didn't want to call the homelab finished simply because &lt;code&gt;restic&lt;/code&gt; was running every night. I wanted to know whether I could actually recover something from it.&lt;/p&gt;

&lt;p&gt;So I ran a live restore drill on &lt;strong&gt;Vaultwarden (&lt;code&gt;CT 120&lt;/code&gt;)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's what I did:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a fresh backup.&lt;/strong&gt; I triggered &lt;code&gt;homelab-backup.service&lt;/code&gt; immediately after creating our Vaultwarden account and uploading the SSL certificate attachments. Then I ran &lt;code&gt;restic check&lt;/code&gt;, which returned &lt;code&gt;no errors were found&lt;/code&gt; across all snapshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extract the snapshot.&lt;/strong&gt; I extracted the latest snapshot into &lt;code&gt;/tmp/vw-restore&lt;/code&gt; on Proxmox and verified that it contained both &lt;code&gt;db.sqlite3&lt;/code&gt; and all three encrypted attachment blobs inside &lt;code&gt;vw-files.tar.gz&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restore the database.&lt;/strong&gt; I stopped the live Vaultwarden container and removed the stale SQLite WAL files (&lt;code&gt;db.sqlite3-wal&lt;/code&gt; and &lt;code&gt;db.sqlite3-shm&lt;/code&gt;) so old WAL frames wouldn't conflict with the restored database. Then I copied the restored &lt;code&gt;db.sqlite3&lt;/code&gt; into &lt;code&gt;/opt/vaultwarden/vw-data/&lt;/code&gt;, started the container again, and removed &lt;code&gt;/tmp/vw-restore&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify the application.&lt;/strong&gt; I logged back into &lt;code&gt;https://vaultwarden.haytham.internal&lt;/code&gt; and successfully downloaded the SSL certificate attachments.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This was a small test, but it proved something important: the backup wasn't just a collection of files sitting on disk. I could actually restore the application and access its data again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keeping recovery secrets outside the homelab
&lt;/h3&gt;

&lt;p&gt;There's one more detail worth mentioning.&lt;/p&gt;

&lt;p&gt;If the Proxmox SSD dies completely, I don't want to discover that the credentials needed to recover everything are stored inside the system I'm trying to recover.&lt;/p&gt;

&lt;p&gt;To avoid that circular dependency, I keep a small set of offline recovery secrets outside the homelab.&lt;/p&gt;

&lt;p&gt;They are stored on a printed emergency sheet and in KeePassXC on an encrypted USB drive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vaultwarden Master Password&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vault_restic_password&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Infisical &lt;code&gt;ENCRYPTION_KEY&lt;/code&gt; and &lt;code&gt;AUTH_SECRET&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the credentials I need to avoid locking myself out during a full recovery.&lt;/p&gt;




&lt;h2&gt;
  
  
  Looking Back
&lt;/h2&gt;

&lt;p&gt;This entire project started because I wanted to stop paying a monthly bill for cloud photo storage.&lt;/p&gt;

&lt;p&gt;Somewhere along the way, that small annoyance turned into an 8 GB mini PC running eight daily services, organized into security zones, documented in a RAG-ready Knowledge Base, managed with Terraform and Ansible, and supported by an AI agent isolated behind a four-layer security architecture.&lt;/p&gt;

&lt;p&gt;It also gave us something more practical than another infrastructure project: a private family cloud that we can actually use every day.&lt;/p&gt;

&lt;p&gt;There are still things I want to improve.&lt;/p&gt;

&lt;p&gt;My next upgrade will probably be moving from 8 GB to 16 GB of RAM. After that, I plan to move the router's primary DNS to Pi-hole and enable Home Assistant OS and shared PostgreSQL in Terraform.&lt;/p&gt;

&lt;p&gt;But for now, the system does what I originally wanted it to do.&lt;/p&gt;

&lt;p&gt;Our photos are backed up locally, our passwords are self-hosted, and I have a recovery process that I've actually tested.&lt;/p&gt;

&lt;p&gt;No monthly cloud storage bill required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full GitHub repository:&lt;/strong&gt; &lt;a href="https://github.com/farhanhl-ds/zero-trust-homelab" rel="noopener noreferrer"&gt;github.com/farhanhl-ds/zero-trust-homelab&lt;/a&gt;&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>immich</category>
      <category>backups</category>
      <category>homelab</category>
    </item>
    <item>
      <title>How I Isolated an AI Coding Agent from My Homelab Infrastructure</title>
      <dc:creator>Farhan Hamid Lubis</dc:creator>
      <pubDate>Wed, 02 Dec 2026 04:11:35 +0000</pubDate>
      <link>https://dev.to/farhan_hl/how-i-isolated-an-ai-coding-agent-from-my-homelab-infrastructure-4i8i</link>
      <guid>https://dev.to/farhan_hl/how-i-isolated-an-ai-coding-agent-from-my-homelab-infrastructure-4i8i</guid>
      <description>&lt;p&gt;Giving an AI coding agent access to your infrastructure repository can be incredibly useful. It can inspect configurations, troubleshoot services, modify code, and help maintain the entire setup.&lt;/p&gt;

&lt;p&gt;But there's an important question: how much access should it actually have?&lt;/p&gt;

&lt;p&gt;A lot of people give AI coding agents shell access, SSH keys, and access to environment files, then rely on system prompts to tell them what not to do.&lt;/p&gt;

&lt;p&gt;I wasn't comfortable with that approach.&lt;/p&gt;

&lt;p&gt;System prompts are instructions, not security boundaries. An internet-connected agent can encounter malicious instructions hidden in a web page, log file, or package README. It can also generate an incorrect command, misunderstand a task, or accidentally expose sensitive information.&lt;/p&gt;

&lt;p&gt;When I introduced an AI agent to my homelab in Part 2, I wanted to approach this differently.&lt;/p&gt;

&lt;p&gt;My starting assumption was simple: &lt;strong&gt;the agent will eventually make a mistake, and I need to make sure that mistake cannot cause serious damage.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article covers the four security layers I implemented to isolate the agent from the rest of my infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6kij38b6yg3482btwz4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6kij38b6yg3482btwz4u.png" alt="Four-layer zero-trust security boundary diagram isolating an untrusted AI agent inside a disposable NAT VM with a kernel firewall dropping LAN traffic, allowing only three read-only wrappers through a human-gated operator to Proxmox VE and immutable Zone 1 Infisical" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Defining the Threat Model
&lt;/h2&gt;

&lt;p&gt;Before configuring firewalls or changing permissions, I identified three things I wanted to protect against.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Access to the rest of my home network&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the control VM running the AI agent gets compromised, I don't want it to become a stepping stone to my main PC, home router, or other devices connected to Wi-Fi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Unauthorized access to sensitive data and infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A prompt injection or an incorrect command should not be enough to access &lt;code&gt;.vault_pass&lt;/code&gt;, &lt;code&gt;terraform.tfvars&lt;/code&gt;, SSH keys, or destroy the 500 GB of family photos stored in Immich and passwords stored in Vaultwarden.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Difficult recovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If I ever suspect the control VM has been compromised, I want to be able to discard it and rebuild a clean environment in minutes, rather than spending an entire weekend figuring out what happened.&lt;/p&gt;

&lt;p&gt;These requirements became the foundation of my security design, documented in &lt;code&gt;ADR-008&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Four-Layer Security Architecture
&lt;/h2&gt;

&lt;p&gt;I separated the environment into a disposable control VM, a human-operated management account, and the Proxmox infrastructure itself.&lt;/p&gt;

&lt;p&gt;Here's how the pieces fit together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Main Host PC
(Blocks inbound connections from VMnet8)
    │
    │ Unidirectional SSH
    ▼
Disposable Control VM: haytham-ctl
(VMware NAT · No shared folders or USB)
    │
    ├── homelab-agent (AI)
    │    ├── No sudo
    │    ├── No SSH keys
    │    ├── No secret access
    │    ├── Kernel UID firewall
    │    │   DROP 192.168.0.0/16
    │    └── 3 read-only wrappers
    │        ├── plan
    │        ├── check
    │        └── health
    │
    └── homelab-ops (Human Gate)
         ├── Read-only Infisical identity
         ├── RAM-only secrets (/dev/shm)
         └── Human-approved operations
              ├── ops-tf-apply
              └── ops-ansible-apply
                      │
                      ▼
                  Proxmox VE
                  (.2 · Hardened RBAC)
                      │
                      ├── Zone 1 (.10)
                      │   CT 110 Infisical
                      │   protection=1
                      │   No Terraform ACL
                      │
                      ├── Zone 2 (.20 to .21)
                      │   Vaultwarden &amp;amp; Immich
                      │   protection=1
                      │   No destructive access
                      │
                      └── Zones 3 to 4
                          Rebuildable infrastructure
                          and dashboards
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The architecture has four layers. Each one addresses a different part of the threat model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: Isolating the Control VM and Blocking LAN Access
&lt;/h2&gt;

&lt;p&gt;The first layer is the machine running the AI agent.&lt;/p&gt;

&lt;p&gt;My control node, &lt;code&gt;haytham-ctl&lt;/code&gt;, runs Ubuntu 24.04 inside a local VMware VM. From the beginning, I treat this machine as untrusted and disposable.&lt;/p&gt;

&lt;p&gt;I don't want a compromised control VM to have an easy path back to my main workstation or the rest of the home network.&lt;/p&gt;

&lt;p&gt;I implemented several restrictions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VMware isolation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The VM uses VMware NAT through &lt;code&gt;VMnet8&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I also disabled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shared Folders&lt;/li&gt;
&lt;li&gt;Drag and Drop&lt;/li&gt;
&lt;li&gt;Copy and Paste&lt;/li&gt;
&lt;li&gt;USB auto-connect&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These settings reduce the number of ways data can move between the host and guest environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Host firewall&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I added a firewall script on my main PC that blocks inbound connections initiated from the &lt;code&gt;VMnet8&lt;/code&gt; subnet.&lt;/p&gt;

&lt;p&gt;The idea is to prevent the control VM from initiating connections into the host machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restricted SSH access&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I connect from my desktop terminal into &lt;code&gt;haytham-ctl&lt;/code&gt;, rather than allowing the control VM to initiate SSH connections back to my desktop.&lt;/p&gt;

&lt;p&gt;The SSH configuration includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AllowUsers farhan
PasswordAuthentication no

AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also disabled legacy TTY injection through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dev.tty.legacy_tiocsti = 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helps prevent terminal input injection through the legacy TIOCSTI mechanism.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default-deny outbound firewall&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inside the VM, UFW follows a default-deny approach for outbound traffic.&lt;/p&gt;

&lt;p&gt;The control VM can only reach the specific destinations required for normal operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proxmox &lt;code&gt;.2&lt;/code&gt; for SSH and API access.&lt;/li&gt;
&lt;li&gt;Infisical &lt;code&gt;.10:8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Active services in Zones 2 to 4.&lt;/li&gt;
&lt;li&gt;Public HTTPS and DNS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The home router (&lt;code&gt;.1&lt;/code&gt;), main PC, reserved address ranges, and other LAN clients are explicitly blocked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kernel-level UID firewall&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UFW alone wasn't enough for my intended isolation.&lt;/p&gt;

&lt;p&gt;I wanted a restriction that specifically applies to the AI agent, regardless of which application or command it uses.&lt;/p&gt;

&lt;p&gt;So I added a persistent netfilter rule through &lt;code&gt;haytham-agent-egress.service&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The rule matches the Linux UID of &lt;code&gt;homelab-agent&lt;/code&gt; and drops all traffic destined for:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This means that even if the agent tries something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://192.168.100.10:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc 192.168.100.2 8006
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the kernel rejects the traffic.&lt;/p&gt;

&lt;p&gt;This is an additional restriction on top of UFW, specifically tied to the agent's operating-system identity.&lt;/p&gt;

&lt;p&gt;The important distinction is that the restriction doesn't depend on whether the agent understands or follows its instructions. The operating system enforces it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 2: Separating AI Permissions from Human Operations
&lt;/h2&gt;

&lt;p&gt;Network isolation protects the rest of my LAN, but it doesn't solve everything.&lt;/p&gt;

&lt;p&gt;The agent still needs to work with the infrastructure repository. It needs to edit Terraform files, update Ansible playbooks, inspect documentation, and run checks.&lt;/p&gt;

&lt;p&gt;At the same time, I don't want it to have unrestricted access to deployment commands or secrets.&lt;/p&gt;

&lt;p&gt;Inside &lt;code&gt;haytham-ctl&lt;/code&gt;, I use two separate Linux accounts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;homelab-agent&lt;/code&gt;: Used by the AI agent for development and inspection.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;homelab-ops&lt;/code&gt;: Used by me for privileged infrastructure operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both accounts work with the shared Git repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/srv/haytham-homelab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The repository uses the &lt;code&gt;homelab-ops:homelab-repo&lt;/code&gt; group with permissions set to &lt;code&gt;2775&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's how I divide the responsibilities:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Executed As&lt;/th&gt;
&lt;th&gt;Mechanism&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Edit Terraform, Ansible, KB, and scripts&lt;/td&gt;
&lt;td&gt;&lt;code&gt;homelab-agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Normal Git workspace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform plan&lt;/td&gt;
&lt;td&gt;&lt;code&gt;homelab-agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ops-tf-plan&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ansible dry-run&lt;/td&gt;
&lt;td&gt;&lt;code&gt;homelab-agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ops-ansible-check&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Live health checks&lt;/td&gt;
&lt;td&gt;&lt;code&gt;homelab-agent&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ops-health-check&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform apply&lt;/td&gt;
&lt;td&gt;Human (&lt;code&gt;homelab-ops&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Interactive TTY and &lt;code&gt;APPLY&lt;/code&gt; confirmation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ansible apply&lt;/td&gt;
&lt;td&gt;Human (&lt;code&gt;homelab-ops&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Interactive TTY and &lt;code&gt;YES&lt;/code&gt; confirmation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret rotation&lt;/td&gt;
&lt;td&gt;Human&lt;/td&gt;
&lt;td&gt;Infisical Web UI with MFA and audit log&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disaster recovery unlock&lt;/td&gt;
&lt;td&gt;Human&lt;/td&gt;
&lt;td&gt;Break-glass SSH&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The agent has access to only three predefined, root-owned wrapper commands through a scoped &lt;code&gt;sudoers&lt;/code&gt; configuration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;ops-tf-plan&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ops-ansible-check&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ops-health-check&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These allow the agent to perform most of the preparation work without giving it unrestricted shell access.&lt;/p&gt;

&lt;p&gt;For example, it can modify Terraform configurations, run a plan, inspect the proposed changes, and check whether services are healthy.&lt;/p&gt;

&lt;p&gt;But the final &lt;code&gt;terraform apply&lt;/code&gt; or &lt;code&gt;ansible-playbook&lt;/code&gt; operation remains under human control.&lt;/p&gt;

&lt;p&gt;I have to switch to &lt;code&gt;homelab-ops&lt;/code&gt;, review the changes, and explicitly type &lt;code&gt;APPLY&lt;/code&gt; or &lt;code&gt;YES&lt;/code&gt; before the operation proceeds.&lt;/p&gt;

&lt;p&gt;This keeps the daily workflow relatively convenient while making sure that infrastructure changes with real consequences require human approval.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 3: Keeping Secrets Outside the Agent's Reach
&lt;/h2&gt;

&lt;p&gt;One thing I wanted to avoid was storing infrastructure credentials directly on the control VM.&lt;/p&gt;

&lt;p&gt;Files like &lt;code&gt;.vault_pass&lt;/code&gt;, plaintext &lt;code&gt;terraform.tfvars&lt;/code&gt;, and SSH private keys should never be accessible to the AI agent.&lt;/p&gt;

&lt;p&gt;Instead, I keep infrastructure secrets in &lt;strong&gt;Infisical&lt;/strong&gt;, running in Zone 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CT 110
192.168.100.10:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instance is provisioned separately from Terraform and protected at the hypervisor level.&lt;/p&gt;

&lt;p&gt;The human-operated account, &lt;code&gt;homelab-ops&lt;/code&gt;, holds a read-only Infisical Machine Identity called &lt;code&gt;homelab-ops-ro&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Its credentials are stored here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/haytham-ops/infisical-ops.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file has &lt;code&gt;0600&lt;/code&gt; permissions and belongs to the human-operated account. The AI agent cannot read it.&lt;/p&gt;

&lt;p&gt;When an &lt;code&gt;ops-*&lt;/code&gt; wrapper runs, it retrieves the required secrets from Infisical.&lt;/p&gt;

&lt;p&gt;Instead of writing them to persistent storage, the wrapper loads them into temporary locations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RAM-backed files under &lt;code&gt;/dev/shm&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Ephemeral &lt;code&gt;TF_VAR_*&lt;/code&gt; environment variables for Terraform.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The wrapper also starts a short-lived &lt;code&gt;ssh-agent&lt;/code&gt; when needed.&lt;/p&gt;

&lt;p&gt;After the operation finishes, an &lt;code&gt;EXIT&lt;/code&gt; trap shreds the temporary files.&lt;/p&gt;

&lt;p&gt;The Machine Identity itself is read-only, meaning even &lt;code&gt;homelab-ops&lt;/code&gt; cannot modify or delete the secrets stored in Infisical through that identity.&lt;/p&gt;

&lt;p&gt;This gives me a useful separation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI agent can work with infrastructure code.&lt;/li&gt;
&lt;li&gt;The human-operated account can retrieve the credentials required for operations.&lt;/li&gt;
&lt;li&gt;The secrets remain outside the agent's accessible environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important part is that the agent doesn't need to know the actual credentials to help prepare infrastructure changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Layer 4: Protecting Critical Data at the Hypervisor Level
&lt;/h2&gt;

&lt;p&gt;The previous layers restrict what the agent can do inside the control VM.&lt;/p&gt;

&lt;p&gt;But what if someone manages to compromise &lt;code&gt;homelab-ops&lt;/code&gt; itself?&lt;/p&gt;

&lt;p&gt;I wanted another boundary that doesn't depend entirely on the security of the control VM.&lt;/p&gt;

&lt;p&gt;That's where Proxmox RBAC comes in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scoped Proxmox Permissions
&lt;/h3&gt;

&lt;p&gt;I configured &lt;code&gt;harden-pve-rbac.sh&lt;/code&gt; to remove the global &lt;code&gt;PVEVMAdmin&lt;/code&gt; permission from &lt;code&gt;/&lt;/code&gt; for the Terraform API identity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform@pve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of granting broad permissions across the entire Proxmox environment, I separated the infrastructure into two resource pools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ephemeral pool&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/pool/homelab-ephemeral
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terraform gets the permissions needed for the full lifecycle of resources in this pool.&lt;/p&gt;

&lt;p&gt;This covers Zones 3 and 4, including network infrastructure and dashboards that can be rebuilt if necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protected pool&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/pool/homelab-protected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contains Zone 2 services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vaultwarden&lt;/li&gt;
&lt;li&gt;Immich&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Terraform only receives a custom non-destructive role called &lt;code&gt;HomelabProtectedOps&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In addition, every Zone 1 and Zone 2 container has:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This provides another layer of protection against accidental destructive operations at the hypervisor level.&lt;/p&gt;

&lt;p&gt;The distinction is important: not every container has the same recovery cost. Network services and dashboards are relatively easy to rebuild. Family photos and password vaults are not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three Separate SSH Keys
&lt;/h3&gt;

&lt;p&gt;I also separated SSH access into three different keys.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;id_ed25519&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Main PC only&lt;/td&gt;
&lt;td&gt;Break-glass access and backup pulling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;id_ed25519_haytham_ctl&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Main PC&lt;/td&gt;
&lt;td&gt;SSH and SCP into the control VM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;id_ed25519_control&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Control VM&lt;/td&gt;
&lt;td&gt;Revocable infrastructure access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first key never gets copied to &lt;code&gt;haytham-ctl&lt;/code&gt;. It is reserved for direct access to Proxmox &lt;code&gt;.2&lt;/code&gt;, Infisical &lt;code&gt;.10&lt;/code&gt;, and pulling backups.&lt;/p&gt;

&lt;p&gt;The second key is only used to connect from my desktop to the control VM.&lt;/p&gt;

&lt;p&gt;The third key is generated inside the control VM. It is not stored in Zone 1 and is automatically rotated whenever I rebuild the control environment.&lt;/p&gt;

&lt;p&gt;This way, compromising the control VM doesn't automatically expose the SSH credentials I use for direct recovery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rebuilding the Control VM in Under 10 Minutes
&lt;/h3&gt;

&lt;p&gt;The final piece is recovery.&lt;/p&gt;

&lt;p&gt;I don't want to spend hours cleaning up a potentially compromised machine. I'd rather discard it and start from a known-good state.&lt;/p&gt;

&lt;p&gt;Before storing any operational state, I take a clean VMware snapshot called:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;The control-node state is then packaged into an encrypted archive using &lt;code&gt;age&lt;/code&gt; through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ops-bundle pack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The archive contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;terraform.tfstate&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Non-secret &lt;code&gt;terraform.tfvars&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;infisical-ops.env&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The revocable SSH private key, &lt;code&gt;id_ed25519_control&lt;/code&gt;, is deliberately excluded.&lt;/p&gt;

&lt;p&gt;If I suspect the control VM has been compromised, the recovery procedure is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Revert the VM to the &lt;code&gt;clean-base&lt;/code&gt; snapshot.&lt;/li&gt;
&lt;li&gt;Revoke the old SSH key and Infisical identity.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;ops-bundle unpack&lt;/code&gt; to restore the required operational state.&lt;/li&gt;
&lt;li&gt;Generate a fresh SSH keypair automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is to get back to a clean control environment in under ten minutes.&lt;/p&gt;

&lt;p&gt;This doesn't mean the entire Proxmox infrastructure can be recovered in ten minutes. It means the management environment can be replaced quickly without rebuilding everything it manages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing the Security Boundaries
&lt;/h2&gt;

&lt;p&gt;I didn't want to assume that the configuration was correct just because the firewall rules and permissions looked right.&lt;/p&gt;

&lt;p&gt;A security boundary needs to be tested from the perspective of someone trying to cross it.&lt;/p&gt;

&lt;p&gt;So I added a set of negative security tests that must fail whenever I build or rebuild the control VM.&lt;/p&gt;

&lt;p&gt;Here are some examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Testing Secret and Privilege Restrictions
&lt;/h3&gt;

&lt;p&gt;As &lt;code&gt;homelab-agent&lt;/code&gt;, attempts to access human-only files or execute privileged operations must fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Secret access must fail&lt;/span&gt;
sudo -u homelab-agent \
  cat /var/lib/haytham-ops/infisical-ops.env

sudo -u homelab-agent \
  cat /var/lib/haytham-ops/.ssh/id_ed25519_control

&lt;span class="c"&gt;# Privileged operations must fail&lt;/span&gt;
sudo -u homelab-agent \
  sudo -u homelab-ops \
  /usr/local/libexec/haytham-ops/ops-tf-apply

sudo -u homelab-agent \
  sudo -u homelab-ops \
  /usr/local/libexec/haytham-ops/ops-ansible-check &lt;span class="s2"&gt;"zone3_infra.yml; id"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Testing the Kernel-Level Network Block
&lt;/h3&gt;

&lt;p&gt;The agent must not be able to reach the protected LAN endpoints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo -u homelab-agent \
  curl -m 2 http://192.168.100.10:8080/api/status

sudo -u homelab-agent \
  nc -zw2 192.168.100.2 8006
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both attempts should be rejected by the kernel firewall.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Testing SSH Restrictions
&lt;/h3&gt;

&lt;p&gt;From my main PC, I also test that the control VM rejects unauthorized SSH access and forwarding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Root login must fail&lt;/span&gt;
ssh root@&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;HAYTHAM_CTL_IP&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Human operations account must not be directly accessible&lt;/span&gt;
ssh homelab-ops@&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;HAYTHAM_CTL_IP&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;# Agent forwarding must fail&lt;/span&gt;
ssh -A haytham-ctl &lt;span class="s2"&gt;"ssh-add -l"&lt;/span&gt;

&lt;span class="c"&gt;# TCP forwarding must fail&lt;/span&gt;
ssh -L 9999:192.168.100.10:8080 haytham-ctl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These tests cover different boundaries: operating-system permissions, secret isolation, network access, and SSH configuration.&lt;/p&gt;

&lt;p&gt;My rule is simple: &lt;strong&gt;all forbidden operations must fail, while the three approved read-only wrappers must continue to work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only then do I consider the control VM ready for use.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Coming in Part 4
&lt;/h2&gt;

&lt;p&gt;With the infrastructure automated, documented, and protected, the next step was simply to use it.&lt;/p&gt;

&lt;p&gt;And that's where some interesting problems started showing up.&lt;/p&gt;

&lt;p&gt;In Part 4, I'll share what happened after my family started using the homelab regularly, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Debugging a video transcoding process that got stuck for 3.5 hours.&lt;/li&gt;
&lt;li&gt;Setting up multi-account Immich and Tailscale for both our phones.&lt;/li&gt;
&lt;li&gt;Building a Windows backup-pull script that doesn't depend on cloud storage and includes a live progress bar.&lt;/li&gt;
&lt;li&gt;Testing the backup process with an actual Vaultwarden restore drill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because having a server that runs successfully is one thing. Making sure it works reliably for the people who actually depend on it is another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full GitHub repository:&lt;/strong&gt; &lt;a href="https://github.com/farhanhl-ds/zero-trust-homelab" rel="noopener noreferrer"&gt;zero-trust-homelab&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>zerotrust</category>
      <category>ai</category>
      <category>homelab</category>
    </item>
    <item>
      <title>How I Manage My Proxmox Homelab with Terraform, Ansible, and AI Agent Skills</title>
      <dc:creator>Farhan Hamid Lubis</dc:creator>
      <pubDate>Wed, 02 Dec 2026 03:36:38 +0000</pubDate>
      <link>https://dev.to/farhan_hl/how-i-manage-my-proxmox-homelab-with-terraform-ansible-and-ai-agent-skills-529p</link>
      <guid>https://dev.to/farhan_hl/how-i-manage-my-proxmox-homelab-with-terraform-ansible-and-ai-agent-skills-529p</guid>
      <description>&lt;p&gt;Once Immich and Vaultwarden were running smoothly on my 8 GB mini PC, I started thinking about something beyond keeping the services online.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What if the SSD failed eight months from now? Could I rebuild everything from scratch in an afternoon, without having to remember all the little configuration details I had figured out along the way?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I didn't want to depend on clicking through web interfaces, copying commands from old terminal history, or maintaining a collection of bash scripts that only I understood.&lt;/p&gt;

&lt;p&gt;I wanted the entire setup to be reproducible. If something broke, I wanted to be able to rebuild it from code and have the documentation explain why things were configured that way.&lt;/p&gt;

&lt;p&gt;That led me to organize the project around two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure as Code:&lt;/strong&gt; Terraform for provisioning containers, Ansible for host-level configuration and service deployment, Docker Compose for application stacks, and automated backup jobs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A structured Knowledge Base (&lt;code&gt;kb/&lt;/code&gt;):&lt;/strong&gt; A place to document architectural decisions, service configurations, and recovery procedures so I wouldn't have to rediscover everything later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's how I put those pieces together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpcfrmgfdx7pf0pa1z6f4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpcfrmgfdx7pf0pa1z6f4.png" alt="Diagram showing Terraform and Ansible infrastructure code plus a RAG-friendly knowledge base of ADRs and runbooks feeding into an AI agent that routes via AGENTS.md and runs read-only health checks" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Splitting Responsibilities: Terraform vs. Ansible
&lt;/h2&gt;

&lt;p&gt;One thing I wanted to get right from the beginning was the separation of responsibilities between Terraform and Ansible.&lt;/p&gt;

&lt;p&gt;It's tempting to make Terraform handle everything, especially when you're already using it to provision infrastructure. But I found it much easier to maintain the setup when each tool had a clearly defined role.&lt;/p&gt;

&lt;p&gt;My workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Terraform (bpg/proxmox, -parallelism=1)
   └── Creates Zone 2 to Zone 4 LXC containers
       ├── Container IDs
       ├── IP addresses
       ├── CPU, RAM, and swap
       ├── Storage and disk allocation
       ├── Resource pools
       └── protection=1
             │
             ▼
2. Ansible: host_devices.yml
   └── Runs on the Proxmox host using pct set
       ├── /dev/net/tun → CT 132 (Tailscale)
       └── /dev/dri/* → CT 121 (Immich)
             │
             ▼
3. Ansible: zone{2,3,4}.yml + host_backups.yml
   ├── Deploys Docker Compose stacks
   ├── Configures Pi-hole wildcard DNS
   └── Sets up daily restic backup timers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In short, Terraform creates the containers and defines their resources. Ansible handles the configuration that needs to happen inside or directly on the Proxmox host.&lt;/p&gt;

&lt;p&gt;Docker Compose then takes care of the application stacks.&lt;/p&gt;

&lt;p&gt;This separation also makes troubleshooting easier. If a container doesn't exist, I know where to look. If a GPU device isn't attached, I know which playbook handles it. If an application fails to start, I can focus on its Compose configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two Proxmox Issues I Had to Work Around
&lt;/h3&gt;

&lt;p&gt;The overall workflow is fairly straightforward, but I ran into two Proxmox-specific issues that took some time to figure out.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Parallel Container Creation Caused Storage Lock Timeouts
&lt;/h4&gt;

&lt;p&gt;By default, Terraform can create multiple resources concurrently.&lt;/p&gt;

&lt;p&gt;That sounds reasonable, but on my single-node Proxmox setup using &lt;code&gt;local-lvm&lt;/code&gt;, concurrent LVM volume cloning occasionally caused storage lock timeouts.&lt;/p&gt;

&lt;p&gt;The failures were inconsistent, which made them particularly annoying to troubleshoot.&lt;/p&gt;

&lt;p&gt;The fix was simple: I started running Terraform with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform apply -parallelism=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This forces Terraform to process resource operations one at a time. It takes longer to provision multiple containers, but on this small single-node setup, reliability matters more than saving a few seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Non-Root API Tokens Couldn't Configure Device Passthrough
&lt;/h4&gt;

&lt;p&gt;Two containers need access to host devices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tailscale (CT 132):&lt;/strong&gt; Needs &lt;code&gt;/dev/net/tun&lt;/code&gt; to handle network tunneling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Immich (CT 121):&lt;/strong&gt; Needs &lt;code&gt;/dev/dri/renderD128&lt;/code&gt; and &lt;code&gt;/dev/dri/card0&lt;/code&gt; for hardware video transcoding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I initially wanted Terraform to manage these settings through the Proxmox API.&lt;/p&gt;

&lt;p&gt;However, I ran into HTTP 403 errors when using my non-root API token (&lt;code&gt;terraform@pve!terraform&lt;/code&gt;) to configure &lt;code&gt;dev0&lt;/code&gt; and &lt;code&gt;dev1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I didn't want to solve this by giving Terraform full &lt;code&gt;root@pam&lt;/code&gt; access just to configure a couple of devices.&lt;/p&gt;

&lt;p&gt;Instead, I kept Terraform's permissions restricted and moved device configuration into a dedicated Ansible playbook called &lt;code&gt;host_devices.yml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The playbook runs directly on the Proxmox host and uses &lt;code&gt;pct set&lt;/code&gt; to configure the devices.&lt;/p&gt;

&lt;p&gt;It also checks the &lt;code&gt;render&lt;/code&gt; group ID inside Immich dynamically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pct &lt;span class="nb"&gt;exec&lt;/span&gt; 121 -- getent group render
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This matters because the device permissions inside an unprivileged LXC need to match the appropriate group mapping.&lt;/p&gt;

&lt;p&gt;The playbook is idempotent: it only changes the configuration when necessary and only reboots a container if its device configuration actually changed.&lt;/p&gt;

&lt;p&gt;This approach keeps Terraform's API permissions limited while still allowing me to automate the host-level configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running Docker Inside Unprivileged LXCs
&lt;/h3&gt;

&lt;p&gt;Another thing worth documenting was the Docker configuration.&lt;/p&gt;

&lt;p&gt;For my Ubuntu 24.04 unprivileged LXCs, enabling &lt;code&gt;nesting=true&lt;/code&gt; was enough to run Docker with its default &lt;code&gt;overlay2&lt;/code&gt; storage driver.&lt;/p&gt;

&lt;p&gt;I deliberately avoided adding unnecessary privileges or workarounds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No &lt;code&gt;privileged=true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;keyctl=true&lt;/code&gt; (which my Proxmox API token couldn't configure anyway).&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;vfs&lt;/code&gt; storage driver, which consumes more disk space and wasn't necessary for this setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keeping the configuration simple makes it easier to reproduce and reduces the number of things I need to troubleshoot later.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Infrastructure Code Alone Wasn't Enough
&lt;/h2&gt;

&lt;p&gt;Terraform and Ansible tell me what the server should look like. They don't always explain why I made certain decisions.&lt;/p&gt;

&lt;p&gt;Imagine coming back to the project six months later and finding this in a configuration file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="n"&gt;swap&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;
&lt;span class="n"&gt;enabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why does Immich have 2 GB of swap? Why is PostgreSQL disabled? Can I safely change either of those settings?&lt;/p&gt;

&lt;p&gt;I could probably figure it out by reading the Git history, searching old conversations, or digging through configuration files. But that's exactly the kind of work I wanted to avoid.&lt;/p&gt;

&lt;p&gt;I also didn't want to put every troubleshooting experience into one enormous &lt;code&gt;NOTES.md&lt;/code&gt; file. Over time, it would become a mixture of outdated fixes, temporary observations, and information that was difficult to find.&lt;/p&gt;

&lt;p&gt;So I created a dedicated Knowledge Base under &lt;code&gt;kb/&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Organizing the Knowledge Base
&lt;/h3&gt;

&lt;p&gt;I separated the documentation by purpose rather than keeping everything in chronological order.&lt;/p&gt;

&lt;p&gt;Here's the structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kb/
├── architecture/       # Cross-cutting specifications
│                       # SSL strategy, Security Zones
│
├── decisions/          # Architecture Decision Records
│                       # Living docs keeping all the decisions
│
├── operations/         # Step-by-step runbooks
│                       # Rebuild, backups, DNS, rotation
│
├── reference/          # Canonical infrastructure references
│                       # IP and CTID matrix
│
├── roadmap/            # Build sequence and project history
│                       # The only chronological section
│
├── services/           # One canonical document per service
│                       # zone2-immich-121.md, etc.
│
└── troubleshooting/    # Known issues and technical constraints
                        # docker-in-lxc.md, etc.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also added a &lt;code&gt;kb/CONTRIBUTING.md&lt;/code&gt; file with a few rules for writing and maintaining documentation.&lt;/p&gt;

&lt;p&gt;The rules are simple, but they make a big difference as the repository grows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Five Rules for Keeping Documentation Useful
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Use consistent YAML frontmatter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every document starts with structured metadata:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;zone2-immich-121&lt;/span&gt;
&lt;span class="na"&gt;ctid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;121&lt;/span&gt;
&lt;span class="na"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;192.168.100.21&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;active&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;immich&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;photos&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;zone2&lt;/span&gt;
&lt;span class="na"&gt;retrievable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes it easier for both humans and search or embedding tools to identify relevant documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Document current knowledge, not incident diaries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I don't want the Knowledge Base to become a chronological collection of everything that went wrong.&lt;/p&gt;

&lt;p&gt;If I encounter a recurring issue, I document the actual constraint or solution in the relevant service documentation or troubleshooting guide.&lt;/p&gt;

&lt;p&gt;For example, instead of writing a dated entry about a Docker issue, I'd rather have a &lt;code&gt;Known Gotchas&lt;/code&gt; section in &lt;code&gt;docker-in-lxc.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Maintain one source of truth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;IP addresses, container IDs, and proxy host information should live in one canonical reference file.&lt;/p&gt;

&lt;p&gt;Other documents link to that file instead of maintaining their own copies.&lt;/p&gt;

&lt;p&gt;This avoids having to update the same information in multiple places whenever something changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Never put secrets in Markdown&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variable names such as &lt;code&gt;vault_immich_db_password&lt;/code&gt; are perfectly fine.&lt;/p&gt;

&lt;p&gt;Actual passwords, API tokens, and other sensitive values never go into Git. Those are managed separately through Infisical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Update the code and documentation together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If I fix something manually through SSH or a web interface, I don't consider the work finished until that change is reflected in the infrastructure code and Knowledge Base.&lt;/p&gt;

&lt;p&gt;Otherwise, the next deployment might simply overwrite the fix.&lt;/p&gt;

&lt;p&gt;This is probably the most important rule. Documentation should describe the infrastructure that actually exists, not a configuration that was correct three months ago.&lt;/p&gt;




&lt;h2&gt;
  
  
  Making the Repository Easier for an AI Agent to Navigate
&lt;/h2&gt;

&lt;p&gt;With Terraform, Ansible, and the Knowledge Base in the same repository, I had most of the information an AI coding agent would need to understand the homelab.&lt;/p&gt;

&lt;p&gt;But I didn't want the agent to read every file whenever I asked a simple question.&lt;/p&gt;

&lt;p&gt;There were already quite a few Markdown documents, configuration files, and playbooks. Loading all of them into context would be wasteful and could introduce irrelevant or outdated information.&lt;/p&gt;

&lt;p&gt;I wanted the agent to know where to look before it started reading.&lt;/p&gt;

&lt;p&gt;I handled this with two additions: a compact routing guide and a collection of modular agent skills.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A Compact Routing Guide (&lt;code&gt;AGENTS.md&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;AGENTS.md&lt;/code&gt; file serves as the starting point for the agent.&lt;/p&gt;

&lt;p&gt;It contains a summary of important infrastructure details, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The homelab subnet.&lt;/li&gt;
&lt;li&gt;The IP-to-Proxmox-ID convention (&lt;code&gt;ID = 100 + last_octet&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Active security zones.&lt;/li&gt;
&lt;li&gt;Important architectural constraints.&lt;/li&gt;
&lt;li&gt;A lookup table pointing to canonical documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Topic&lt;/th&gt;
&lt;th&gt;Canonical File&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;IPs, IDs, Security Zones&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kb/reference/ip-ctid-matrix.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backups &amp;amp; restore drills&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kb/operations/backup-and-restore.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Individual service configuration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kb/services/&amp;lt;zone&amp;gt;-&amp;lt;name&amp;gt;-&amp;lt;id&amp;gt;.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zero-trust control node&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kb/decisions/ADR-008-zero-trust-security-zones-and-infisical.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This way, when I ask about Immich, the agent knows to start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kb/services/zone2-immich-121.md
ansible/roles/immich/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It doesn't need to inspect unrelated services or read the entire repository first.&lt;/p&gt;

&lt;p&gt;The routing guide also helps prevent the agent from making assumptions about infrastructure decisions that have already been documented.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Modular Agent Skills
&lt;/h3&gt;

&lt;p&gt;Some tasks require more than reading a few configuration files.&lt;/p&gt;

&lt;p&gt;Adding a new service, restoring a backup, or rotating secrets involves multiple steps and dependencies. I wanted those procedures to be documented in a way that the agent could follow whenever needed.&lt;/p&gt;

&lt;p&gt;So I created dedicated skill directories under &lt;code&gt;.agents/skills/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Each skill focuses on a specific operational task:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Skill&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;homelab-add-service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adding a service across Terraform, Ansible, Infisical, NPM, UFW, and the Knowledge Base&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;homelab-backup-restore&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Backup verification and step-by-step restore procedures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;homelab-rebuild&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dependency-aware infrastructure rebuild and provisioning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;homelab-update-reboot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Safe container updates and reboot order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;homelab-secret-rotation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Secret rotation through Infisical&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The idea is to keep these instructions modular. The agent only needs the relevant skill when working on a particular task.&lt;/p&gt;

&lt;p&gt;For example, if I want to add a new service, it can follow the &lt;code&gt;homelab-add-service&lt;/code&gt; procedure instead of figuring out the required steps from scratch.&lt;/p&gt;

&lt;p&gt;In practice, this makes the repository feel a bit like working with a teammate who already understands how the homelab is organized.&lt;/p&gt;

&lt;p&gt;More importantly, the instructions help keep changes consistent with the decisions I've already made.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Coming in Part 3
&lt;/h2&gt;

&lt;p&gt;At this point, the infrastructure was reproducible, the documentation was organized, and I had an AI agent that could navigate the repository.&lt;/p&gt;

&lt;p&gt;But there was still one thing I wasn't comfortable with.&lt;/p&gt;

&lt;p&gt;The agent could access the repository containing the infrastructure configuration for my entire home server. Even if it couldn't directly manage the Proxmox host, I still needed to think carefully about what could happen if it encountered malicious instructions, generated an incorrect command, or tried to access something it shouldn't.&lt;/p&gt;

&lt;p&gt;I didn't want a convenient AI assistant to become another security risk.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 3&lt;/strong&gt;, I'll cover how I isolated the AI agent using four security layers, including the kernel-level firewall, restricted read-only commands, human-controlled operations, RAM-only secrets through Infisical, and the negative security tests I use to verify those restrictions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full GitHub repository:&lt;/strong&gt; &lt;a href="https://github.com/farhanhl-ds/zero-trust-homelab" rel="noopener noreferrer"&gt;zero-trust-homelab&lt;/a&gt;&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>ansible</category>
      <category>proxmox</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Only Wanted to Cancel iCloud: How One Simple Goal Turned Into a Zero-Trust Homelab</title>
      <dc:creator>Farhan Hamid Lubis</dc:creator>
      <pubDate>Tue, 01 Dec 2026 10:27:37 +0000</pubDate>
      <link>https://dev.to/farhan_hl/i-only-wanted-to-cancel-icloud-how-one-simple-goal-turned-into-a-zero-trust-home-server-1lbg</link>
      <guid>https://dev.to/farhan_hl/i-only-wanted-to-cancel-icloud-how-one-simple-goal-turned-into-a-zero-trust-home-server-1lbg</guid>
      <description>&lt;p&gt;This project did not start with a grand architecture plan. It started with a pretty simple goal: I wanted to stop paying monthly fees for cloud storage for my family's photos and videos.&lt;/p&gt;

&lt;p&gt;I also wasn't particularly comfortable keeping family photos, personal videos, and passwords entirely in third-party services. I wanted to have more control over where that data was stored, how it was accessed, and what happened to it.&lt;/p&gt;

&lt;p&gt;So I bought a used mini PC with a 7th-gen 4-core CPU, integrated graphics, 8 GB of RAM, and a 1 TB SSD. I installed Proxmox VE and started setting up two services: &lt;strong&gt;Immich&lt;/strong&gt; for family photos and &lt;strong&gt;Vaultwarden&lt;/strong&gt; for passwords.&lt;/p&gt;

&lt;p&gt;The initial setup was pretty straightforward. But as I started using the server regularly, I found myself thinking about things I hadn't considered when I first built it. How would I recover everything if the SSD failed? Would I remember why I configured certain things six months from now? And how much access should an AI coding agent have if I wanted it to help maintain the server?&lt;/p&gt;

&lt;p&gt;Those questions gradually shaped the homelab into what it is today.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faytegrk0wfzqibc2m1gn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faytegrk0wfzqibc2m1gn.png" alt="Five-step escalation diagram from canceling iCloud with Immich and Vaultwarden to Terraform and Ansible, a RAG-ready knowledge base, AI agent skills, and a zero-trust kernel firewall with Infisical on an 8 GB mini PC" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Homelab Evolved
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Starting with Immich and Vaultwarden
&lt;/h3&gt;

&lt;p&gt;The first two services were Immich and Vaultwarden.&lt;/p&gt;

&lt;p&gt;Immich handles photo and video backups from our phones, while Vaultwarden keeps our passwords in a self-hosted vault. Both solved the problems I originally had, and running them locally meant I no longer had to depend entirely on cloud subscriptions for these services.&lt;/p&gt;

&lt;p&gt;At this point, the setup was mostly manual. I configured everything directly on the server, and as long as it worked, I didn't think much about documenting the process.&lt;/p&gt;

&lt;p&gt;That changed when I started thinking about what would happen if I had to rebuild the entire server.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Making the Infrastructure Reproducible
&lt;/h3&gt;

&lt;p&gt;I didn't want to spend another weekend manually rebuilding containers, configuring permissions, setting up networking, and trying to remember all the little things I had done previously.&lt;/p&gt;

&lt;p&gt;I moved the infrastructure configuration to &lt;strong&gt;Terraform&lt;/strong&gt; and &lt;strong&gt;Ansible&lt;/strong&gt;. Terraform handles provisioning the Proxmox containers, while Ansible takes care of their configuration and service setup.&lt;/p&gt;

&lt;p&gt;I also added automated encrypted daily backups. The goal was to make recovery less dependent on memory and manual steps, whether I was replacing a failed SSD or rebuilding the server from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Documenting the Decisions Behind the Configuration
&lt;/h3&gt;

&lt;p&gt;Having infrastructure code is helpful, but it doesn't explain every decision behind it.&lt;/p&gt;

&lt;p&gt;Looking at a configuration several months later, I might understand what it does but not remember why I chose that particular approach. Why is Terraform limited to a single parallel job? Why is GPU device configuration handled by Ansible? Why does a particular service have a specific restriction?&lt;/p&gt;

&lt;p&gt;To address that, I created a structured &lt;strong&gt;Knowledge Base (&lt;code&gt;kb/&lt;/code&gt;)&lt;/strong&gt; alongside the infrastructure code.&lt;/p&gt;

&lt;p&gt;It contains short decision records, service documentation, and recovery runbooks. I keep the documents relatively concise and structured, so they're easy to search, maintain, and use as context for AI tools later.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Using an AI Agent to Navigate the Homelab
&lt;/h3&gt;

&lt;p&gt;Once the infrastructure code and documentation were organized in the same Git repository, I started experimenting with AI coding agents to help maintain the server.&lt;/p&gt;

&lt;p&gt;Instead of manually searching through Terraform files, Ansible playbooks, and documentation every time I needed to troubleshoot something, I wanted to be able to ask questions directly.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why is Immich's video transcoding behaving differently than expected?&lt;/li&gt;
&lt;li&gt;What needs to be changed to add a new service?&lt;/li&gt;
&lt;li&gt;Which containers are allowed to access a particular resource?&lt;/li&gt;
&lt;li&gt;How do I recover a service after a failed update?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the infrastructure code and Knowledge Base available as context, the agent could provide answers based on my actual configuration rather than generic instructions from the internet.&lt;/p&gt;

&lt;p&gt;But giving an AI agent access to infrastructure code is something I wanted to be careful about.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Restricting What the AI Agent Can Actually Do
&lt;/h3&gt;

&lt;p&gt;An AI agent can be useful, but I didn't want it to have unrestricted access to the machine managing my infrastructure.&lt;/p&gt;

&lt;p&gt;Even with a well-written prompt, an agent can misunderstand instructions, generate incorrect commands, or be manipulated by malicious content in files it reads. I didn't want a mistake to turn into an infrastructure outage or expose private data on my network.&lt;/p&gt;

&lt;p&gt;So I separated the AI agent from the human-operated infrastructure management workflow and put several restrictions in place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No &lt;code&gt;sudo&lt;/code&gt;:&lt;/strong&gt; The agent runs without root privileges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network isolation:&lt;/strong&gt; An OS-level firewall blocks access to my home LAN.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited commands:&lt;/strong&gt; The agent can only use three predefined read-only wrapper commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets separation:&lt;/strong&gt; Secrets are stored in Infisical, outside the agent's accessible environment, and loaded into RAM by the human operator when needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hypervisor protection:&lt;/strong&gt; Critical containers and data are protected against accidental destructive operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The idea isn't to make the agent perfectly safe. It's to limit what it can do if it makes a mistake or behaves in an unexpected way.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Resulting Layout
&lt;/h2&gt;

&lt;p&gt;All of this still runs on the same 8 GB mini PC.&lt;/p&gt;

&lt;p&gt;I organized the containers into security zones based on their data sensitivity and potential impact, rather than assigning IDs arbitrarily. I also use the same IP-to-Proxmox-ID convention for both VMs and containers:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Proxmox ID = 100 + last IP octet&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The management environment runs in a separate disposable control VM with NAT, keeping the AI agent and human-operated tools away from the Proxmox host itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Disposable Control VM (NAT)
├── homelab-agent (AI)
│   ├── No sudo
│   ├── LAN blocked by kernel firewall
│   └── 3 read-only wrapper commands
│
└── homelab-ops (Human)
    ├── Fetches secrets into RAM (/dev/shm)
    └── Runs mutating infrastructure applies
             │
             ▼
Proxmox VE (8 GB RAM · 1 TB SSD)
│
├── Zone 1 (.10)
│   └── CT 110 Infisical
│       Immutable · protection=1
│
├── Zone 2 (.20 to .21) — Protected Data
│   ├── CT 120 Vaultwarden
│   │   Protected · protection=1 · no destroy
│   │
│   └── CT 121 Immich
│       500 GB thin disk · /dev/dri GPU passthrough
│
├── Zone 3 (.30 to .32) — Network &amp;amp; Security
│   ├── CT 130 Pi-hole
│   │   Wildcard *.haytham.internal DNS
│   │
│   ├── CT 131 Nginx Proxy Manager
│   │   Local HTTPS termination
│   │
│   └── CT 132 Tailscale
│       WireGuard subnet router
│
└── Zone 4 (.40 to .41) — Management
    ├── CT 140 Homepage
    │   Root dashboard
    │
    └── CT 141 Uptime Kuma
        Service monitoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The IP-to-ID convention makes it easy to identify services without looking them up elsewhere.&lt;/p&gt;

&lt;p&gt;If I see &lt;code&gt;192.168.100.21&lt;/code&gt; in a log, I immediately know it's CT 121, which runs Immich. I also know it's part of Zone 2, the protected data zone, and that its configuration is maintained in &lt;code&gt;zone2_protected.yml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It's a small convention, but it makes the infrastructure much easier to navigate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Four Decisions That Helped Keep Everything Within 8 GB
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Using Unprivileged LXCs Instead of KVM VMs
&lt;/h3&gt;

&lt;p&gt;For a single-node server with only 8 GB of RAM, I wanted to avoid running a separate guest OS for every service.&lt;/p&gt;

&lt;p&gt;Most of my services run inside unprivileged Ubuntu 24.04 LXCs. They share the host kernel, which keeps the overhead relatively low compared to running a full VM for each service.&lt;/p&gt;

&lt;p&gt;Immich is the exception in terms of resource allocation. It has a 4 GB memory limit and 2 GB of swap available for upload and machine-learning workloads, but typically uses around 1.3 to 1.8 GB when idle.&lt;/p&gt;

&lt;p&gt;The entire active stack, including the Proxmox host and all eight containers, usually sits around 3.5 to 4.2 GB of RAM at steady state.&lt;/p&gt;

&lt;p&gt;Passing the integrated GPU through &lt;code&gt;/dev/dri&lt;/code&gt; to an LXC is also much simpler than configuring PCIe GPU passthrough to a VM, and it works well for my use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Keeping One Service per LXC
&lt;/h3&gt;

&lt;p&gt;I considered putting Pi-hole, Nginx Proxy Manager, Homepage, and Uptime Kuma inside a single shared container to reduce memory usage.&lt;/p&gt;

&lt;p&gt;It would have saved roughly 250 to 350 MB, but it would also make the services more tightly coupled. Updates, troubleshooting, snapshots, and access control would become harder to manage independently.&lt;/p&gt;

&lt;p&gt;I'd rather have a little more overhead and keep each service isolated. With the IP-to-ID convention, I also get a predictable mapping that makes managing the containers easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Keeping Future Services Ready Without Running Them Yet
&lt;/h3&gt;

&lt;p&gt;There are a few services I'd like to run in the future, including Home Assistant OS, a shared PostgreSQL instance, Redis, pgAdmin and a bunch of other fancy sefl-hosted apps (you name it).&lt;/p&gt;

&lt;p&gt;Instead of removing their configurations or provisioning them prematurely, I keep their definitions in &lt;code&gt;terraform/locals.tf&lt;/code&gt; and toggle them using &lt;code&gt;enabled = false&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That way, when the hardware gets an upgrade to 16 GB of RAM or higher, I can bring them online without having to redesign the infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Organizing the Dashboard Around How I Use It
&lt;/h3&gt;

&lt;p&gt;My first Homepage dashboard was organized according to the security zones. That made sense from an infrastructure perspective, but it wasn't particularly useful for daily navigation.&lt;/p&gt;

&lt;p&gt;For example, Immich and Uptime Kuma ended up in the same section even though they serve completely different purposes.&lt;/p&gt;

&lt;p&gt;I reorganized the dashboard around what I actually use each service for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apps &amp;amp; Media:&lt;/strong&gt; Immich, Vaultwarden&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure &amp;amp; Security:&lt;/strong&gt; Proxmox VE, Infisical, Pi-hole, Nginx Proxy Manager&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring &amp;amp; Admin Tools:&lt;/strong&gt; Uptime Kuma&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The security zones still exist underneath, but the dashboard is now organized for day-to-day use.&lt;/p&gt;




&lt;h2&gt;
  
  
  All 8 Active Services at a Glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Zone&lt;/th&gt;
&lt;th&gt;CTID&lt;/th&gt;
&lt;th&gt;IP&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Zone 1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;110&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.10&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Infisical&lt;/td&gt;
&lt;td&gt;Out-of-band secrets vault&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;120&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.20&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Vaultwarden&lt;/td&gt;
&lt;td&gt;Self-hosted password manager&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;121&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.21&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Immich&lt;/td&gt;
&lt;td&gt;Family photos &amp;amp; videos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;130&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.30&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pi-hole&lt;/td&gt;
&lt;td&gt;Local DNS &amp;amp; ad blocking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;131&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.31&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nginx Proxy Manager&lt;/td&gt;
&lt;td&gt;Local HTTPS reverse proxy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 3&lt;/td&gt;
&lt;td&gt;&lt;code&gt;132&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.32&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tailscale&lt;/td&gt;
&lt;td&gt;Private subnet routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 4&lt;/td&gt;
&lt;td&gt;&lt;code&gt;140&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.40&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Homepage&lt;/td&gt;
&lt;td&gt;Service dashboard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zone 4&lt;/td&gt;
&lt;td&gt;&lt;code&gt;141&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.41&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Uptime Kuma&lt;/td&gt;
&lt;td&gt;Service monitoring&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  What's Coming in Part 2
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;Part 2&lt;/strong&gt;, I'll go deeper into how Terraform and Ansible work together on a single-node Proxmox setup, some Proxmox API quirks I ran into, and how I structured the Knowledge Base and Agent Skills to make the infrastructure easier to maintain and understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/farhanhl-ds/zero-trust-homelab" rel="noopener noreferrer"&gt;zero-trust-homelab on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>homelab</category>
      <category>proxmox</category>
      <category>devops</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
