<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <atom:link href="https://blog.interlope.xyz/rss.xml" rel="self" type="application/rss+xml"/>
    <title>Spleenftw's blog</title>
    <link>https://blog.interlope.xyz</link>
    <description>Network engineer</description>
    <lastBuildDate>Sun, 01 Nov 2026 23:12:06 +0100</lastBuildDate>
    <item>
      <title>Load Balancing My Homelab</title>
      <link>https://blog.interlope.xyz/load-balancing-my-homelab</link>
      <image/>
      <description>&lt;h2&gt;Another perfectly reasonable weekend project&lt;/h2&gt;
&lt;p&gt;The public entrance to the homelab has changed again. In &lt;a href="https://blog.interlope.xyz/my-homelab-setup-2"&gt;WIMH #2&lt;/a&gt;, I described the VPS that forwards traffic into the lab over the overlay, without opening ports on the home connection. That arrangement is still there, but the entrance was mixed in with the application machines: Nginx, Anubis and the services they exposed shared those VPS hosts. This time I moved the public entry onto two dedicated machines, in different OVH locations, and put Cloudflare Load Balancing in front of them. Which sounds like a fairly contained change until you start following a request all the way through it.&lt;/p&gt;
&lt;p&gt;Of course, before any of that, I had to actually buy the VPS instances. OVH's stock had other plans. I ended up polling their availability API every 60 seconds, with a Python dashboard to watch the unavailable boxes and desktop notifications to jump on a slot when one appeared. Apparently clicking refresh was too simple, so buying the infrastructure became its own monitoring project. We hadn't deployed HAProxy yet and scope creep already had a dashboard.&lt;/p&gt;
&lt;p&gt;There is now HAProxy on each edge, an Anubis instance per application, private routes back to the origins, a fallback through the other edge, certificates to renew, and Semaphore deploying the whole thing from Git. The applications stayed where they were. The interesting work was getting the new entrances to reach them, deciding what should happen when something breaks, and then actually breaking the appropriate thing to check. Also, the media clients needed their own treatment. Asking a video player to solve a browser challenge was never going to be a good viewing experience.&lt;/p&gt;
&lt;p&gt;Same homelab, more plumbing. I'll call the entrances &lt;code&gt;edge-a&lt;/code&gt; and &lt;code&gt;edge-b&lt;/code&gt;, the application VPS machines &lt;code&gt;origin-a&lt;/code&gt; and &lt;code&gt;origin-b&lt;/code&gt;, and the home subnet router &lt;code&gt;home-router&lt;/code&gt;. These are aliases. The addresses and hostnames in the examples are placeholders, the screenshot legends have been replaced, and I'm keeping the actual service catalogue and access policy private. You can follow the routing without getting a map of everything currently online.&lt;/p&gt;
&lt;p&gt;Here is the short version before we get into the deployment. Web requests go through Cloudflare to either edge, then HAProxy and Anubis, and finally to the application over the private network. For services at home, the last part crosses the subnet router and firewall to Nginx Proxy Manager. NPM still does the forwarding inside the lab; the new edges haven't replaced it.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-c9832039b9cbcc2fcb9c7078f8b6d182009f435d-b9e0d9c6bee0.png" alt="Anonymized overview of two public edges, private application origins and direct media access" /&gt;&lt;/p&gt;
&lt;p&gt;And here is the less short version. The diagram also shows the deployment and monitoring paths, which aren't extra stops for a visitor's request. Headscale manages the Tailscale clients and their access policy; HTTP traffic doesn't pass through Headscale itself. That is another change since the older WIMH post, which described the official Tailscale control plane. The red panel is a separate explanation of what the redundancy covers and where it stops.&lt;/p&gt;
&lt;figure&gt;
&lt;a href="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-250f31142d88a6dffe762cc8edfa1a898ce229a2-152de5ad1fb3.png"&gt;&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-250f31142d88a6dffe762cc8edfa1a898ce229a2-152de5ad1fb3.png" alt="Detailed anonymized architecture: Cloudflare proxy and DNS-only access, two HAProxy and Anubis edges, private service failover, Tailscale origins, Semaphore deployment, Headscale policy, certificates and Prometheus monitoring" loading="lazy" /&gt;&lt;/a&gt;
&lt;figcaption&gt;Open the image at full size to follow the paths. The separate red panel explains failure handling and redundancy limits; it is not an infrastructure component or a traffic path. Cloudflare checks the public entrance; each HAProxy checks its application paths.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The &lt;a href="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-90d37b5126e7b0eb47cd318d083e0281629db689-d42bd3acdb11.txt"&gt;Mermaid source&lt;/a&gt; is available if you want to follow the connections at full size. The application groups in it are generic.&lt;/p&gt;
&lt;h2&gt;First, make the applications reachable&lt;/h2&gt;
&lt;p&gt;Before putting a second entrance anywhere near the public DNS, I had to check the origins. One application was listening only on loopback, which made perfect sense while its reverse proxy ran on the same machine. From a new edge, that listener might as well not exist. I added a binding on its overlay address while keeping loopback for the old entrance, then checked the other applications' listeners too. This let the migration happen alongside the working setup rather than replacing its access path before the new one had been tested.&lt;/p&gt;
&lt;p&gt;At home, the subnet router already provided the route to NPM. The firewall between that router and the gateway permits HTTPS to NPM, so the edges use that specific path rather than getting access to the entire LAN. They join Headscale with &lt;code&gt;tag:edge&lt;/code&gt;, accept the approved private routes, and keep their ordinary Internet egress. They don't select an exit node. That last detail becomes relevant when Certbot starts talking to Cloudflare from the VPS's own public address.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;sudo tailscale up \
  --login-server=https://control.example.net \
  --hostname=edge-a \
  --advertise-tags=tag:edge \
  --accept-routes&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The second edge uses its own hostname, followed by registration and approval on the control plane. Then come the checks: the right tag, the right route, and an actual response from the origin. Being present in the mesh only gets us part of the way. During preparation, a request between the application VPS machines timed out even though both nodes were online. Their role didn't have the destination access intended for the new edges. Opening that access just to make an arbitrary test machine happy would have changed the policy for the wrong reason; the useful test was from a node carrying &lt;code&gt;tag:edge&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For an HTTPS origin behind NPM, I tested the application hostname against the private address directly. This keeps the Host header and TLS name correct while avoiding public DNS resolution. The certificate still has to validate:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;curl --noproxy '*' --connect-timeout 5 --max-time 15 \
  --resolve app.example.net:443:NPM_PRIVATE_IP \
  -I https://app.example.net/&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That private resolution is carried into the deployment too. Anubis targets the application hostname with a private address mapping, and HAProxy's origin probe uses the proper SNI and verifies the origin certificate. Once this part works from each edge, there is something worth deploying in front of it. Until then, a beautiful proxy configuration would just produce a more elaborate error page.&lt;/p&gt;
&lt;h2&gt;Two edges, two different decisions&lt;/h2&gt;
&lt;p&gt;The part that needed untangling was the word "failover", because there are two separate decisions in this setup. Cloudflare chooses the public entrance. Both edges are active, with equal weights and Random steering inside the pool; session affinity then keeps a browser on its selected edge while that endpoint stays healthy. This won't alternate every request between the machines. One session can sit on one edge and transfer much more data than several visits on the other. I'll come back to that when we reach the graphs.&lt;/p&gt;
&lt;p&gt;After the request lands, HAProxy chooses a path for that particular application. Normally it uses the local Anubis. If that path becomes unhealthy, it can use a private gateway on the other edge, which forwards to the peer's local Anubis and then to the origin. So a visitor can still enter through edge-a while one application's request crosses to edge-b. The other healthy applications on edge-a keep their local paths. We aren't moving the entire entrance because one container stopped.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[edge-a]
Normal:
visitor → Cloudflare → edge-a → local Anubis → origin

Local Anubis unavailable:
visitor → Cloudflare → edge-a → private gateway on edge-b
                              → edge-b Anubis → origin

edge-a unavailable:
visitor → Cloudflare → edge-b → local Anubis → origin

[edge-b]
Normal:
visitor → Cloudflare → edge-b → local Anubis → origin

Local Anubis unavailable:
visitor → Cloudflare → edge-b → private gateway on edge-a
                              → edge-a Anubis → origin

edge-b unavailable:
visitor → Cloudflare → edge-a → local Anubis → origin&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those private gateways bind to the overlay addresses only. Headscale restricts which nodes may reach them, and HAProxy checks the source edge and the expected Host as well. Each gateway has one destination: its own local Anubis. It cannot choose the peer again, so there is no opportunity for the two edges to pass the same request back and forth. The public access restrictions run before HAProxy chooses either path.&lt;/p&gt;
&lt;p&gt;Here is the backend on edge-a for an example application. The server called &lt;code&gt;anubis&lt;/code&gt; actually points at the local private gateway, because that's where the complete local path gets checked. The second server is the peer, marked &lt;code&gt;backup&lt;/code&gt;. Replace the address tokens before trying to use this anywhere:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-haproxy"&gt;backend be_app
    cookie EDGE_ROUTE_app insert indirect nocache httponly secure
    option httpchk
    http-check send meth GET uri /_edge/health ver HTTP/1.1 hdr Host app.example.net
    http-check expect status 200

    server anubis EDGE_A_MESH_IP:18923 source EDGE_A_MESH_IP cookie edge-a check inter 5s fall 2 rise 2 init-state fully-down
    server peer EDGE_B_MESH_IP:18923 source EDGE_A_MESH_IP cookie edge-b backup check inter 5s fall 2 rise 2 init-state fully-down&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are cookies at both layers. Cloudflare's affinity cookie chooses the public edge, while &lt;code&gt;EDGE_ROUTE_app&lt;/code&gt; keeps an application's chosen local or peer path consistent through its challenge and subsequent requests. The cookie values identify the same edge on both machines. A session that moved to the peer can stay there after the local path recovers; a fresh session prefers the healthy local path. That explains why reloading one existing browser session after recovery doesn't tell you where all new traffic is going.&lt;/p&gt;
&lt;p&gt;The checks also have their own timing. The gateway checks above run every five seconds with two failures or successes needed for a state change, but they depend on the separate Anubis and origin checks, which have their own intervals and timeouts. Multiplying five by two doesn't give us a reliable total failover time. Existing connections are a separate matter again: a WebSocket or video stream doesn't move between processes. The client reconnects, and this HAProxy configuration adds no policy to replay a POST after receiving an application response.&lt;/p&gt;
&lt;h2&gt;Getting a useful green light out of Cloudflare&lt;/h2&gt;
&lt;p&gt;For Cloudflare, I settled on one shared pool containing the two endpoints, reused by the application load balancers. This stayed within the endpoint allocation shown by my subscription instead of repeating a two-endpoint pool for each application. The tradeoff is that all those load balancers share the pool's health decision. A monitor aimed at one application would let that application's failure affect the other domains too. A monitor requiring every application to be healthy could remove both edges because one common origin had failed. Neither outcome would fix the application.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-0570e4b8bc73f402c49fb3d7a9a237cd01a78217-d0a8c03e186f.png" alt="Cloudflare pool with two healthy anonymized endpoints, each weighted 1, and Random steering" loading="lazy" /&gt;
&lt;figcaption&gt;The shared pool after deployment: both endpoints healthy and enabled, with equal weights. Names and IP addresses have been replaced.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The common monitor therefore checks the public HTTPS entrance. It requests &lt;code&gt;/_edge/entry-health&lt;/code&gt; on a dedicated Host and expects HTTP 200 with &lt;code&gt;edge-ready&lt;/code&gt;. HAProxy produces that response after checking the Host, the actual network source and the monitor token. The settings are HTTPS on port 443, GET, a 60-second interval, five-second timeout and two retries. Certificate verification stays enabled. Meanwhile, HAProxy checks each application's Anubis and origin separately: the private gateway is ready only when both local components are healthy, and the public per-service &lt;code&gt;/_edge/health&lt;/code&gt; route can accept a healthy local or peer path.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-6f531176666212e744e4583017384ca06a33e684-108a789ffa7b.png" alt="Cloudflare HTTPS monitor configured with a 60-second interval, five-second timeout, two retries, status 200 and body edge-ready" loading="lazy" /&gt;
&lt;figcaption&gt;The actual common monitor settings. Its request headers are configured separately; no token value is included in this screenshot.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This means the common Cloudflare probe can stay green while an application is unavailable. That's the intended division of work, but it has a limit worth spelling out once: if an edge loses both paths for a service while the peer can still serve that service to visitors arriving directly, the shared ingress monitor won't redirect only that domain. Separate service pools could make that choice. Here, the private fallback handles the per-service routing, and Prometheus exposes the detailed path states. &lt;a href="https://developers.cloudflare.com/load-balancing/monitors/"&gt;Cloudflare's monitor documentation&lt;/a&gt; explains the pool health side.&lt;/p&gt;
&lt;p&gt;Getting the monitor green also produced one of the more concrete mistakes in the deployment. Both endpoints reported a TLS name mismatch, while the local HTTPS test with the intended hostname worked. The fix was in the request headers: the hostname belongs in the value of &lt;code&gt;Host&lt;/code&gt;, and the secret belongs in a second header. Two fields, two different jobs:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-text"&gt;Host: edge-health.example.net
X-Edge-Health-Token: &amp;lt;monitor secret&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cloudflare uses that Host for the monitor's TLS SNI. The endpoints' Host overrides stay empty so they don't take precedence over it. I left certificate verification on and corrected the name instead; &lt;a href="https://developers.cloudflare.com/load-balancing/troubleshooting/common-error-codes/"&gt;the error reference&lt;/a&gt; covers this case. For a local check, loopback is exempt from the external monitor-token requirement:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;curl --noproxy '*' --silent --show-error --max-time 10 \
  --resolve edge-health.example.net:443:127.0.0.1 \
  https://edge-health.example.net/_edge/entry-health&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That should return &lt;code&gt;edge-ready&lt;/code&gt; with a verified certificate. It proves the local listener works. The external Cloudflare monitor still has to pass its own network, source and header checks, which is exactly where the mismatch showed up.&lt;/p&gt;
&lt;h2&gt;The browser challenge meets the actual clients&lt;/h2&gt;
&lt;p&gt;With the routes in place, &lt;a href="https://github.com/TecharoHQ/anubis"&gt;Anubis&lt;/a&gt; sits in front of each application on each edge. Its listeners and metrics remain on loopback, and each instance gets its own target and policy directory. Browser-facing routes receive the proof-of-work challenge. The complications start with API clients, notification streams and media playback, because those requests still need to work without a browser solving anything. The policies therefore follow how the application is used, rather than applying the same challenge to every request.&lt;/p&gt;
&lt;p&gt;The media policy is a good example. Its web interface and bare root receive a challenge, including mixed-case variants of the web path. The remaining routes pass through to the application's own authentication, so native clients, API calls, media requests and sockets can work. The specific rule has to come before the catch-all allowance:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;bots:
  - name: media-browser
    path_regex: '(?i)^/(?:web(?:/|$)|$)'
    action: CHALLENGE
    challenge:
      algorithm: fast
      difficulty: 5

  - name: media-native-routes
    path_regex: '^/'
    action: ALLOW&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An &lt;code&gt;ALLOW&lt;/code&gt; here skips Anubis's challenge; the application still checks the account or token. I checked that distinction anonymously on both edges: the tested private routes for users, sessions, libraries, server settings and API keys returned 401. The server-information route remained public, the public user-list route returned an empty list, and HAProxy blocked &lt;code&gt;/health&lt;/code&gt; and &lt;code&gt;/metrics&lt;/code&gt; with 404. The protected edge readiness route returned 403 without its secret. Those checks cover the tested routes, not every permission or plugin, but they establish why blocking the entire API would break the clients rather than solve the access question.&lt;/p&gt;
&lt;p&gt;Other clients need different exceptions. Notification delivery and streaming use their API routes; a request application's web UI can depend on its API as well as external integrations. Changing a policy changes its content hash in the container labels, which causes a recreation. The policies are mounted as directories so replacing a file atomically doesn't leave a container reading an old inode. HAProxy also normalizes the relevant application paths and rejects ambiguous encodings before applying restrictions. Otherwise, a rule for &lt;code&gt;/admin&lt;/code&gt; could miss an equivalent encoded request before Anubis even enters the discussion.&lt;/p&gt;
&lt;p&gt;The media entrance needed another change: it uses a DNS-only Cloudflare load balancer. Cloudflare selects healthy addresses through DNS, then the client connects directly to an edge over HTTPS. The video doesn't cross Cloudflare's reverse proxy. The other web entrances remain proxied.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-text"&gt;DNS:    media hostname → healthy edge address
HTTPS:  client → edge-a or edge-b → Anubis → home NPM → the media service&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That required adjusting the service's source restriction before switching its DNS. The proxied vhosts accept Cloudflare sources and explicit administration exceptions; a direct media client needs to be accepted on its own vhost. Just changing the cloud colour would have left ordinary users with a 403. I checked the direct route from the administration connection first, then from a phone outside that exception. The logs showed the external client reaching the second edge directly, and login and playback worked. Testing only from the allowlisted connection would have missed a broken public rule.&lt;/p&gt;
&lt;p&gt;DNS caching still applies, and an open stream doesn't migrate when an edge fails. That's part of the &lt;a href="https://developers.cloudflare.com/reference-architecture/architectures/load-balancing/"&gt;DNS-only load-balancing model&lt;/a&gt;. The configuration gives new connections another available entrance after detection and resolution; it doesn't pick up a running video connection and carry it across.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-396f0772fad4b5c4052de47bbfd3e94ad02e1a12-1192de92c402.png" alt="Anonymized Cloudflare application load balancer showing a healthy shared pool and two endpoints" loading="lazy" /&gt;
&lt;figcaption&gt;An application load balancer after migration, with its identifying labels replaced: one healthy pool with both endpoints. This row shows pool health, not application login behavior.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2&gt;Teaching Semaphore what an application looks like&lt;/h2&gt;
&lt;p&gt;Once the routing existed, the next question was maintenance. Adding another application shouldn't mean finding every list of ports and services in several templates and hoping I remembered all of them. The configuration now starts with &lt;code&gt;docker/haproxy/vars/services.yml&lt;/code&gt;: one entry for the domain, origin, permanent ID, policy profile and any application-specific health or access rules. This is an illustrative entry, with the origin and domain replaced:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;haproxy_service_catalog:
  example_app:
    id: 1
    domain: app.example.net
    origin: {node: origin-a, port: 8080}
    profile: browser
    admin:
      paths: [/admin]
    blocked_paths:
      - {path: /api, status: 403}
    dns: manual&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The ID stays put even if the YAML entries move around. It gives us Anubis port &lt;code&gt;8922 + ID&lt;/code&gt;, local metrics port &lt;code&gt;9200 + ID&lt;/code&gt;, and private gateway port &lt;code&gt;18922 + ID&lt;/code&gt;. For ID 1, those are 8923, 9201 and 18923. Deleting a different entry won't renumber that application. The catalogue compiler checks the IDs, profiles, defined origins and derived port collisions, then feeds generic templates for the routing, containers, policies, probes and managed Headscale permissions.&lt;/p&gt;
&lt;p&gt;There is a separate Semaphore plan task with a local inventory and no deployment secrets. It validates the declarations and writes a service summary and ACL fragment on the runner. It makes no VPS or DNS changes, and doesn't test the network:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;ansible-playbook -i localhost, docker/haproxy/plan_services.yml&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For an application behind home NPM, the practical sequence is to deploy it privately, configure its Proxy Host and certificate, enable WebSocket support if needed, and check the private HTTPS route from the edges. Then add its exposure entry. Here is an eighth-service example, not another application currently deployed:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;  example_app:
    id: 8
    domain: app.example.net
    origin:
      node: npm
      port: 443
      scheme: https
    profile: browser
    health:
      path: /
      status: '200-399'
    dns: manual&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The catalogue owns the exposure configuration. The application's database, persistent data and backups belong to its own deployment. A client that cannot solve a browser challenge can use &lt;code&gt;profile: native&lt;/code&gt;, with an explicit health route returning 200; behavior outside the supported profiles still needs a code change. Similarly, disabling an entry removes its active routes and containers from this project and allows the managed ACLs to be withdrawn, but doesn't delete the application data or automatically remove its public DNS.&lt;/p&gt;
&lt;p&gt;The actual deployment task runs &lt;code&gt;docker/haproxy/deploy_haproxy.yml&lt;/code&gt; serially across the edges. It checks the target, mesh membership, routes and origin responses; obtains the certificate; pulls the selected images; and validates the candidate configuration with the downloaded HAProxy image before installing it. Then it checks the local TLS routes, challenges, redirects and restrictions, followed by the local and peer application paths. The images deliberately remain &lt;code&gt;haproxy:lts&lt;/code&gt; and Anubis &lt;code&gt;latest&lt;/code&gt;, so a deployment can also update an image. So the job's changes can include an image update as well as my configuration.&lt;/p&gt;
&lt;p&gt;Semaphore supplies four separate secrets: the DNS API token, shared Anubis signing key, monitor token and metrics token. They go in secret extra variables, with environment-variable fallbacks supported by the playbook. The SSH account and sudo settings have to work on the edges and on the control host receiving delegated Headscale tasks. That delegation reads the active policy, replaces only the rules owned by this deployment, validates a candidate, backs up the old policy and reloads when necessary. An adjacent tracking file remembers the managed rules so permissions can be removed later without replacing the rest of my policy.&lt;/p&gt;
&lt;p&gt;Bootstrap needs a small exception. The first edge cannot validate a peer stack that hasn't been installed yet, so peer readiness isn't required for the initial rollout. After both stacks are running, I enable the blocking check and deploy again:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;haproxy_edge_redundancy_enabled: true
haproxy_edge_require_peer_ready: true&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That stays enabled afterward. A healthy peer mustn't hide a broken local installation during deployment, and a healthy local installation mustn't let a broken backup slip through. The normal target selection is simply the edge inventory group:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-json"&gt;{"target_hosts": "vps_haproxy"}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The Cloudflare application load balancers are still managed separately. The playbook handles dedicated DNS-only edge records and offers a simple publication mode toward a single primary edge, but that single-primary mode doesn't give us the public two-edge arrangement. The migrated applications keep &lt;code&gt;dns: manual&lt;/code&gt;. The catalogue and a green Semaphore run aren't a hidden instruction to switch all the public names.&lt;/p&gt;
&lt;h2&gt;And then the deployment had opinions&lt;/h2&gt;
&lt;p&gt;The first edge took several runs to get right. There were runner dependency and proxy issues, followed by SSH account and sudo settings to align with the working Semaphore templates. The successful execution skips Galaxy installation because the collections are already available on the runner; skipping the step doesn't make a missing collection appear. Once those prerequisites passed, Certbot reached Cloudflare and ran into the token's source-address restriction. The API request came from the edge's public egress, because Certbot runs there. The token needed to allow that address, and eventually the second edge's, for issuance and future renewals.&lt;/p&gt;
&lt;p&gt;Each edge obtains its certificate through DNS-01 and renews it locally. The renewal hook assembles the certificate and private key, checks that they match, validates HAProxy and signals the master to reload. If validation or signalling fails, it restores the previous PEM on disk. That safeguard covers this local step; it doesn't turn the whole playbook into a transaction. The final successful deployment still needed one retry of the per-domain HTTPS check on each edge. Both passed on the next attempt.&lt;/p&gt;
&lt;p&gt;By the end, neither edge had an unreachable host or failed task. The checks covered the application TLS routes and browser challenges, the blog-alias redirects, restricted and encoded paths, local readiness and every configured peer route. The Headscale candidate was valid, and its reload was skipped because the active policy hadn't changed. Temporary candidate files still counted as changes in the job. The application publication task was skipped, the Cloudflare pool settings stayed untouched, and the deployment notification arrived. The full log stays private; publishing it would also publish the inventory embedded in its task results.&lt;/p&gt;
&lt;p&gt;There is one other boundary in the request handling that I don't want buried in the diagrams. HAProxy only accepts &lt;code&gt;CF-Connecting-IP&lt;/code&gt; as the visitor address when the connection actually comes from a configured Cloudflare range. Other connections use their real source address. It rebuilds the forwarding headers before passing requests downstream, while monitor and metrics access rules still check the real network peer. An arbitrary client mustn't get the administration exception by supplying a convenient header. The trusted ranges are an explicit configuration snapshot, so they need periodic review. The logs also leave out request URLs, since some clients carry credentials in query strings.&lt;/p&gt;
&lt;h2&gt;Time to stop something&lt;/h2&gt;
&lt;p&gt;I tested the new entrances before changing the application DNS. Local resolution overrides let the browser keep the real hostname and certificate while connecting to the new edge, with other visitors still using the old entrance. For command-line checks, &lt;code&gt;curl --resolve&lt;/code&gt; does the same thing; the address below is a documentation address:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;curl --noproxy '*' --silent --show-error \
  --connect-timeout 5 --max-time 15 \
  --resolve app.example.net:443:192.0.2.10 \
  --output /dev/null \
  --write-out 'HTTP %{http_code}, TLS %{ssl_verify_result}\n' \
  https://app.example.net/&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A zero TLS verification result confirms the certificate check, but HTTP 200 can still be the challenge page. I had to go through the application logins, watch live updates, receive notifications and test playback. The readiness and metrics routes were also checked from an unauthenticated workstation and returned 403. Those are different checks from using the applications, and both mattered before the public move.&lt;/p&gt;
&lt;p&gt;For the first controlled failure, I stopped one application's Anubis container on edge-a while leaving its common origin running. Requests still entering edge-a selected the peer backend, and a WebSocket opened through edge-b. That exercised the private fallback without deliberately taking the shared application down. The public migration then started with one status service: after enabling its Cloudflare load balancer, I stopped HAProxy on edge-a. Cloudflare detected the failed entrance, the other edge served the application, and I restored edge-a and waited for health to settle.&lt;/p&gt;
&lt;p&gt;These tests stop different containers for different reasons: an application Anubis has a name such as &lt;code&gt;haproxy-prod-anubis-example_app&lt;/code&gt;, while &lt;code&gt;haproxy-prod&lt;/code&gt; is HAProxy itself. Restoring the stopped container and checking recovery is part of the test. The first case proves that one service can use its peer path; the second proves that the public entrance can move. Neither test implies that an open socket teleports to another machine.&lt;/p&gt;
&lt;p&gt;The remaining proxied names followed gradually, with logins and notifications checked after switching. The root and &lt;code&gt;www&lt;/code&gt; aliases were pointed at the blog and their redirects checked. The media entrance moved separately through its DNS-only load balancer, followed by the external phone test. Only after those paths worked did I disable the old application vhosts, validate and reload Nginx, check the retained services, and stop the redundant old Anubis containers.&lt;/p&gt;
&lt;p&gt;The origin application containers stayed running, because the new edges still use them. Nginx and Certbot also stayed where other active services needed them, including the Headscale entrance. Retaining the previous application CNAME records helped with DNS rollback during migration, but once a vhost is disabled, reverting DNS alone is no longer enough: that old vhost has to be restored too. The older Nginx deployment playbook belongs to that previous entrance, so rerunning it during cleanup would risk recreating what I had just retired.&lt;/p&gt;
&lt;h2&gt;The graphs, now with traffic in them&lt;/h2&gt;
&lt;p&gt;The existing Prometheus stack scrapes the edges over public HTTPS, using a dedicated DNS-only name for each machine. It doesn't join the mesh. The metrics endpoint requires both the authorized public source and a separate Bearer token, while the unauthenticated exporter remains on loopback. Giving Prometheus an application load-balancer name would defeat the point: two scrapes could reach the same selected edge while looking like two independent observations. Here is the job structure, with generic targets and a placeholder for the monitoring stack's existing outbound proxy:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;scrape_configs:
  - job_name: haproxy-edges
    scrape_interval: 15s
    scrape_timeout: 10s
    scheme: https
    proxy_url: http://monitor-proxy.example.net:3128
    metrics_path: /_edge/metrics
    authorization:
      type: Bearer
      credentials_file: /etc/prometheus/secrets/edge-metrics-token
    tls_config:
      insecure_skip_verify: false
    static_configs:
      - targets: ['edge-a.example.net:443']
        labels:
          edge: a
      - targets: ['edge-b.example.net:443']
        labels:
          edge: b&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The token file has to be readable inside the Prometheus container, and the source allowlist has to match the actual egress of that connection. Before opening Grafana, I checked Prometheus's Targets page: the &lt;code&gt;haproxy-edges&lt;/code&gt; job had both targets UP, with scrape durations of about 160 ms and 130 ms in this capture. Each endpoint goes straight to its own edge's &lt;code&gt;/_edge/metrics&lt;/code&gt; route. The &lt;code&gt;job&lt;/code&gt; label groups the scrapes, &lt;code&gt;instance&lt;/code&gt; identifies the host and port, and the explicit &lt;code&gt;edge&lt;/code&gt; label gives the dashboard a stable name to group by. The names below have been replaced to match the example configuration.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-b9921ed802f72537d6b61152bc203135a3d02e00-aeb86a96f784.png" alt="Prometheus haproxy-edges job showing two anonymized targets, edge-a and edge-b, both UP" loading="lazy" /&gt;
&lt;figcaption&gt;Both edge metrics endpoints are UP. Endpoint hostnames and identifying labels have been replaced locally; scrape timings and states are unchanged.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Those two green badges mean Prometheus successfully scraped both metrics endpoints. They don't tell me whether a user can log in or whether an origin is healthy; that comes from the service-path and origin metrics, plus the application checks. &lt;code&gt;up{job="haproxy-edges"}&lt;/code&gt; is the first thing to look at when a graph goes blank, before debugging an application that may be working perfectly well. Grafana can then put traffic, sessions, backend errors, origin probes and the available service paths next to each other, instead of collapsing everything into one green square.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-dce691eea4401012b3d845c06aafa756444edc62-92bee48a24fc.png" alt="Grafana scrape availability, traffic share, per-service response rates and response bytes for the two anonymized edges" loading="lazy" /&gt;
&lt;figcaption&gt;A real observation window after migration. Both scrape series are at one; traffic reaching Anubis is uneven across the two edges. Legend labels have been anonymized.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This window has both scrape series at one and an uneven traffic split. That's entirely compatible with equal configured weights: sessions have different sizes, a media stream moves far more bytes than a short page visit, and requests satisfied by Cloudflare's cache never reach these backends. I read this as traffic arriving at the edges, not as a count of unique visitors or proof that each machine got exactly half the users.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-d032fc6b94f0fd921b3d0f4f9808393bd3bc7027-05dbac0d0b35.png" alt="Grafana service-path and origin health, active backend sessions and backend 5xx responses" loading="lazy" /&gt;
&lt;figcaption&gt;The sampled health window contains brief drops and a few backend errors, followed by healthy values. The screenshot alone does not identify their cause.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;There are brief health drops and backend error peaks in the sample. Their cause would need the matching logs and time-aligned events; the capture alone doesn't establish how long a visitor lost access. There is also a dashboard naming trap here: "Anubis health" displays &lt;code&gt;be_*&lt;/code&gt; series, which in the redundant configuration represent service paths through the gateways. I read that panel with the &lt;code&gt;probe_*&lt;/code&gt; origin series rather than treating its title as a measurement of an isolated Anubis process.&lt;/p&gt;
&lt;figure&gt;
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/99bb20f62f7058bcc557994ebd42deaa/gh-12fc84e524d063687c88dce1b2d7e269286979f7-aaf4a183c927.png" alt="Grafana rolling backend response times and health-check failure rates" loading="lazy" /&gt;
&lt;figcaption&gt;Rolling response time and check failures. The health-check legend containing infrastructure labels has been removed; the plotted samples are unchanged.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;One rolling response-time series reaches roughly 850 ms and stays there in the displayed window. It's an average, not a p95, and a quiet service can retain a value without much new traffic. That gives me something to inspect, not a latency diagnosis by itself. Likewise, these metrics don't contain Cloudflare's actual endpoint verdict; that lives in its monitor and event view. The reference alert rules need to be loaded and connected to notification delivery separately. Importing the dashboard doesn't install the alerts.&lt;/p&gt;
&lt;h2&gt;Where this leaves the lab&lt;/h2&gt;
&lt;p&gt;The public entrance is now redundant, with a private fallback for each application's path and a catalogue for maintaining the exposure configuration. The application origins are still shared. If a single application instance fails, both edges lose it; if the home connection, gateway or NPM fails, several private paths can fail together. Both VPS instances also remain with one provider, and the proxied entrances depend on Cloudflare. Those are the boundaries shown in the separate red panel of the diagram.&lt;/p&gt;
&lt;p&gt;The deployment, access checks and controlled stops are done, and the old application entrances have been retired without deleting the origins underneath them. For the next application, there is a private deployment to prepare, a catalogue entry to review and an edge rollout to run. Replicating the application and its data is still its own project. This weekend's one already had enough moving parts.&lt;/p&gt;
&lt;p&gt;Thanks for reading me,&lt;br&gt;spleenftw&lt;/p&gt;</description>
      <pubDate>Sun, 01 Nov 2026 18:04:40 +0100</pubDate>
      <guid isPermaLink="false">99bb20f62f7058bcc557994ebd42deaa</guid>
    </item>
    <item>
      <title>WIMH #2 (what's in my homelab)</title>
      <link>https://blog.interlope.xyz/my-homelab-setup-2</link>
      <image/>
      <description>&lt;h2&gt;Welcome back to the homegarden&lt;/h2&gt;
&lt;p&gt;So you came back. Either WIMH #1 didn't scare you off, or you're the kind of person who reads an open-house post and thinks "yeah but I want more". Good news : that's exactly what this one is.&lt;/p&gt;
&lt;p&gt;Last time I gave you &lt;a href="https://blog.interlope.xyz/my-homelab-setup"&gt;the tour&lt;/a&gt; : the rack, the three proxmox servers, the OpenFabric mesh, the VLAN map, the zone firewall, and a wave at the ~40 VMs doing the heavy work. It was a &lt;em&gt;tour&lt;/em&gt;. You looked, you nodded, you moved on. This time I'm cornering you next to the rack and I'm not letting you leave until you've heard about my NTP setup. All of it.&lt;/p&gt;
&lt;p&gt;So same deal as last time : grab the coffee pot, this one's long too. We're going service by service through the stuff #1 only pointed at : the Tailscale mesh, the HA that keeps the flowers(proxmox servers) alive when one of them faints, the backups, the storage move I did because I read one sentence on the internet and had some free time, the whole GitOps spine, the monitoring, the security, the DNS, the cloud, and yes, the time servers.&lt;/p&gt;
&lt;p&gt;Same disclaimer as always : this is a &lt;strong&gt;homelab&lt;/strong&gt;. The &lt;em&gt;not-so-home-but-more-like-prod-lab&lt;/em&gt;. Nothing here is a reference architecture. Some of it is genuinely solid, some of it is held together by a daily cron, some prayers at night, a lot of good intentions, and at least one decision in here was made because of a single forum post I will never find again. That's the fun. That's the spirit.&lt;/p&gt;
&lt;p&gt;Let's crack this 24U open once again lads.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;The overlay : Tailscale&lt;/h2&gt;
&lt;p&gt;In WIMH #1 I said the VPN zone was "a little more elaborate than install Tailscale, done". Here's the elaborate part.&lt;/p&gt;
&lt;p&gt;Even though this is a homelab and I could self-host this one, I'm on the &lt;strong&gt;official Tailscale control plane&lt;/strong&gt;, not Headscale. I like the Tailscale UI/UX, but I don't love handing &lt;em&gt;all&lt;/em&gt; of the trust to someone else's control plane, so the first thing I run is my own pair of &lt;strong&gt;tailnet-lock signing nodes&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
&lt;strong&gt;Tailnet lock&lt;/strong&gt;, quickly : normally Tailscale's control plane can add a node to your tailnet and that node is trusted without any verification. Tailnet lock flips that, new nodes have to be &lt;strong&gt;cryptographically signed by a key &lt;em&gt;you&lt;/em&gt; hold&lt;/strong&gt; before anyone trusts them. So even if the control plane were compromised, nobody can silently join my network. I run &lt;strong&gt;two&lt;/strong&gt; signing nodes so losing one doesn't lock me out of ever adding a machine again. It's the one place I currently refuse to fully outsource trust. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On top of that I run four Tailscale nodes, and the whole point is that each one is a &lt;em&gt;different trust posture&lt;/em&gt;. Keeping them as separate machines means I never have to stop and ask "wait, what's this connection allowed to do".&lt;/p&gt;
&lt;h3&gt;vpn01 - the exit node&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;vpn01&lt;/code&gt; advertises itself as an &lt;strong&gt;exit node&lt;/strong&gt; (&lt;code&gt;tailscale up --advertise-exit-node&lt;/code&gt;). When a device picks it, &lt;em&gt;all&lt;/em&gt; of that device's traffic comes home and leaves through my edge : my IDS/IPS, my geoblocking, my rules. On top of that, the tailnet DNS config hands clients my &lt;strong&gt;production Pi-hole&lt;/strong&gt; as resolver and &lt;strong&gt;MagicDNS&lt;/strong&gt; for the &lt;code&gt;*.ts.net&lt;/code&gt; names. So when I'm on hostile wifi in some airport or some hotel, my phone is effectively sitting on my couch : adblocked, filtered, and resolving like it's home.&lt;/p&gt;
&lt;h3&gt;vpn02 - the bastion node&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;vpn02&lt;/code&gt; is the one I actually use the most, and it's the opposite philosophy. It advertises &lt;strong&gt;specific subnet routes&lt;/strong&gt; (&lt;code&gt;--advertise-routes=...&lt;/code&gt;) for the internal ranges I want to reach like my ssh bastion or my windows vm box, but it &lt;strong&gt;does not advertise an exit node&lt;/strong&gt; and hands out &lt;strong&gt;no DNS&lt;/strong&gt;. So when I connect through it everything else except my ssh session to my bastion on my laptop stays local and normal.&lt;/p&gt;
&lt;p&gt;That's the "I just need access into the lab, not to route my entire life through my house" node. I'm fixing a service from a café, I don't want my Netflix going through my home uplink and I don't want my browsing resolved by my Pi-hole logs. &lt;code&gt;vpn02&lt;/code&gt; gives me the lab and nothing else.&lt;/p&gt;
&lt;h3&gt;vpn03 - the family node&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;vpn03&lt;/code&gt; is the same idea as &lt;code&gt;vpn01&lt;/code&gt; (full tunnel, DNS handed out) &lt;strong&gt;but its egress is pushed through the DMZ&lt;/strong&gt; instead of the trusted internals. The household gets a clean, adblocked, geofenced, IDS-protected internet pipe... without ever getting a door into the good stuff. They get the &lt;em&gt;benefits&lt;/em&gt; of the lab without being &lt;em&gt;in&lt;/em&gt; the lab. Everyone's happy, nobody's a lateral-movement risk.&lt;/p&gt;
&lt;h3&gt;vpn04 - the VPS entry node&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;vpn04&lt;/code&gt; is the bridge from the outside world &lt;em&gt;into&lt;/em&gt; the lab. My external VPS joins the tailnet through it, which means public services don't need a single port forwarded on my home connection. The VPS is the only thing with a public face ; it terminates the inbound traffic and forwards it over the tailnet to my internal services. The lab exposes itself to the internet &lt;strong&gt;on my terms only&lt;/strong&gt;, through one machine I can nuke and rebuild without touching home.&lt;/p&gt;
&lt;p&gt;Four nodes, four postures. Overkill ? Maybe. But I never have to think about which policy a connection is under, and that's worth a few extra VMs. Also they're not even using 256MB of RAM which is kinda okay...&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[vpn01 status]
ansible@vpn01-https:~$ tailscale status
100.106.171.50   vpn01-https   vpn01-https.pirate-pirarucu.ts.net  linux    idle; offers exit node                      
100.106.159.1    ts-sign01     interlope@                          linux    -                                           
100.115.155.43   ts-sign02     interlope@                          linux    -   
# vpn01 advertising: exit node ; accepting routes: no

[vpn02 routes]
ansible@vpn02-nodns:~$  tailscale status --json | jq -r '.Self.PrimaryRoutes[]?'
x.y.z.1/32 # ssh bastion
x.y.z.2/32 # rdp bastion
# no exit node advertised, no DNS handed out

[vpn03 status]
ansible@vpn01-https:~$ tailscale status
100.75.255.93    vpn03-dmz     vpn03-dmz.pirate-pirarucu.ts.net  linux    idle; offers exit node                      
100.106.159.1    ts-sign01     interlope@                          linux    -                                           
100.115.155.43   ts-sign02     interlope@                          linux    -   
# vpn01 advertising: exit node ; accepting routes: no

[vpn04 netcheck]
ansible@vpn04-vps:~$ tailscale netcheck
2026/06/08 14:54:39 portmap: monitor: gateway and self IP changed: gw=x.y.z.1 self=x.y.z.2

Report:
        * Time: 2026-06-08T12:54:39.630313297Z
        * UDP: true
        * IPv4: yes, @homeip:48169
        * IPv6: no, but OS has support
        * MappingVariesByDestIP: false
        * PortMapping:
        * Nearest DERP: Paris
        * DERP latency:
                - par: 14.8ms  (Paris)
                - lhr: 21.1ms  (London)
                - ams: 22.3ms  (Amsterdam)
                - mad: 22.4ms  (Madrid)
                - fra: 22.8ms  (Frankfurt)
                - nue: 25ms    (Nuremberg)
                - waw: 41.8ms  (Warsaw)
                - hel: 48.2ms  (Helsinki)
                - nyc: 84.8ms  (New York City)
                - iad: 97ms    (Ashburn)
                - dbi: 101.1ms (Dubai)
                - tor: 103.5ms (Toronto)
                - ord: 107.3ms (Chicago)
                - mia: 116.5ms (Miami)
                - dfw: 126ms   (Dallas)
                - den: 129.3ms (Denver)
                - blr: 129.5ms (Bengaluru)
                - sfo: 153.3ms (San Francisco)
                - lax: 154ms   (Los Angeles)
                - sea: 154.4ms (Seattle)
                - nai: 176.8ms (Nairobi)
                - jnb: 181.2ms (Johannesburg)
                - hkg: 186.2ms (Hong Kong)
                - hnl: 201.2ms (Honolulu)
                - tok: 236.2ms (Tokyo)
                - sin: 236.6ms (Singapore)
                - sao: 244.3ms (São Paulo)
                - syd:         (Sydney)&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!IMPORTANT]
You'll notice I'm &lt;strong&gt;not publishing my ACL file&lt;/strong&gt;. It's a full map of who-can-reach-what-and-how, which is exactly the kind of free metadata I &lt;a href="https://blog.interlope.xyz/how-to-evade-your-isp"&gt;refuse to hand out&lt;/a&gt;. The mechanism above is the interesting part anyway. The policy is just plumbing. Mario here we go.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Keeping the flowers alive : Proxmox HA&lt;/h2&gt;
&lt;p&gt;A three-node cluster is only worth the trouble if losing a node is a non-event. So &lt;strong&gt;every VM in the lab is HA-managed&lt;/strong&gt;. Not just the important ones, all of them. If a flower faints, &lt;code&gt;ha-manager&lt;/code&gt; notices, picks a surviving node, and restarts the guests there. I lose a few seconds to a couple of minutes depending on the VM, and then life goes on.&lt;/p&gt;
&lt;p&gt;But HA without &lt;strong&gt;fencing&lt;/strong&gt; is a footgun. Fencing is the guarantee that a VM is never accidentally running in &lt;em&gt;two&lt;/em&gt; places at once (split-brain), which is the kind of hassle you never, never, never ever want to fix. The way Proxmox does this : a node that loses quorum &lt;strong&gt;fences itself&lt;/strong&gt;. I'm using the &lt;strong&gt;integrated softdog watchdog&lt;/strong&gt;, so a node that falls out of the cluster gets rebooted by its own watchdog after the timeout, and only &lt;em&gt;then&lt;/em&gt; are its VMs considered safe to restart elsewhere.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!WARNING]
Software watchdog self-fencing means that when a node loses the cluster, it &lt;strong&gt;reboots itself&lt;/strong&gt;, on purpose. The first time you watch a node spontaneously reboot because a cable was flaky, it feels like a bug. It's not. It's fencing doing exactly its job. The "proper" upgrade is a hardware watchdog / IPMI / external KVM, which is why those &lt;strong&gt;GL.iNet Comet&lt;/strong&gt; KVMs are on my roadmap. Until then, softdog it is, and it works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Affinity rules : never lose both halves of a pair&lt;/h3&gt;
&lt;p&gt;Here's the part I actually like. A lot of my redundancy comes in &lt;strong&gt;pairs&lt;/strong&gt; : two NTP servers, two Pi-holes, two VPN signing nodes, the pgs master/replica, the bastions. The whole point of a pair is that you never lose both at once, and HA can absolutely ruin that by cheerfully scheduling both halves onto the same node.&lt;/p&gt;
&lt;p&gt;Proxmox VE 9's &lt;strong&gt;HA rules&lt;/strong&gt; fix this with &lt;strong&gt;resource anti-affinity&lt;/strong&gt;. I tell the cluster "these two must stay apart" and it keeps them on different nodes :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[negative]
root@pivoine:~# cat /etc/pve/ha/rules.cfg
resource-affinity: ha-rule-edb41a5a-07c9
        affinity negative
        resources vm:20053,vm:25053

resource-affinity: ha-rule-510b4ed2-5327
        affinity negative
        resources vm:5041,vm:5042

resource-affinity: ha-rule-b30cce55-54ef
        affinity negative
        resources vm:20123,vm:20124

resource-affinity: ha-rule-637499e6-342b
        affinity negative
        resources vm:20032,vm:20033

resource-affinity: ha-rule-4e63e971-aff9
        affinity negative
        resources vm:25053,vm:25123

[pivoine]
node-affinity: ha-rule-3f954afc-7623
        comment pivoine
        nodes pivoine
        resources vm:20033,vm:20042,vm:20049,vm:20053,vm:20057,vm:20080,vm:25123,vm:30207,vm:5041,vm:5046
        strict 0

[petunia]
node-affinity: ha-rule-4f0edd54-5473
        comment petunia
        nodes petunia
        resources vm:20022,vm:20032,vm:20039,vm:20046,vm:20124,vm:20199,vm:25053,vm:5045
        strict 0

[dalia]
node-affinity: ha-rule-69cd5b90-0d03
        comment dalia
        nodes dalia
        resources vm:10010,vm:20023,vm:20040,vm:20041,vm:20048,vm:20123,vm:20200,vm:5042,vm:5044
        strict 0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So even in the worst case, a single node dying, I never lose &lt;em&gt;both&lt;/em&gt; DNS resolvers, &lt;em&gt;both&lt;/em&gt; time servers, or my Postgres master and replica together. One half always survives somewhere else.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[ha-manager status]
root@pivoine:~# ha-manager status
quorum OK
master petunia (active, Mon Jun  8 15:30:58 2026)
fencing armed (CRM watchdog active)
lrm dalia (active, watchdog active, Mon Jun  8 15:31:01 2026)
lrm petunia (active, watchdog active, Mon Jun  8 15:30:52 2026)
lrm pivoine (active, watchdog active, Mon Jun  8 15:30:58 2026)
service vm:10010 (dalia, started)
service vm:15112 (pivoine, started)
service vm:20022 (petunia, started)
service vm:20023 (dalia, started)
service vm:20032 (petunia, started)
service vm:20033 (pivoine, started)
service vm:20039 (petunia, started)
service vm:20040 (dalia, started)
service vm:20041 (dalia, started)
service vm:20042 (pivoine, started)
service vm:20046 (petunia, started)
service vm:20048 (dalia, started)
service vm:20049 (pivoine, started)
service vm:20053 (pivoine, started)
service vm:20057 (pivoine, started)
service vm:20059 (pivoine, started)
service vm:20080 (pivoine, started)
service vm:20123 (dalia, started)
service vm:20124 (petunia, started)
service vm:20199 (petunia, started)
service vm:20200 (dalia, started)
service vm:25053 (petunia, started)
service vm:25123 (pivoine, started)
service vm:25198 (pivoine, started)
service vm:30207 (pivoine, started)
service vm:5041 (pivoine, started)
service vm:5042 (dalia, started)
service vm:5043 (pivoine, started)
service vm:5044 (dalia, started)
service vm:5045 (petunia, started)
service vm:5046 (pivoine, started)

[a bit of tuning]
# CPU type passed straight through, no emulation tax
root@pivoine:~# grep -m1 cpu /etc/pve/qemu-server/20053.conf
cpu: host

# migrations ride the dedicated cluster network, not the public one
root@pivoine:/home/interlope# cat /etc/pve/datacenter.cfg

crs: ha-rebalance-on-start=1
max_workers: 6
migration: secure,network=10.100.3.101/24
replication: secure,network=10.100.3.101/24
tag-style: ordering=alphabetical,shape=full&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is "HA on literally everything" overkill for a homelab ? Probably. But the cluster has the cores and RAM for it, the migrations are clean over the 10G SFP+ cephfs network, and it means the answer to "what happens if a node dies" is "I find out from a dashboard the next morning" instead of "I find out from a few services being down".
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;The backups, deeper : PBS + Proxmox&lt;/h2&gt;
&lt;p&gt;The first WIMH covered the &lt;strong&gt;3-2-1&lt;/strong&gt; story (Ceph → PBS-on-NAS → S3 offsite + the dumb external HDD on my desk). Here's what's actually happening &lt;em&gt;inside&lt;/em&gt; PBS.&lt;/p&gt;
&lt;p&gt;The datastore lives on the TrueNAS box, mounted over NFS (more on &lt;em&gt;that&lt;/em&gt; migration in the next section), and Proxmox talks to it as a first-class storage backend :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[datastore]
root@hortensia:~# proxmox-backup-manager datastore list
┌──────────────┬─────────────────────────┬─────────┐
│ name         │ path                    │ comment │
╞══════════════╪═════════════════════════╪═════════╡
│ bu-pbs-hlb1  │ xyz                     │   s3    │
├──────────────┼─────────────────────────┼─────────┤
│ nas01-dtst01 │ xyz                     │         │
├──────────────┼─────────────────────────┼─────────┤
│ nas01-dtst02 │ xyz                     │         │
└──────────────┴─────────────────────────┴─────────┘

[schedules]
root@hortensia:~# proxmox-backup-manager datastore show nas01-dtst01
┌───────────────────┬─────────────────────────┐
│ Name              │ Value                   │
╞═══════════════════╪═════════════════════════╡
│ name              │ nas01-dtst01            │
├───────────────────┼─────────────────────────┤
│ path              │ xyz                     │
├───────────────────┼─────────────────────────┤
│ comment           │                         │
├───────────────────┼─────────────────────────┤
│ gc-schedule       │ 7:00                    │
├───────────────────┼─────────────────────────┤
│ notification-mode │ notification-system     │
├───────────────────┼─────────────────────────┤
│ verify-new        │ 1                       │
└───────────────────┴─────────────────────────┘
root@hortensia:~# proxmox-backup-manager prune-job list
┌──────────────────────────────────┬─────────┬──────────────┬────┬───────────┬───────────┬───────────┬─────────────┬────────────┬─────────────┬──────────────┬─────────────┐
│ id                               │ disable │ store        │ ns │ schedule  │ max-depth │ keep-last │ keep-hourly │ keep-daily │ keep-weekly │ keep-monthly │ keep-yearly │
╞══════════════════════════════════╪═════════╪══════════════╪════╪═══════════╪═══════════╪═══════════╪═════════════╪════════════╪═════════════╪══════════════╪═════════════╡
│ default-nas01-xzy                │         │ nas01-dtst01 │    │ 06:00     │           │         7 │             │            │             │              │             │
├──────────────────────────────────┼─────────┼──────────────┼────┼───────────┼───────────┼───────────┼─────────────┼────────────┼─────────────┼──────────────┼─────────────┤
│ default-nas01-xyz                │         │ nas01-dtst02 │    │ thu 06:30 │           │        30 │             │            │             │              │             │
└──────────────────────────────────┴─────────┴──────────────┴────┴───────────┴───────────┴───────────┴─────────────┴────────────┴─────────────┴──────────────┴─────────────┘
root@hortensia:~# proxmox-backup-manager sync list
┌─────────────────┬────────────────┬──────────────┬────────┬──────────────┬───────────┬──────────────┬─────────┬─────────┐
│ id              │ sync-direction │ store        │ remote │ remote-store │ schedule  │ group-filter │ rate-in │ comment │
╞═════════════════╪════════════════╪══════════════╪════════╪══════════════╪═══════════╪══════════════╪═════════╪═════════╡
│ s-00793c6e-xyz  │                │ nas01-dtst02 │        │ nas01-dtst01 │ mon 08:00 │ all          │         │         │
└─────────────────┴────────────────┴──────────────┴────────┴──────────────┴───────────┴──────────────┴─────────┴─────────┘
root@hortensia:~# proxmox-backup-manager verify-job list
┌─────────────────┬──────────────┬──────────┬─────────────────┬────────────────┬─────────┐
│ id              │ store        │ schedule │ ignore-verified │ outdated-after │ comment │
╞═════════════════╪══════════════╪══════════╪═════════════════╪════════════════╪═════════╡
│ v-4bd5e68f-xyz  │ nas01-dtst01 │ daily    │               1 │             30 │         │
├─────────────────┼──────────────┼──────────┼─────────────────┼────────────────┼─────────┤
│ v-f52d251a-xyz  │ nas01-dtst02 │ daily    │               1 │             30 │         │
└─────────────────┴──────────────┴──────────┴─────────────────┴────────────────┴─────────┘

[pvesm status]
root@pivoine:~# pvesm status | grep pbs
bu-pbs-hlb1          pbs   disabled               0               0               0      N/A
nas01-dtst01         pbs     active      2739830784       637783040      2102047744   23.28%
nas01-dtst02         pbs     active      2684354560      2025292800       659061760   75.45%&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The two NAS datastores map straight onto the two-pool story from #1. &lt;strong&gt;&lt;code&gt;nas01-dtst01&lt;/code&gt;&lt;/strong&gt; is the fast landing zone : daily prune at &lt;strong&gt;06:00&lt;/strong&gt; keeping the last &lt;strong&gt;7&lt;/strong&gt; (a week worth of backup is enough for this pool)  followed by a daily GC at &lt;strong&gt;07:00&lt;/strong&gt; and &lt;code&gt;verify-new&lt;/code&gt; on so fresh backups get checked the moment they land. &lt;strong&gt;&lt;code&gt;nas01-dtst02&lt;/code&gt;&lt;/strong&gt; is the long-haul archive : a &lt;strong&gt;weekly&lt;/strong&gt; prune (Thursday 06:30) keeping the last &lt;strong&gt;30&lt;/strong&gt; (a month worth). Both run a &lt;strong&gt;daily verify&lt;/strong&gt; job that re-reads chunks but skips anything already verified in the last 30 days (&lt;code&gt;ignore-verified&lt;/code&gt; + &lt;code&gt;outdated-after 30&lt;/code&gt;), so I'm not pointlessly re-hashing terabytes every night, just catching rot before it spreads. A backup you've never verified is a &lt;em&gt;hope&lt;/em&gt;, not a backup.&lt;/p&gt;
&lt;p&gt;The third datastore, &lt;strong&gt;&lt;code&gt;bu-pbs-hlb1&lt;/code&gt;&lt;/strong&gt; on &lt;code&gt;/mnt/datastore/cache-s3&lt;/code&gt;, is the local cache for the S3 backend, the dedicated dataset PBS keeps so reads and restores don't hammer (and bill) the S3 API. It reads &lt;strong&gt;disabled&lt;/strong&gt; in this capture, but that's not its resting state : I flip it on every few months to push a full offsite copy up to the bucket, then park it again. The daily grind is the local NAS copies ; the S3 run is the occasional "the whole house could burn down" insurance.&lt;/p&gt;
&lt;p&gt;Encryption isn't just the offsite thing : &lt;strong&gt;everything PBS writes is encrypted client-side&lt;/strong&gt; ; the local NAS datastores, the S3 copy, even the sync between the two datastores. Nothing, on the NAS or up in the cloud, ever sees plaintext. Same posture as everything else here : a third party (or a stolen NAS / disks) gets ciphertext or it gets nothing.&lt;/p&gt;
&lt;p&gt;PBS deduplicates at the chunk level, so identical blocks across every snapshot and every VM get stored exactly once, which is why holding 7 (or 30) near-full snapshots doesn't swallow the NAS whole. The savings are frankly absurd : &lt;code&gt;nas01-dtst01&lt;/code&gt; sits at a &lt;strong&gt;~20x&lt;/strong&gt; dedup factor and &lt;code&gt;nas01-dtst02&lt;/code&gt; at &lt;strong&gt;~28x&lt;/strong&gt;, meaning each datastore is physically holding somewhere between a twentieth and a thirtieth of the logical data I've thrown at it.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[nas01-dtst01]
root@hortensia:~# proxmox-backup-manager garbage-collection status nas01-dtst01 --output-format json | jq '."index-data-bytes" / ."disk-bytes"'
20.391607078048708

[nas01-dtst02]
root@hortensia:~# proxmox-backup-manager garbage-collection status nas01-dtst02 --output-format json | jq '."index-data-bytes" / ."disk-bytes"'
28.547859394301383&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
&lt;strong&gt;On the to-do list : namespaces.&lt;/strong&gt; Right now everything dumps into one flat datastore. PBS &lt;strong&gt;namespaces&lt;/strong&gt; let you carve a single datastore into isolated logical trees, so I could split backups &lt;em&gt;per zone&lt;/em&gt; (internal / dmz / cluster) without building a separate datastore for each. Why bother ? Because namespaces get their own &lt;strong&gt;prune policies&lt;/strong&gt; and their own &lt;strong&gt;ACLs&lt;/strong&gt; : I could give a restricted token access to only the DMZ namespace, or keep DMZ snapshots on a shorter retention than production, all under one box. 
I don't do this &lt;em&gt;yet&lt;/em&gt;. It's the kind of tidy-up that future-me will thank present-me for, and present-me hasn't gotten to it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;The storage move : SMB → NFS&lt;/h2&gt;
&lt;p&gt;Time for the most honest section in this post.&lt;/p&gt;
&lt;p&gt;I migrated my TrueNAS shares from &lt;strong&gt;SMB to NFS&lt;/strong&gt; for one deeply scientific reason : &lt;strong&gt;I read somewhere on an obscure discord server that NFS is better than SMB for Linux-to-Linux.&lt;/strong&gt; That's it. That's the rationale. No benchmark, no incident, no whitepaper. One sentence on the internet and a free Sunday.&lt;/p&gt;
&lt;p&gt;Now, the funny part is that the sentence isn't entirely &lt;em&gt;wrong&lt;/em&gt;. For Linux talking to Linux, NFSv4 is the more native fit : it's the protocol Linux was built around, it doesn't carry the Windows-flavoured chattiness and locking quirks of SMB, and for the big sequential reads/writes a PBS datastore does all night, it's a cleaner path. So I lucked into a reasonable decision for an unreasonable reason. I'll take it.&lt;/p&gt;
&lt;p&gt;Here's the shape of it. The export is &lt;strong&gt;NFSv4.2&lt;/strong&gt;, with &lt;code&gt;maproot&lt;/code&gt; pinned (root on the client maps to root on the dataset, fixed user and group), and it's &lt;strong&gt;locked down to the backup VLAN and the PBS host specifically&lt;/strong&gt; so nothing else on the network can even see it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;root@hortensia:~# grep nas01 /etc/fstab
@nasip:/xyz/nas01-dtst01  /xyz/nas01-dtst01  nfs  rw,relatime,hard,_netdev,nofail,vers=4.2  0  0
@nasip:/xyz/nas01-dtst02  /xyz/nas01-dtst02  nfs  rw,relatime,hard,_netdev,nofail,vers=4.2  0  0&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
The mount-option gotcha that'll cost you an evening : &lt;strong&gt;&lt;code&gt;_netdev&lt;/code&gt;&lt;/strong&gt;. Without it, systemd will happily try to mount the NFS share &lt;em&gt;before&lt;/em&gt; the network is up, the mount fails, and PBS comes up pointing at an empty directory thinking your datastore vanished. &lt;code&gt;_netdev&lt;/code&gt; tells it "wait for the network". Also use &lt;strong&gt;&lt;code&gt;hard&lt;/code&gt;&lt;/strong&gt; and not &lt;code&gt;soft&lt;/code&gt; for a backup target, you want I/O to &lt;em&gt;block and retry&lt;/em&gt; if the NAS hiccups, not silently return errors into the middle of a backup.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Did I benchmark before and after ? No, of course I didn't, that would have implied I had a real reason to migrate. It &lt;em&gt;feels&lt;/em&gt; snappier, the stale-handle weirdness I used to get on SMB is gone, and PBS is happy. For a change made on vibes, that's a clean result.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;The semi GitOps spine&lt;/h2&gt;
&lt;p&gt;This is the brain that keeps the fleet consistent. &lt;strong&gt;Gitea&lt;/strong&gt; is the source of truth, &lt;strong&gt;Semaphore&lt;/strong&gt; is the hands.&lt;/p&gt;
&lt;p&gt;Semaphore pulls its &lt;strong&gt;Ansible inventory straight out of Gitea&lt;/strong&gt;, and I keep &lt;strong&gt;two inventories&lt;/strong&gt; : &lt;code&gt;dev&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;. Same playbooks, different targets, so I can break something on dev without explaining to myself later why prod is on fire. Semaphore authenticates to Gitea and to every host with its &lt;strong&gt;own dedicated SSH key&lt;/strong&gt;, scoped for exactly that, which is also why the firewall has those surgical management exceptions I mentioned in #1.&lt;/p&gt;
&lt;p&gt;In WIMH #1 I showed the whole playbook tree (the &lt;code&gt;apt&lt;/code&gt; / &lt;code&gt;security&lt;/code&gt; / &lt;code&gt;utilities&lt;/code&gt; / &lt;code&gt;ntp&lt;/code&gt; / &lt;code&gt;ssh&lt;/code&gt; categories). I won't repeat it. Instead, here's a few of the workhorses that help me to run patch and configure some services :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[apt update]
---
- name: Check for upgradable packages
  hosts: "{{ target_hosts }}"

  tasks:
    - name: Run apt update
      apt:
        update_cache: yes

    - name: Get list of upgradable packages
      command: "apt list --upgradable"
      register: upgradable_packages
      changed_when: false

    - name: Display upgradable packages
      debug:
        var: upgradable_packages.stdout_lines


[ssh config]
---
- name: Configuration sécurisée du service SSH
  hosts: "{{ target_hosts }}"
  become: yes

  tasks:
    - name: Supprimer toutes les anciennes clés hôtes SSH
      ansible.builtin.shell: rm -f /etc/ssh/ssh_host_*

    - name: Générer nouvelle clé RSA 4096 bits
      ansible.builtin.command: ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -N ""

    - name: Générer nouvelle clé ED25519
      ansible.builtin.command: ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""

    - name: Filtrer les moduli DH &amp;gt;= 3071 bits
      shell: awk '$5 &amp;gt;= 3071' /etc/ssh/moduli &amp;gt; /etc/ssh/moduli.safe
      args:
        creates: /etc/ssh/moduli.safe

    - name: Remplacer le fichier moduli
      command: mv /etc/ssh/moduli.safe /etc/ssh/moduli
      args:
        removes: /etc/ssh/moduli.safe

    - name: Créer le répertoire sshd_config.d
      file:
        path: /etc/ssh/sshd_config.d
        state: directory
        mode: '0755'

    - name: Créer le fichier de durcissement ssh-audit
      copy:
        src: conf/ssh-audit_hardening.conf
        dest: /etc/ssh/sshd_config.d/ssh-audit_hardening.conf
        mode: '0644'
      notify: restart sshd

    - name: Déployer le fichier sshd_config principal
      template:
        src: conf/sshd_config
        dest: /etc/ssh/sshd_config
        mode: '0644'
        validate: /usr/sbin/sshd -t -f %s
      notify: restart sshd

    - name: Déployer /etc/issue
      template:
        src: conf/issue
        dest: /etc/issue
        mode: '0644'

    - name: Déployer /etc/issue.net
      template:
        src: conf/issue.net
        dest: /etc/issue.net
        mode: '0644'
      notify: restart sshd

  handlers:
    - name: restart sshd
      service:
        name: sshd
        state: restarted

[df]
---
- name: Get Disk Space Information
  hosts: "{{ target_hosts }}"
  become: true
  tasks:
    - name: Get all mounted filesystems
      shell: df -h
      register: df_full_output

    - name: Filter and display LVM volumes
      debug:
        msg: "{{ item }}"
      loop: "{{ df_full_output.stdout_lines | select('match', '^/dev/mapper/.*') | list }}"
      when: df_full_output.stdout_lines | select('match', '^/dev/mapper/.*') | list | length &amp;gt; 0

    - name: Display servers without LVM volumes
      debug:
        msg: "⚠️  No LVM volumes found on {{ inventory_hostname }}"
      when: df_full_output.stdout_lines | select('match', '^/dev/mapper/.*') | list | length == 0

    - name: Check for disk space alerts (&amp;gt;75%)
      debug:
        msg: "🚨 ALERT: {{ item.split()[0] }} is {{ item.split()[4] }} full on {{ inventory_hostname }}"
      loop: "{{ df_full_output.stdout_lines | select('match', '^/dev/mapper/.*') | list }}"
      when: 
        - df_full_output.stdout_lines | select('match', '^/dev/mapper/.*') | list | length &amp;gt; 0
        - item.split()[4] | regex_replace('%', '') | int &amp;gt; 75

    - name: Try to get LVM Volume Groups info (if available)
      shell: |
        if command -v vgs &amp;gt;/dev/null 2&amp;gt;&amp;amp;1; then
          vgs --units h --nosuffix 2&amp;gt;/dev/null || echo "No permissions for LVM commands"
        else
          echo "LVM tools not installed"
        fi        
      register: vg_output
      ignore_errors: yes
      changed_when: false

    - name: Display VG information if available
      debug:
        var: vg_output.stdout_lines
      when: 
        - vg_output.rc == 0
        - "'not installed' not in vg_output.stdout"
        - "'No permissions' not in vg_output.stdout"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nothing clever, and that's the point. It's the difference between "is my fleet patched" being a question I can &lt;em&gt;answer&lt;/em&gt; versus a thing I find out about during an incident. The &lt;code&gt;security&lt;/code&gt; category is where the actual fun lives, the CVE patch playbooks for the bugs of the month, but the boring daily &lt;code&gt;apt&lt;/code&gt; job is what keeps the whole garden from drifting.
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/semaphore-cron-png.png" alt="Image description" /&gt;&lt;/p&gt;
&lt;h2&gt;The container fleet : Docker + Portainer&lt;/h2&gt;
&lt;p&gt;A big chunk of the actual &lt;em&gt;services&lt;/em&gt; run in Docker, spread across &lt;strong&gt;eight hosts&lt;/strong&gt;, each one a Proxmox VM with a Docker engine and a &lt;strong&gt;Portainer agent&lt;/strong&gt;. One central &lt;strong&gt;Portainer&lt;/strong&gt; UI sees all of them, so I manage the whole fleet from a single pane instead of SSH-hopping between boxes. I also manage them via ansible since they all are in the portainer category in my inventory :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;immich&lt;/strong&gt; - self-hosted photos&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;monitoring&lt;/strong&gt; - Grafana / Prometheus / InfluxDB (its own section below)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sso&lt;/strong&gt; - Pocket-ID&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;nextcloud&lt;/strong&gt; - the personal cloud (its own section too)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;nginx&lt;/strong&gt; - Nginx Proxy Manager, the front door for everything&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;media&lt;/strong&gt; - Jellyfin and friends&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;hydracked&lt;/strong&gt; - sits over in the &lt;strong&gt;DMZ&lt;/strong&gt;, it's a little DB of film links, deliberately kept on the low-trust side&lt;/li&gt;
&lt;li&gt;&lt;em&gt;(and a guacamole host, currently parked)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;How the compose files get backed up&lt;/h3&gt;
&lt;p&gt;Here's where I'll disappoint the GitOps purists. Portainer is only a &lt;strong&gt;monitoring pane&lt;/strong&gt; for me, one place to eyeball every host's containers across the fleet, I don't deploy &lt;em&gt;through&lt;/em&gt; it. The actual deploys are about as hand-rolled as it gets : I SSH in and &lt;code&gt;docker compose up -d&lt;/code&gt; on each host like it's 2018. The compose files themselves are kept safe by a much dumber, much more reliable thing : a scheduled &lt;strong&gt;rsync&lt;/strong&gt; of each host's stacks folder into a local working copy, then a &lt;strong&gt;git commit/push&lt;/strong&gt; to Gitea. Each machine has its &lt;strong&gt;own branch&lt;/strong&gt;, never merged, on the same repo, so the repo's branch list &lt;em&gt;is&lt;/em&gt; my fleet :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[branches]
interlope@immich:~/repo-docker-compose$ git branch -a
* immich
  main
  remotes/origin/HEAD -&amp;gt; origin/main
  remotes/origin/guacamole
  remotes/origin/immich
  remotes/origin/main
  remotes/origin/media
  remotes/origin/monitoring
  remotes/origin/nginx
  remotes/origin/portainer
  remotes/origin/sso
    remotes/origin/hydracked

[tree]
interlope@immich:~/repo-docker-compose$ tree
.
├── immich-app
│   └── docker-compose.yml
└── watchtower
    └── docker-compose.yml
3 directories, 2 files

[rsync]
rsync -av \
  --exclude='*/*/' \
  --include='*/' \
  --include='docker-compose.yml' \
  --exclude='*' \
  --prune-empty-dirs \
  ~/docker/ ~/repo-docker-compose/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You'll have spotted a &lt;code&gt;watchtower&lt;/code&gt; stack in that tree, and it's on &lt;strong&gt;every&lt;/strong&gt; Docker host. Watchtower (the actively-maintained &lt;code&gt;nickfedor&lt;/code&gt; fork) keeps an eye on the running images and pings me through &lt;strong&gt;Gotify&lt;/strong&gt; when a new version lands upstream, tagged per host via &lt;code&gt;WATCHTOWER_NOTIFICATION_TITLE_TAG&lt;/code&gt; so I know &lt;em&gt;which&lt;/em&gt; box is nagging me. The load-bearing knob is &lt;strong&gt;&lt;code&gt;WATCHTOWER_MONITOR_ONLY=true&lt;/code&gt;&lt;/strong&gt; : it watches and reports but does &lt;em&gt;not&lt;/em&gt; pull and restart anything behind my back, because an unattended container silently updating itself at 3am is exactly the kind of surprise I built all those backups to survive. I get the nudge ; I pull the trigger myself.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;services:
  watchtower:
    image: nickfedor/watchtower
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/timezone:/etc/timezone:ro
    environment:
      - WATCHTOWER_API_VERSION=1.44
      - WATCHTOWER_NOTIFICATION_TITLE_TAG=immich
      - WATCHTOWER_CLEANUP=true
      #- WATCHTOWER_LABEL_ENABLE=true
      - WATCHTOWER_INCLUDE_RESTARTING=true
      - WATCHTOWER_NOTIFICATIONS=gotify
      - WATCHTOWER_MONITOR_ONLY=true
      - WATCHTOWER_NOTIFICATION_GOTIFY_URL=https://gotify.xyz
      - WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=
    labels:
      - "com.centurylinklabs.watchtower.enable=true"&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;A compose worth showing : Immich&lt;/h3&gt;
&lt;p&gt;If I'm going to print one compose file, it's &lt;strong&gt;Immich&lt;/strong&gt;, it's the one people actually want to see, and it's a nice example of a service that runs its &lt;strong&gt;own&lt;/strong&gt; Postgres rather than leaning on my pgs pair : vector search needs the &lt;strong&gt;VectorChord&lt;/strong&gt; + &lt;strong&gt;pgvecto.rs&lt;/strong&gt; extensions, so Immich ships a purpose-built Postgres image, pinned by digest, naturally :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yaml"&gt;name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends hwaccel.transcoding.yml for nvenc / quicksync / vaapi / rkmpp
    volumes:
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # add -[cuda,rocm,openvino,armnn,rknn] to the tag for accelerated inference
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always

volumes:
  model-cache:&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, it exposes the usual ugly &lt;code&gt;host:2283&lt;/code&gt;, which nobody ever actually types, because of the next piece.&lt;/p&gt;
&lt;h2&gt;The front door : Nginx Proxy Manager&lt;/h2&gt;
&lt;p&gt;I've said "behind NPM" about four times now, so let's open that door. Every clean hostname in the lab funnels through one &lt;strong&gt;Nginx Proxy Manager&lt;/strong&gt; VM, &lt;code&gt;nginx.hlb1.xyz&lt;/code&gt;, a Docker stack whose config lives on the &lt;strong&gt;pgs pair&lt;/strong&gt; so a dead disk never takes my entire reverse-proxy map down with it.&lt;/p&gt;
&lt;p&gt;The flow for any service is the same. I add a &lt;strong&gt;local CNAME in Pi-hole&lt;/strong&gt;, say &lt;code&gt;immich.hlb1.xyz&lt;/code&gt; → &lt;code&gt;nginx.hlb1.lan&lt;/code&gt;. NPM holds a &lt;strong&gt;Let's Encrypt&lt;/strong&gt; certificate for the domain, terminates TLS, and proxies the request through to the real backend, &lt;code&gt;immich.hlb1.lan:2283&lt;/code&gt;. So the ugly &lt;code&gt;host:port&lt;/code&gt; a compose file publishes never reaches a human : it becomes &lt;code&gt;https://immich.hlb1.xyz&lt;/code&gt; with a proper green-padlock cert.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[dns01]
interlope@immich:~$ nslookup immich.hlb1.xyz
Server:         10.100.20.53
Address:        10.100.20.53#53

immich.hlb1.xyz canonical name = nginx01.hlb1.lan.
Name:   nginx01.hlb1.lan
Address: 10.100.20.80

[internet]
interlope@immich:~$ nslookup
&amp;gt; server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
&amp;gt; immich.hlb1.xyz
Server:         8.8.8.8
Address:        8.8.8.8#53

** server can't find immich.hlb1.xyz: NXDOMAIN&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here's the part people usually get wrong about &lt;code&gt;hlb1.xyz&lt;/code&gt; : it's a &lt;strong&gt;public domain, but none of these records live in public DNS&lt;/strong&gt;. &lt;code&gt;immich.hlb1.xyz&lt;/code&gt; exists &lt;em&gt;only&lt;/em&gt; as a &lt;strong&gt;local record in my Pi-hole&lt;/strong&gt;, so it resolves on the LAN and &lt;strong&gt;nowhere else&lt;/strong&gt;, from the open internet the name is simply dead. The single reason I bother owning a public domain at all is to pass Let's Encrypt's &lt;strong&gt;DNS-01 challenge&lt;/strong&gt; : the &lt;code&gt;_acme-challenge&lt;/code&gt; TXT records go in the domain's real public zone, that's enough to prove I own &lt;code&gt;hlb1.xyz&lt;/code&gt;, and Let's Encrypt hands me valid certs for hosts that were never meant to face outward. Public domain for the &lt;em&gt;cert&lt;/em&gt;, private resolver for the &lt;em&gt;records&lt;/em&gt;, no service ever actually exposed. That's the whole trick, and it's what turns a pile of containers on random ports into something that feels like a product.&lt;/p&gt;
&lt;h2&gt;Eyes everywhere : InfluxDB / Prometheus / Grafana&lt;/h2&gt;
&lt;p&gt;The monitoring host runs three things that, importantly, &lt;strong&gt;don't talk to each other&lt;/strong&gt;. There are two completely independent metric pipelines, and &lt;strong&gt;Grafana&lt;/strong&gt; just sits on top of both :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;InfluxDB&lt;/strong&gt; is fed by &lt;strong&gt;Proxmox directly&lt;/strong&gt;. PVE has a built-in external metric server, you point it at InfluxDB and the cluster ships its own host/VM metrics out of the box. This is the "how are the flowers doing" pipeline : CPU, RAM, IO, the cluster's vitals.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prometheus&lt;/strong&gt; scrapes &lt;strong&gt;node_exporter&lt;/strong&gt; on the fleet (plus a small &lt;strong&gt;OpenVPN collector&lt;/strong&gt; I keep on my GitHub for the VPN-side metrics). This is the "how are the &lt;em&gt;machines&lt;/em&gt; doing" pipeline, the classic exporter-and-scrape model. This is currently not used anymore since I switched from local OpenVPN to Tailscale. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There's no correspondence between the two, they're parallel, not layered. Influx gets the Proxmox-native firehose, Prometheus gets the exporter world, and Grafana is where I stitch them into dashboards I look at far too often.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
One thing I'll cop to : there's &lt;strong&gt;no alerting&lt;/strong&gt; wired up. Gotify exists in the lab and yells at me about plenty of things, but Grafana isn't one of them. The dashboards are, if I'm honest, mostly &lt;em&gt;therapy&lt;/em&gt;. I look at the graphs because they're pretty and they make me feel like I understand my own lab. That's a perfectly valid homelab use of a metrics stack and I won't be taking questions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code class="language-carousel"&gt;![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/grafana-cpu-png.png)
![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/grafana-ram-png.png)
![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/grafana-io-png.png)
![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/grafana-traffic-png.png)&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The watchtower : Wazuh&lt;/h2&gt;
&lt;p&gt;In #1 I called the Wazuh deployment "less paranoia and more therapy", and that's still true. It's a &lt;strong&gt;single-node All-in-One&lt;/strong&gt; install : manager, indexer and dashboard on one box, with &lt;strong&gt;agents across essentially the whole fleet&lt;/strong&gt;. For a lab my size, splitting the AIO into separate nodes would be effort for effort's sake.&lt;/p&gt;
&lt;p&gt;What I actually lean on it for :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FIM&lt;/strong&gt; (file integrity monitoring) - something changes a file it shouldn't, I hear about it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rootcheck&lt;/strong&gt; - the on-box rootkit/anomaly checks. This one's personal, after the &lt;a href="https://blog.interlope.xyz/should-i-really-trust-my-binaries-rootkit-hunting-with-rkhunter"&gt;rabbit hole I went down on whether you can ever trust a compromised machine&lt;/a&gt;, having centralized eyes on every box is the obvious follow-up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SCA&lt;/strong&gt; (security configuration assessment) - the CIS-style policy checks. These pair directly with my &lt;code&gt;cis_harden.yml&lt;/code&gt; Ansible playbook : harden with Ansible, then let Wazuh score how well it actually stuck. (see below for my debian 13 lab machine)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CVE checks&lt;/strong&gt; - Wazuh's vulnerability detection cross-references installed packages against known CVEs, so it'll flag a box running something with a published hole. Combined with the daily &lt;code&gt;apt&lt;/code&gt; playbook, that's my "am I exposed to the bug of the week" answer.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
No, it doesn't feed Gotify. And yes, I will once again admit I don't read all of these logs. But the value isn't in reading them every day, it's in having them &lt;em&gt;already collected&lt;/em&gt; on the day something actually goes wrong. Centralized history is the thing you can't generate retroactively. Maybe I'll look into it... Having Wazuh screaming at me may be fun.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre&gt;&lt;code class="language-carousel"&gt;![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/wazuh01-png.png)
![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/wazuh02-png.png)
![Image description](https://blog.interlope.xyz/bl-content/uploads/pages/23aba4261f11a1333df075544513c381/wazuh03-png.png)&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Name resolution : Pi-hole ×2&lt;/h2&gt;
&lt;p&gt;Two Pi-holes, and unlike the NTP and PGS &lt;em&gt;pairs&lt;/em&gt; on the cluster, these two are &lt;strong&gt;fully independent&lt;/strong&gt; and serve different worlds :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;production / homelab resolver&lt;/strong&gt; : the one the trusted network and my devices use.&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;DMZ resolver&lt;/strong&gt; : restricted and isolated, so a compromised DMZ box never gets to do lookups against the same resolver my house uses. Different zone, different resolver, different blast radius.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No sync between them, no gravity replication, on purpose. They're not redundant copies of each other, they're two deliberately separate trust domains that happen to run the same software.&lt;/p&gt;
&lt;p&gt;Upstream, resolution leaves via &lt;strong&gt;DoH to Cloudflare&lt;/strong&gt; (&lt;code&gt;cloudflared&lt;/code&gt; doing the DNS-over-HTTPS hop), so my queries aren't going out in cleartext for my ISP to read. you may want to read the &lt;a href="https://blog.interlope.xyz/how-to-evade-your-isp"&gt;post&lt;/a&gt; i wrote about it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]
The Pi-holes also do &lt;strong&gt;local resolution&lt;/strong&gt; for the &lt;code&gt;*.hlb1.lan&lt;/code&gt; names, so all those clean NPM hostnames actually resolve internally. Conditional forwarding / local DNS records are what turn &lt;code&gt;immich.hlb1.lan&lt;/code&gt; from a nice idea into a thing your browser can find.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;The homelab GDrive : Nextcloud AIO&lt;/h2&gt;
&lt;p&gt;Nextcloud runs from the &lt;strong&gt;All-in-One&lt;/strong&gt; docker-compose. AIO is its own beast : you don't run the individual containers yourself, you run a single &lt;strong&gt;mastercontainer&lt;/strong&gt; that then spawns and manages all the siblings (Apache, the Nextcloud app, its database, Redis, and whatever optional bits you enable) through the Docker socket.&lt;/p&gt;
&lt;p&gt;That means it brings its &lt;strong&gt;own bundled Postgres&lt;/strong&gt;, it does &lt;em&gt;not&lt;/em&gt; point at my pgs pair. Which is a little ironic given how much I evangelise that pair, but AIO is opinionated and fighting it isn't worth it. It lives behind NPM like everything else, with its data on the Ceph-backed VM disk.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[containers]
interlope@nextcloud:~$ docker ps --format 'table {{.Names}}\t{{.Status}}'
NAMES                                STATUS
nextcloud-aio-mastercontainer        Up 9 days (healthy)
nextcloud-aio-apache                 Up 9 days (healthy)
nextcloud-aio-nextcloud              Up 9 days (healthy)
nextcloud-aio-notify-push            Up 9 days (healthy)
nextcloud-aio-database               Up 9 days (healthy)
nextcloud-aio-redis                  Up 9 days (healthy)
nextcloud-aio-collabora              Up 9 days (healthy)

[docker-compose.yml]
interlope@nextcloud:~/docker/nextcloud-aio$ cat docker-compose.yml
services:
  nextcloud-aio-mastercontainer:
    image: ghcr.io/nextcloud-releases/all-in-one:latest
    container_name: nextcloud-aio-mastercontainer
    init: true
    restart: always
    ports:
      - "8080:8080"
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - NEXTCLOUD_DATADIR=/mnt/ncdata
      - APACHE_PORT=11000
      - APACHE_IP_BINDING=0.0.0.0
      - SKIP_DOMAIN_VALIDATION=true

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]
The mastercontainer pattern trips people up : if you go looking to &lt;code&gt;docker compose&lt;/code&gt; your way around the inner containers, you'll fight AIO and lose. You manage it through the mastercontainer's interface, and you let it manage the rest. Once you accept that it's a controller and not a normal stack, it's genuinely low-maintenance.
&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Keeping time : the NTP relais&lt;/h2&gt;
&lt;p&gt;Last one, and the one I warned you about. &lt;a href="https://docs.ntpsec.org/latest/quick.html"&gt;Time matters&lt;/a&gt; more than people think, a cluster with drifting clocks is a special kind of cursed to debug, so the lab runs a proper little &lt;strong&gt;NTP relais&lt;/strong&gt; on &lt;strong&gt;ntpsec&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The topology is dead simple : &lt;strong&gt;internal clients → ntp01 / ntp02 → upstream&lt;/strong&gt;. My two internal time servers sync from the Debian pool, and everything else in the lab syncs from &lt;em&gt;them&lt;/em&gt;. Two of them, purely for redundancy, paired and kept on separate nodes by one of those HA anti-affinity rules from earlier, because the one thing you don't want a single point of failure on is &lt;em&gt;time&lt;/em&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-conf"&gt;# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: &amp;lt;http://www.pool.ntp.org/join.html&amp;gt;
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page &amp;lt;http://support.ntp.org/bin/view/Support/AccessRestrictions&amp;gt;
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# but DO serve time to the internal VLANs
restrict 10.100.0.0 mask 255.255.0.0 nomodify notrap nopeer&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here's the relais actually working, from a regular client's point of view, syncing off &lt;code&gt;ntp01&lt;/code&gt; / &lt;code&gt;ntp02&lt;/code&gt; rather than reaching out to the internet itself :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[client → ntp01/02]
ansible@bastion:~$ ntpq -p
     remote                                   refid      st t when poll reach   delay   offset   jitter
=======================================================================================================
*ntp01.hlb1.lan                          82.64.42.185     2 u   80 1024  377   0.6222  -0.6840   0.3288
+ntp02.hlb1.lan                          79.143.250.33    2 u 1062 1024  377   0.2333  -1.1489   0.7254

[ntp01 → upstream]
root@ntp01:~# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*time.cloudflare 10.21.8.19       3 u   42  256  377    6.122   0.118   0.241
+162.159.200.123 10.21.8.19       3 u   88  256  377    7.044  -0.205   0.318
+51.255.140.97   145.238.203.14   2 u  101  256  377    4.881   0.402   0.290
 213.251.128.249 .INIT.          16 u    -  256    0    0.000   0.000   0.000&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The stratum-2 client is healthy, the &lt;code&gt;*&lt;/code&gt; shows which peer it's actually disciplined to, and the internal hostnames in that &lt;code&gt;refid&lt;/code&gt; column are the relais doing its job. Working, boring, redundant, and exactly what you want from time.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;Putting it all together (again)&lt;/h2&gt;
&lt;p&gt;So that's the inside of the beasts. The mesh that lets me in four different ways depending on how much I trust the device in my hand. The HA that turns a dead node into a dashboard notification instead of an outage. The backups that verify themselves and leave the house encrypted. A storage migration I did on a rumour and got away with. A GitOps spine that's half best-practice and half rsync-and-pray. A container fleet under one pane of glass. Two metric pipelines feeding dashboards I stare at for fun, a watchtower I rarely read but am always glad to have, two resolvers in two trust domains, a personal cloud, and a pair of clocks keeping everyone honest.&lt;/p&gt;
&lt;p&gt;None of it is finished. The namespaces aren't done, the KVMs aren't bought, the alerting isn't wired, and at least one design decision in here was load-bearing &lt;em&gt;vibes&lt;/em&gt;. That's still the whole point : a production-ready homelab isn't a finished datacenter, it's a thing you keep poking at because poking at it is the hobby.&lt;/p&gt;
&lt;p&gt;If you made it all the way here : thanks, and, again, get a hobby (he says, having written part two of a small novel about his own).&lt;/p&gt;
&lt;p&gt;Thanks for reading me,&lt;/p&gt;
&lt;p&gt;spleenftw&lt;/p&gt;</description>
      <pubDate>Mon, 08 Jun 2026 14:29:39 +0200</pubDate>
      <guid isPermaLink="false">23aba4261f11a1333df075544513c381</guid>
    </item>
    <item>
      <title>WIMH #1 (what's in my homelab)</title>
      <link>https://blog.interlope.xyz/my-homelab-setup</link>
      <image/>
      <description>&lt;h2&gt;Welcome to the homegarden&lt;/h2&gt;
&lt;p&gt;So you want a tour, huh ?&lt;/p&gt;
&lt;p&gt;I've been writing about bits and pieces of this lab for a while now. I crashed the &lt;a href="https://blog.interlope.xyz/do-you-want-some-honey-because-bots-do"&gt;honey market&lt;/a&gt;, I tried (and partially failed) to &lt;a href="https://blog.interlope.xyz/how-to-evade-your-isp"&gt;evade my ISP&lt;/a&gt;, I went &lt;a href="https://blog.interlope.xyz/should-i-really-trust-my-binaries-rootkit-hunting-with-rkhunter"&gt;rootkit shopping&lt;/a&gt; and I &lt;a href="https://blog.interlope.xyz/fixing-an-error-i-made-a-few-years-ago-and-migrating-to-lvm"&gt;played with LVM&lt;/a&gt;. But I've never actually sat you down and walked you through the whole thing. What's plugged in, what talks to what, and what's actually &lt;em&gt;running&lt;/em&gt; in there.&lt;/p&gt;
&lt;p&gt;So here we are. Grab a coffee, this one's gonna be long. Actually, grab the whole pot.&lt;/p&gt;
&lt;p&gt;A quick disclaimer before we start, the same one I always give myself : this is a &lt;strong&gt;homelab&lt;/strong&gt;. Or, as I like to call it, the &lt;em&gt;not-so-home-but-more-like-prod-lab&lt;/em&gt;. None of this is "best practice" and none of this is a reference architecture. A good chunk of it exists purely because it was fun to build at 2 AM. That's the whole point. A production-ready homelab is about having fun trying things, and &lt;em&gt;then&lt;/em&gt; doing them the right way because you got annoyed the third time it broke.&lt;/p&gt;
&lt;p&gt;We'll do this in three parts, like a proper open house :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The system tour&lt;/strong&gt; : what's physically in the rack and what each node is made of&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The network tour&lt;/strong&gt; : the fabric, the VLANs, and the zone-based firewall holding it all together&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The VM tour&lt;/strong&gt; : the 40-ish machines actually doing the work&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let's open the door (which has been removed since a few years).
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;&lt;u&gt;Part 1 - The system tour&lt;/u&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;u&gt;What's in the box&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Everything lives in a single 24U rack that, against all my hopes and dreams, is &lt;strong&gt;already full&lt;/strong&gt;. I keep telling myself 24U is plenty. It is not. It is never plenty. If you have a rack, you understand. If you don't, congratulations, you still have money.&lt;/p&gt;
&lt;p&gt;Here's the current occupancy :&lt;/p&gt;
&lt;blockquote class="twitter-tweet"&gt;&lt;p lang="fr" dir="ltr"&gt;Mon petit sapin de Noël à moi 👀 &lt;a href="https://t.co/nL2pMo6nYg"&gt;pic.twitter.com/nL2pMo6nYg&lt;/a&gt;&lt;/p&gt;&amp;mdash; interlope.xyz (@spleenftw) &lt;a href="https://x.com/spleenftw/status/2004582089619050724?ref_src=twsrc%5Etfw"&gt;December 26, 2025&lt;/a&gt;&lt;/blockquote&gt; &lt;script async src="https://platform.x.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;
&lt;p&gt;Going piece by piece :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;UniFi Dream Machine SE (UDM-SE)&lt;/strong&gt; : the network brain. It does everything, name it : routing, all the inter-VLAN firewalling, the IDS/IPS, and the geoblocking. Everything that crosses a zone boundary crosses &lt;em&gt;it&lt;/em&gt;. We'll come back to this one in the network tour because it deserves its own section.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USW-Aggregation&lt;/strong&gt; : my 10G core. This is what makes the whole "distributed storage over real bandwidth" thing possible instead of being a sad slideshow. The Ceph traffic lives here, you may find some packets playing tag behind the curtains (tag, vlans, you got the joke right ?)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TerraMaster U8-450&lt;/strong&gt; : an 8-bay NAS. This is the bulk-storage and backup target. My Proxmox Backup Server dumps onto it (more on that in the VM tour), so even if a node decides to spontaneously combust, the backups are sitting somewhere else entirely and it also contains &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3x Proxmox nodes&lt;/strong&gt; : &lt;em&gt;pivoine&lt;/em&gt;, &lt;em&gt;petunia&lt;/em&gt; and &lt;em&gt;dalia&lt;/em&gt;. The actual compute. The flowers. The stars of the show.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PowerWalker 1500 IoT UPS&lt;/strong&gt; : 1500VA standing between my cluster and the kind of dirty power event that turns a healthy Ceph cluster into a very long evening.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And on the roadmap, because a homelab is never &lt;em&gt;done&lt;/em&gt; even tho my wallet would like to :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;48-port PoE switch&lt;/strong&gt;, because I've run out of ports the same way I've run out of U&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3x GL.iNet Comet PoE&lt;/strong&gt; : KVM-over-IP, one per node, powered over PoE. Translation : I'll be able to see the BIOS of a dead node and power-cycle it &lt;strong&gt;from my phone&lt;/strong&gt;, from anywhere. The day I break my proxmox cluster and I need to access the proxmox node physically, I'll be happy to have those.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;The nodes - meet the flowers&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;All three nodes run &lt;strong&gt;Proxmox VE&lt;/strong&gt; (because, and I cannot stress this enough, &lt;strong&gt;fuck broadcom&lt;/strong&gt;). They're named after flowers, which is also why the cluster itself is called &lt;strong&gt;homegarden&lt;/strong&gt;. Yes, I'm aware. No, I won't apologize.&lt;/p&gt;
&lt;p&gt;The first one, &lt;strong&gt;pivoine&lt;/strong&gt; (a.k.a. &lt;em&gt;pve01&lt;/em&gt;), is the one that started it all : it was my single-node lab before this whole thing metastasized into a cluster even though I stopped at 3 nodes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;CPU&lt;/em&gt; : AMD Ryzen 7 5700G (8c/16t)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;RAM&lt;/em&gt; : 4x32 DDR4 3200MHz&lt;/li&gt;
&lt;li&gt;&lt;em&gt;NIC&lt;/em&gt; : Mellanox ConnectX-3 10GbE&lt;/li&gt;
&lt;li&gt;&lt;em&gt;OS disks&lt;/em&gt; : 2x Samsung 870 EVO 500GB&lt;/li&gt;
&lt;li&gt;&lt;em&gt;VM disks&lt;/em&gt; : 2x Samsung 980 PRO 2TB&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Cooler&lt;/em&gt; : Noctua NH-D12L &lt;/li&gt;
&lt;li&gt;&lt;em&gt;PSU&lt;/em&gt; : be quiet! Pure Power 12 M 550W &lt;/li&gt;
&lt;li&gt;&lt;em&gt;Case&lt;/em&gt; : Silverstone RM42-502&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The two other nodes, &lt;strong&gt;petunia&lt;/strong&gt; (&lt;em&gt;pve02&lt;/em&gt;) and &lt;strong&gt;dalia&lt;/strong&gt; (&lt;em&gt;pve03&lt;/em&gt;), share the exact same build :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;CPU&lt;/em&gt; : AMD Ryzen 5 8600G (6c/12t)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;RAM&lt;/em&gt; : 2x24 DDR5 5600MHz&lt;/li&gt;
&lt;li&gt;&lt;em&gt;NIC&lt;/em&gt; : Intel X710-DA2&lt;/li&gt;
&lt;li&gt;&lt;em&gt;OS disks&lt;/em&gt; : 2x Intel S3700 200GB (old enterprise SSDs that refuse to die)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;VM disks&lt;/em&gt; : 2x Samsung 990 PRO 2TB&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Cooler&lt;/em&gt; : Noctua NH-L12S &lt;/li&gt;
&lt;li&gt;&lt;em&gt;Case&lt;/em&gt; : RM23-502 Mini&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And every node also got a &lt;strong&gt;dual 1G NIC&lt;/strong&gt; bolted on, dedicated entirely to the cluster's nervous system. That's the network we're talking about next.&lt;/p&gt;
&lt;p&gt;Add it all up and you've got a cluster with enough cores and RAM that I can be irresponsible with VM counts and still sleep fine. Which, spoiler, is exactly what I do.
But I wish I could crank it up to 4x24Gb on &lt;strong&gt;petunia&lt;/strong&gt; and &lt;strong&gt;dalia&lt;/strong&gt; because right now, if &lt;strong&gt;pivoine&lt;/strong&gt; fails, they haven't enough RAM to sustain the load.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;&lt;u&gt;Part 2 - The network tour&lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;This is the part I'm proudest of, so lads, buckle the f*** up.&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;The fabric : from a cursed ring to OpenFabric&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Back when I first clustered these three, I built what I called a &lt;strong&gt;ring network&lt;/strong&gt; : three direct cables forming a triangle between the nodes, no switch involved, dedicated to Corosync and cluster chatter. The idea is sound. Keep the latency-sensitive cluster traffic off the switch entirely and give Corosync a clean, private path.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;implementation&lt;/em&gt;, however, was held together with hope and static routes. I carved out three &lt;code&gt;/29&lt;/code&gt; subnets, one per link, and manually wrote in &lt;code&gt;/etc/network/interfaces&lt;/code&gt; : &lt;code&gt;post-up ip route add ... via ...&lt;/code&gt; lines so that, say, pivoine could reach dalia by hairpinning through petunia. I also had to enable IP forwarding on every node to make the middle-man routing work.&lt;/p&gt;
&lt;p&gt;It looked roughly like this :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;            pivoine
           /        \
    (1G) /            \ (1G)
        /              \
   petunia ─────────── dalia
              (1G)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It worked, I mean, I wrote it and hoped it would work. 
Turns out it had two problems.&lt;/p&gt;
&lt;p&gt;The first was cosmic. For reasons I will take to my grave, the &lt;code&gt;10.10.1.0/29&lt;/code&gt; subnet simply &lt;em&gt;would not route&lt;/em&gt;. I sat there until 3 AM rewriting configs, swapping cables, questioning my career, and then I changed it to &lt;code&gt;10.10.3.0/29&lt;/code&gt;, it worked first try, and I never spoke of it again. Goodbye &lt;code&gt;10.10.1.x&lt;/code&gt;, I loved you (I did not, I hate you, you costed me more sleep that you should have).&lt;/p&gt;
&lt;p&gt;The second problem was real : static routing doesn't heal. Pull the petunia &amp;lt;=&amp;gt; dalia cable and the static path between those two is just... gone, until I fix it by hand. On a cluster where Corosync gets &lt;em&gt;very&lt;/em&gt; opinionated about losing a link, that's not great.&lt;/p&gt;
&lt;p&gt;So I upgraded the whole thing to &lt;strong&gt;OpenFabric&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;OpenFabric (running on FRR, which Proxmox VE 9 now wires up natively through its SDN &lt;em&gt;Fabrics&lt;/em&gt; feature) turns the triangle into a proper dynamic-routing fabric. Instead of brittle static routes between interface IPs, each node gets a &lt;strong&gt;loopback&lt;/strong&gt; address in a &lt;code&gt;10.10.10.0/28&lt;/code&gt; subet (&lt;code&gt;10.10.10.1/.2/.3&lt;/code&gt;) and the fabric figures out the paths itself using a link-state protocol. Pull any single cable and it just &lt;strong&gt;reconverges&lt;/strong&gt; over the remaining links. No more 3 AM. No more hand-editing. It heals.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[pivoine]
root@pivoine:~# vtysh -c "show openfabric neighbor"
Area mesh:
 System Id           Interface   L  State         Holdtime SNPA
 petunia             enp7s0      2  Up            9        2020.2020.2020
 dalia               enp8s0      2  Up            10       2020.2020.2020
root@pivoine:~# vtysh -c "show openfabric route" | grep 10.10
 10.10.10.1/32  IP internal  0                            pivoine(4)
 10.10.10.2/32  IP TE        20      petunia   enp7s0     petunia(4)
 10.10.10.3/32  IP TE        20      dalia     enp8s0     dalia(4)
 10.10.10.1/32  0       -          -           -
 10.10.10.2/32  20      enp7s0     10.10.10.2  -
 10.10.10.3/32  20      enp8s0     10.10.10.3  -

[petunia]
root@petunia:~# vtysh -c "show openfabric neighbor"
Area mesh:
 System Id           Interface   L  State         Holdtime SNPA
 pivoine             enp8s0      2  Up            10       2020.2020.2020
 dalia               enp9s0      2  Up            10       2020.2020.2020
root@petunia:~# vtysh -c "show openfabric route" | grep 10.10
 10.10.10.2/32  IP internal  0                            petunia(4)
 10.10.10.1/32  IP TE        20      pivoine   enp8s0     pivoine(4)
 10.10.10.3/32  IP TE        20      dalia     enp9s0     dalia(4)
 10.10.10.1/32  20      enp8s0     10.10.10.1  -
 10.10.10.2/32  0       -          -           -
 10.10.10.3/32  20      enp9s0     10.10.10.3  -

[dalia]
root@dalia:~# vtysh -c "show openfabric neighbor"
Area mesh:
 System Id           Interface   L  State         Holdtime SNPA
 pivoine             enp8s0      2  Up            10       2020.2020.2020
 petunia             enp9s0      2  Up            10       2020.2020.2020
root@dalia:~# vtysh -c "show openfabric route" | grep 10.10
 10.10.10.3/32  IP internal  0                            dalia(4)
 10.10.10.1/32  IP TE        20      pivoine   enp8s0     pivoine(4)
 10.10.10.2/32  IP TE        20      petunia   enp9s0     petunia(4)
 10.10.10.1/32  20      enp8s0     10.10.10.1  -
 10.10.10.2/32  20      enp9s0     10.10.10.2  -
 10.10.10.3/32  0       -          -           -&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then I layered Corosync on top properly :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;link0&lt;/strong&gt; rides the OpenFabric loopbacks : low latency, self-healing, the primary path&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;link1&lt;/strong&gt; rides the management network as an independent switched fallback&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[pivoine]
root@pivoine:~# corosync-cfgtool -n
Local node ID 1, transport knet
nodeid: 2 reachable
   LINK: 0 udp (10.10.10.1-&amp;gt;10.10.10.2) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.101-&amp;gt;10.100.2.102) enabled connected mtu: 1397

nodeid: 3 reachable
   LINK: 0 udp (10.10.10.1-&amp;gt;10.10.10.3) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.101-&amp;gt;10.100.2.103) enabled connected mtu: 1397

[petunia]
root@petunia:~# corosync-cfgtool -n
Local node ID 2, transport knet
nodeid: 1 reachable
   LINK: 0 udp (10.10.10.2-&amp;gt;10.10.10.1) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.102-&amp;gt;10.100.2.101) enabled connected mtu: 1397

nodeid: 3 reachable
   LINK: 0 udp (10.10.10.2-&amp;gt;10.10.10.3) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.102-&amp;gt;10.100.2.103) enabled connected mtu: 1397

[dalia]
root@dalia:~# corosync-cfgtool -n
Local node ID 3, transport knet
nodeid: 1 reachable
   LINK: 0 udp (10.10.10.3-&amp;gt;10.10.10.1) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.103-&amp;gt;10.100.2.101) enabled connected mtu: 1397

nodeid: 2 reachable
   LINK: 0 udp (10.10.10.3-&amp;gt;10.10.10.2) enabled connected mtu: 1397
   LINK: 1 udp (10.100.2.103-&amp;gt;10.100.2.102) enabled connected mtu: 1397&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So now I can yank a single mesh cable and watch quorum not even flinch. Same physical triangle as before, completely different confidence level. I can now sleep deeply and dream about the &lt;a href="https://eu.store.ui.com/eu/en/products/udm-beast"&gt;UDM BEAST&lt;/a&gt; and its 25G interfaces...&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;The VLANs&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Everything internal lives in RFC 1918 space (the good old 10.0.0.0/8), carved into one /24 per VLAN. I kinda like to think of myself as a rich guy using a whole /24 for 3 vms... The UDM-SE holds the gateway for each one. I'm not going to hand you the exact map (I've &lt;a href="https://blog.interlope.xyz/how-to-evade-your-isp"&gt;written before&lt;/a&gt; about not feeding people free metadata, so it'd be a bit rich to then publish my entire addressing plan), but the structure is the interesting part anyway :&lt;/p&gt;
&lt;p&gt;Here's the full map :&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;VLAN&lt;/th&gt;
&lt;th&gt;What lives here&lt;/th&gt;
&lt;th&gt;Zone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;UniFi gear management&lt;/td&gt;
&lt;td&gt;admin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Proxmox / node management&lt;/td&gt;
&lt;td&gt;admin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Ceph public&lt;/td&gt;
&lt;td&gt;cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Ceph private&lt;/td&gt;
&lt;td&gt;cluster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;VPN&lt;/td&gt;
&lt;td&gt;vpn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Admin&lt;/td&gt;
&lt;td&gt;admin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Backup&lt;/td&gt;
&lt;td&gt;backup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;Production&lt;/td&gt;
&lt;td&gt;internal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;DMZ&lt;/td&gt;
&lt;td&gt;dmz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;IoT&lt;/td&gt;
&lt;td&gt;internal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;Lab / clients&lt;/td&gt;
&lt;td&gt;internal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;House&lt;/td&gt;
&lt;td&gt;internal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3&gt;&lt;u&gt;Zone-based firewalling&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;This is where the UDM-SE does most of its work. Rather than writing a thousand VLAN-to-VLAN rules and slowly losing my mind, everything is grouped into &lt;strong&gt;firewall zones&lt;/strong&gt;, and the rules live between zones :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Admin&lt;/strong&gt; : VLANs 1, 2 and 10&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backup&lt;/strong&gt; : VLANs 15&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internal&lt;/strong&gt; : VLANs 20, 30, 40 and 45&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DMZ&lt;/strong&gt; : VLAN 25&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VPN&lt;/strong&gt; : VLAN 5&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cluster&lt;/strong&gt; : VLANs 3 and 4&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the rules, in plain English :&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Admin&lt;/strong&gt; zone is &lt;em&gt;not&lt;/em&gt; a blanket "see everything" zone. VLANs 1 and 2 are &lt;strong&gt;pure management&lt;/strong&gt; : UniFi gear talks on 1, servers management on 2, and that's it, no internet access and  they don't get to roam, at all. It's specifically &lt;strong&gt;VLAN 10&lt;/strong&gt; that reaches everywhere. So "god mode" is one carefully-watched VLAN rather than a whole zone. If something on VLAN 10 gets popped, &lt;em&gt;that's&lt;/em&gt; my bad day, but it's a much smaller attack surface than letting an entire admin block touch anything.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Backup&lt;/strong&gt; vlan used to live with the production stuff, until I realised that was exactly backwards. Your backups are the one thing that has to survive everything &lt;em&gt;else&lt;/em&gt; getting owned, so the last place they should sit is the same broadcast domain as the services most likely to get popped. So it got its own zone, fully isolated and with &lt;strong&gt;no internet access at all&lt;/strong&gt;. Nothing initiates a connection out, and nothing reaches in except the scoped flows that actually need to push or pull backups. If ransomware ever has a field day in the internal zone, it shouldn't even be able to &lt;em&gt;see&lt;/em&gt; the box holding the copies that'll save me.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Internal&lt;/strong&gt; zone flows freely &lt;em&gt;between its own VLANs&lt;/em&gt;, plus a few surgical exceptions : scoped management hops to specific vpn and cluster IPs (this is how Ansible reaches out to configure things), wazuh clients, nginx hosts in another zones, some prometheus scraping or uptime-kuma icmp and access &lt;em&gt;into&lt;/em&gt; the DMZ where it's needed.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;DMZ&lt;/strong&gt; is the paranoid one. It's walled off from everything, and it runs its &lt;strong&gt;own dedicated NTP and DNS&lt;/strong&gt; so it never has to reach back into my production resolvers. The whole philosophy of a DMZ is "assume this gets compromised", so I don't want a compromised DMZ box doing DNS lookups against the same Pi-hole my house uses. It gets its own everything (I've got &lt;a href="https://blog.interlope.xyz/how-to-evade-your-isp"&gt;opinions about who gets to see my DNS&lt;/a&gt;, so no, the sketchy zone doesn't get to use the good resolver)).&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;VPN&lt;/strong&gt; and &lt;strong&gt;Cluster&lt;/strong&gt; zones are also locked down tight, but they get one exception : they use the &lt;strong&gt;production DNS and NTP&lt;/strong&gt;. They're trusted infrastructure rather than exposed services, so they get lucky and share the nice resolvers.&lt;/p&gt;
&lt;p&gt;On top of all that, the UDM runs &lt;strong&gt;IDS/IPS&lt;/strong&gt; and &lt;strong&gt;geoblocking&lt;/strong&gt; at the edge. The geoblocking alone cuts an absurd amount of noise. If you've ever pointed a honeypot at the open internet (I have, &lt;a href="https://blog.interlope.xyz/do-you-want-some-honey-because-bots-do"&gt;it's a whole post&lt;/a&gt;), you know exactly how much of your inbound traffic is just a handful of countries' worth of bots knocking on every door. Block the regions you have no business talking to and the logs get a lot quieter.&lt;/p&gt;
&lt;h2&gt;&lt;u&gt;Part 3 - The storage tour&lt;/u&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;u&gt;The Hypervisors storage aka cephfs&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Storage in this lab has had a &lt;em&gt;journey&lt;/em&gt;, and the journey is half the fun.&lt;/p&gt;
&lt;p&gt;It started as plain ZFS on a single node. Then, when I went to three nodes and got greedy for High Availability, I went down the &lt;strong&gt;LINSTOR + DRBD&lt;/strong&gt; rabbit hole. I wrote a &lt;a href="#"&gt;whole article&lt;/a&gt; about building that out, complete with a keepalived VIP and an HA controller. 
And It worked ! It was also &lt;em&gt;a lot&lt;/em&gt; : DRBD reactor, promoter configs, a replicated controller database, etc. It was a great thing to learn and a great thing to eventually retire. I spent wayyy too much time and nights to fix those freaking DRDB errors when an nvme failed and I had to reboot in SOS mode to rebuild the cluster until the sun came out and I had to go to work.&lt;/p&gt;
&lt;p&gt;Because I've since moved to &lt;strong&gt;Ceph&lt;/strong&gt;, integrated directly into the Proxmox cluster.&lt;/p&gt;
&lt;p&gt;As for why you may ask ? The reason is just &lt;em&gt;fit&lt;/em&gt;. Proxmox's Ceph integration is first-class : it's in the GUI, it's in the cluster's bones, and it gives me the shared, self-healing block storage I wanted without me hand-rolling the replication layer. Each node runs &lt;strong&gt;2 OSDs&lt;/strong&gt;, so the cluster has 6 OSDs total spread across the three flowers, and the whole thing rides the 10G networking we set up earlier :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ceph public&lt;/strong&gt; lives on VLAN 3, on a dedicated 10G NIC&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ceph private / cluster&lt;/strong&gt; lives on VLAN 4, also on a dedicated 10G NIC&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[tree]
root@pivoine:/home/interlope# ceph osd tree
ID  CLASS  WEIGHT    TYPE NAME         STATUS  REWEIGHT  PRI-AFF
-1         10.91574  root default
-3          3.63858      host dalia
 0   nvme   1.81929          osd.0         up   1.00000  1.00000
 1   nvme   1.81929          osd.1         up   1.00000  1.00000
-5          3.63858      host petunia
 2   nvme   1.81929          osd.2         up   1.00000  1.00000
 3   nvme   1.81929          osd.3         up   1.00000  1.00000
-7          3.63858      host pivoine
 4   nvme   1.81929          osd.4         up   1.00000  1.00000
 5   nvme   1.81929          osd.5         up   1.00000  1.00000

[df]
root@pivoine:/home/interlope# ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP      META     AVAIL    %USE   VAR   PGS  STATUS
 0   nvme  1.81929   1.00000  1.8 TiB  294 GiB  293 GiB   869 KiB  1.2 GiB  1.5 TiB  15.80  0.85   60      up
 1   nvme  1.81929   1.00000  1.8 TiB  401 GiB  399 GiB   1.2 MiB  1.5 GiB  1.4 TiB  21.51  1.15   69      up
 2   nvme  1.81929   1.00000  1.8 TiB  295 GiB  294 GiB   867 KiB  1.3 GiB  1.5 TiB  15.85  0.85   56      up
 3   nvme  1.81929   1.00000  1.8 TiB  402 GiB  401 GiB   1.1 MiB  1.5 GiB  1.4 TiB  21.59  1.16   73      up
 4   nvme  1.81929   1.00000  1.8 TiB  347 GiB  345 GiB  1018 KiB  1.6 GiB  1.5 TiB  18.60  1.00   66      up
 5   nvme  1.81929   1.00000  1.8 TiB  346 GiB  344 GiB  1014 KiB  1.5 GiB  1.5 TiB  18.56  1.00   63      up
                       TOTAL   11 TiB  2.0 TiB  2.0 TiB   6.0 MiB  8.6 GiB  8.9 TiB  18.65
MIN/MAX VAR: 0.85/1.16  STDDEV: 2.34

[stat]
root@pivoine:/home/interlope# ceph osd stat
6 osds: 6 up (since 6d), 6 in (since 6d); epoch: e4248&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each node is also a monitor, a manager and a metadata server for a fully capable HA storage service. 
I also keep a dedicated &lt;strong&gt;Ceph pool for ISOs&lt;/strong&gt;, so my install media and templates sit on the same resilient, every-node-can-see-it storage as the VMs. No more "oh that ISO only exists on pivoine" nonsense, it's just &lt;em&gt;there&lt;/em&gt;, cluster-wide.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[status]
root@pivoine:/home/interlope# ceph -s
  cluster:
    id:     5819dbca-7480-4070-b1cb-aa44b2adfab1
    health: HEALTH_OK

  services:
    mon: 3 daemons, quorum pivoine,dalia,petunia (age 6d)
    mgr: petunia(active, since 6d), standbys: pivoine, dalia
    mds: 1/1 daemons up, 2 standby
    osd: 6 osds: 6 up (since 6d), 6 in (since 6d)

  data:
    volumes: 1/1 healthy
    pools:   4 pools, 129 pgs
    objects: 238.03k objects, 813 GiB
    usage:   2.0 TiB used, 8.9 TiB / 11 TiB avail
    pgs:     129 active+clean

  io:
    client:   773 KiB/s wr, 0 op/s rd, 84 op/s wr

[mon]
root@pivoine:/home/interlope# ceph mon stat
e3: 3 mons at {dalia=[v2:10.100.3.103:3300/0,v1:10.100.3.103:6789/0],petunia=[v2:10.100.3.102:3300/0,v1:10.100.3.102:6789/0],pivoine=[v2:10.100.3.101:3300/0,v1:10.100.3.101:6789/0]} removed_ranks: {} disallowed_leaders: {}, election epoch 402, leader 0 pivoine, quorum 0,1,2 pivoine,dalia,petunia

[mgr]
root@pivoine:/home/interlope# ceph mgr stat
{
    "epoch": 166,
    "available": true,
    "active_name": "petunia",
    "num_standby": 2
}

[fs]
root@pivoine:/home/interlope# ceph fs status
ceph-iso - 3 clients
========
RANK  STATE    MDS      ACTIVITY     DNS    INOS   DIRS   CAPS
 0    active  pve03  Reqs:    0 /s    22     23     16     12
       POOL          TYPE     USED  AVAIL
ceph-iso_metadata  metadata  1414k  2734G
  ceph-iso_data      data    30.2G  2734G
STANDBY MDS
   pve02
   pve01
MDS version: ceph version 19.2.3 (d74d168b1c80fb01e1a30d5e4ca9a45b12bc145b) squid (stable)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is Ceph heavier than LINSTOR was ? Maybe it was, in some ways. Do I care ? No. The live migrations are clean, there's no IO delay that bothers me in practice, and it's one less bespoke stack for future-me to debug. And I sleep better at night. So I'd say it's a win-win for everyone.
&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;The bulk &amp;amp; backup storage aka the NAS&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Now for the storage that isn't trying to be fast, smart and distributed : the &lt;strong&gt;TerraMaster U8-450&lt;/strong&gt;, running &lt;strong&gt;TrueNAS&lt;/strong&gt;. Where Ceph is the fast, shared, self-healing tier the VMs actually live on, the NAS is the slow, big, "just don't lose my stuff" tier.&lt;/p&gt;
&lt;p&gt;TrueNAS gives me &lt;strong&gt;ZFS&lt;/strong&gt; with a proper GUI on top, and I've fed it &lt;strong&gt;32GB of RAM&lt;/strong&gt; for the ARC (because ZFS without RAM is just sadness with extra steps). It's split into &lt;strong&gt;two pools&lt;/strong&gt; :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;pool-ssd&lt;/strong&gt; : 4x 1TB SATA SSDs. The landing zone for quick backups, the stuff I want written fast and read back fast. Backups are going there every night with a 7 iteration retention policy &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;pool-hdd&lt;/strong&gt; : 4x 4TB Toshiba N300 spinning rust. The backups from the SSD pool &lt;strong&gt;replicate here weekly&lt;/strong&gt; with a longer retention (30 iterations), plus it holds some films and the bulk data that doesn't need to be quick.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the flow is : land fast on SSD, then let TrueNAS age it out onto the HDD pool weekly where I keep more history. My PBS datastores points here, so the whole VM fleet ends up safely off-cluster on storage that doesn't care if a node bursts into flames.&lt;/p&gt;
&lt;p&gt;The one cloud on the horizon : &lt;strong&gt;free space is getting fierce&lt;/strong&gt;. Between the bqckups and the films, those 4TB N300s are filling up faster than I'd like, and I've got my eye on some good old &lt;strong&gt;16TB disks&lt;/strong&gt; to give the HDD pool some breathing room. It's never &lt;em&gt;if&lt;/em&gt; you run out of space in a homelab, only &lt;em&gt;when&lt;/em&gt;, and apparently my &lt;em&gt;when&lt;/em&gt; is now.
&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;Sending it offsite aka the 3-2-1 rule&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;Everything so far keeps my data safe &lt;em&gt;inside the rack&lt;/em&gt;. Ceph survives a dead node, the NAS survives a dead Ceph, PBS survives a dead VM. But all of it sits in the same room, on the same UPS, behind the same door. So if the house floods or burns down, every single copy goes with it. Not great.&lt;/p&gt;
&lt;p&gt;The rule everyone throws around is &lt;strong&gt;3-2-1&lt;/strong&gt; : &lt;strong&gt;3&lt;/strong&gt; copies of your data, on &lt;strong&gt;2&lt;/strong&gt; different types of media, with &lt;strong&gt;1&lt;/strong&gt; of them offsite. I had the 3 and the 2 sorted, but I was missing the offsite one. (actually they weren't really sorted out since it was the same NAS on different pools and disks...)&lt;/p&gt;
&lt;p&gt;That's where &lt;strong&gt;PBS 4.0&lt;/strong&gt; comes in, since it added &lt;strong&gt;S3-compatible object storage&lt;/strong&gt; as a backup target. Instead of building a second physical PBS at a friend's place and maintaining it forever (and explaining to them why their internet dies every night at 2 AM), I can just push my backups to an S3 bucket in the cloud.&lt;/p&gt;
&lt;p&gt;One gotcha : the S3 backend isn't just a dumb dump. PBS keeps a &lt;strong&gt;local cache&lt;/strong&gt; (a dedicated dataset is best) so it's not hammering the S3 API and charging me for every read. So I get the cheap, infinite, somewhere-else storage without my restores crawling.&lt;/p&gt;
&lt;p&gt;So the count finally adds up :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Copy 1&lt;/strong&gt; : the live data on Ceph&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy 2&lt;/strong&gt; : the PBS backups on the NAS, different box, different media&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy 3&lt;/strong&gt; : those same backups pushed offsite to S3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And since it's landing in someone else's datacenter, it's &lt;strong&gt;encrypted before it leaves the house&lt;/strong&gt;. If you've read any of my other posts you already know I'm not handing a third party my plaintext anything. They get encrypted blobs, nothing else.&lt;/p&gt;
&lt;p&gt;Is it perfect ? No. Cloud egress costs money and a full restore from S3 would be slow and annoying. But that copy is there for the day the whole rack is gone, not for restoring a VM I fat-fingered on a Tuesday. For everything else, the local NAS copy is right there and fast.&lt;/p&gt;
&lt;p&gt;And then there's the dumbest copy of the lot : an external HDD on my desk that I plug in and sync by hand every now and then. No script, no schedule, I just remember to do it (most of the time I don't). The funny part is that a disk sitting unplugged on a shelf is the one thing ransomware physically can't reach, so my laziest backup somehow ended up being my most ransomware-proof one.
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;It looks like this :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   [ VMs ] ──► [ PBS ] ──► [ TrueNAS ]   (local, fast)
                       │
                       └──► [ S3 bucket ]   (offsite, encrypted)
                       └──► [ JBOD ]   (on my desk, encrypted)&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;u&gt;Part 4 - The VM tour&lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;Right, the part you actually clicked for.&lt;/p&gt;
&lt;p&gt;At the time of writing I've got about &lt;strong&gt;40 VMs&lt;/strong&gt; and &lt;strong&gt;1 golden debian13 template&lt;/strong&gt; (the famous LVM-having Debian template, yes, the one I had to &lt;a href="#"&gt;fix after years of regret&lt;/a&gt;). I'll walk them zone by zone, because that's how I think about them.&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;VPN zone&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;This is my &lt;strong&gt;Tailscale&lt;/strong&gt; corner, and it's a little more elaborate than "install Tailscale, done".&lt;/p&gt;
&lt;p&gt;First, &lt;strong&gt;2 Tailscale signing nodes&lt;/strong&gt;. The point of these is &lt;em&gt;independence&lt;/em&gt; : by running my own signing nodes, node signing happens on infrastructure I own instead of relying fully on Tailscale's control plane for that trust decision. I use the service, but I hold some of my own keys.&lt;/p&gt;
&lt;p&gt;Then &lt;strong&gt;4 Tailscale instances&lt;/strong&gt;, each with a deliberately different job :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Full tunnel&lt;/strong&gt; : routes &lt;em&gt;all&lt;/em&gt; traffic, hands out DNS. The "I want everything to go home" exit node.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restricted&lt;/strong&gt; : routes a limited set of subnets, &lt;strong&gt;no DNS&lt;/strong&gt;. For when I want access to &lt;em&gt;some&lt;/em&gt; of the lab without my whole device's traffic and name resolution going through it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Family&lt;/strong&gt; : for the household, and its egress is deliberately pushed &lt;strong&gt;through the DMZ&lt;/strong&gt;. The family gets connectivity without getting a door into the trusted internals but still got an ad-less network with better security.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VPS entry&lt;/strong&gt; : this is how my external VPS reaches &lt;em&gt;into&lt;/em&gt; the homelab and exposes services to the internet. The bridge from the outside world to the inside, on my terms only.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Four instances sounds like overkill, but each one is a different trust posture, and keeping them as separate nodes means I never have to stop and ask "wait, which policy is this connection under".&lt;/p&gt;
&lt;h3&gt;&lt;u&gt;Admin zone&lt;/u&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Win11 VM&lt;/strong&gt; : the management workstation. Sometimes you just need a Windows box with the right tools and a real browser to administer something that hates being administered from a terminal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SSH bastion&lt;/strong&gt; : the management workstation but shipped with Linux. It's like the CLI bastion where the win11 box is the click bastion.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;Backup zone&lt;/u&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Proxmox Backup Server (virtualized)&lt;/strong&gt;, with its datastore pointed at the &lt;strong&gt;Truenas TerraMaster box&lt;/strong&gt;. This is the "3 AM peace of mind" machine. ZFS, Deduplicated, incremental backups of the whole VM fleet, living on storage that is &lt;em&gt;not&lt;/em&gt; the Ceph cluster, so a catastrophic cluster event doesn't take the backups with it. The backup VLAN is its own segment for exactly this reason : backups should be reachable for backing up and basically nothing else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;Production zone&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;This is where most of the actual &lt;em&gt;stuff&lt;/em&gt; lives. It's a lot, so let me group it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The data backbone&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;pgs01 / pgs02&lt;/strong&gt; : a PostgreSQL &lt;strong&gt;master/replica&lt;/strong&gt; pair. A surprising number of the services below point at this pair instead of running their own throwaway database. One good, replicated Postgres beats a dozen scattered SQLite files hidden inside containers.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[pgs01]
root@pgs01:~# sudo -u postgres psql -p 5432 -c "SELECT slot_name, slot_type, active FROM pg_replication_slots;"
 slot_name | slot_type | active
-----------+-----------+--------
 replica_1 | physical  | t
(1 row)

root@pgs01:~# sudo -u postgres psql -p 5432 -c "SELECT usename, client_addr, state, sent_lsn, replay_lsn FROM pg_stat_replication;"
  usename  | client_addr  |  state  |  sent_lsn  | replay_lsn
-----------+--------------+---------+------------+------------
 replicata | pgs02 | catchup | 0/F3060000 | 0/F3AD34F8
(1 row)

[pgs02]
root@pgs02:~# sudo -u postgres psql -p 5432 -c "SELECT pg_is_in_recovery();"
 pg_is_in_recovery
-------------------
 t
(1 row)

root@pgs02:~# sudo -u postgres psql -p 5432 -c "SELECT status, sender_host, slot_name, written_lsn, flushed_lsn, latest_end_lsn, last_msg_receipt_time FROM pg_stat_wal_receiver;"
  status   | sender_host  | slot_name | written_lsn | flushed_lsn | latest_end_lsn |     last_msg_receipt_time
-----------+--------------+-----------+-------------+-------------+----------------+-------------------------------
 streaming | pgs01 | replica_1 |             | 0/F3AD34F8  | 0/F6EC9EF8     | 2026-05-30 03:49:11.642677+02
(1 row)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Identity &amp;amp; access&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SSO VM&lt;/strong&gt; : running &lt;strong&gt;Pocket-ID&lt;/strong&gt; for &lt;strong&gt;passkey-based SSO&lt;/strong&gt; across the entire homelab. One identity, passkeys, everything behind it, less password and attack surface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guacamole VM&lt;/strong&gt; : clientless web RDP, used to reach the Windows machines sitting over in the DMZ without exposing RDP directly and easier Windows management.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Reverse proxy &amp;amp; docs&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Nginx VM&lt;/strong&gt; : running &lt;strong&gt;Nginx Proxy Manager (NPM)&lt;/strong&gt;, pointed at the pgs pair. Combined to my dns, this is what turns my pile of &lt;code&gt;host:port&lt;/code&gt; services into clean &lt;code&gt;something.hlb1.lan&lt;/code&gt; URLs with Let's Encrypt certs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gitea VM&lt;/strong&gt; : installed from binaries, also backed by pgs. It mostly hosts my &lt;strong&gt;Ansible playbooks&lt;/strong&gt; and every &lt;code&gt;docker-compose.yml&lt;/code&gt; in the lab, each on its own branch. My infrastructure's source of truth.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wiki.js&lt;/strong&gt; : also backed by pgs, running on docker, internal documentation, because future-me has the memory of a goldfish and deserves to be written to.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Automation&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Semaphore VM&lt;/strong&gt; : installed from binaries, pgs-backed. The web UI and scheduler in front of all those Ansible playbooks from Gitea. This is how config actually gets pushed out across the fleet (and why the firewall has those scoped management exceptions into other zones). I have a few dedicated categories for my homelab such as :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;apt&lt;/em&gt; : this is what allows my entire homelab to stay up to date and modify some apt sources directory. It also runs an &lt;code&gt;apt update&lt;/code&gt;  playbook every day at 7am.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;security&lt;/em&gt; : this is where I write my CVE patch for like dirtyfrag or copyfail.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;utilities, ntp, snmpd&lt;/em&gt; : this is where the lazy IT guy shows up with its playbooks like deploy the snmpd con ; update a file ; check the linux version or the disk usage&lt;/li&gt;
&lt;li&gt;&lt;em&gt;ssh&lt;/em&gt; : this is where the ssh guidelines are applied with upmost respect and dedication.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-tabs"&gt;[apt]
ansible@bastion:~/semaphore/apt$ ls
apt_add_package.yml  apt_full_upgrade.yml    apt_update.yml   conf               set_no_apt_cache.yml
apt_del_package.yml  apt_update_sources.yml  apt_upgrade.yml  set_apt_cache.yml
[security]
ansible@bastion:~/semaphore/security$ ls
cis_harden.yml  cis_vars.yml  copyfail-and-dirtyfrag.yml  requirements.yml
[utilities]
ansible@bastion:~/semaphore/utilities$ ls
deploy_k8s.yml    disk_space.yml  linstor_pve_cluster.yml  nuke_cluster.yml  rsyslog.yml     update_initramfs.yml
disable_ipv6.yml  enable_brr.yml  linux_version.yml        resolv.conf       update_dns.yml  update_portainer_agent.yml
[ntp]
ansible@bastion:~/semaphore/ntp$ ls
check_ntpsec_status.yml  ntp.conf  ntp-migration.yml  ntpsec_update_conf.yml
[snmpd]
ansible@bastion:~/semaphore/snpmd$ ls
observium_deploy.yml  snmpd.conf
[ssh]
ansible@bastion:~/semaphore/ssh$ ls
check_authorized_keys.yml  conf  remove_ssh_key.yml  ssh.yml&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Monitoring &amp;amp; security - the graphs we all secretly love&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monitoring VM&lt;/strong&gt; : &lt;strong&gt;Grafana&lt;/strong&gt; (pointed at pgs01/02), &lt;strong&gt;Prometheus&lt;/strong&gt;, and &lt;strong&gt;InfluxDB&lt;/strong&gt;. The dashboards. The Graphics diseases hit me strong.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-carousel"&gt;![](https://blog.interlope.xyz/bl-content/uploads/pages/8665d7e1f603526a0f1317a94f48035f/pivoine-png.png)
![](https://blog.interlope.xyz/bl-content/uploads/pages/8665d7e1f603526a0f1317a94f48035f/petunia-png.png)
![](https://blog.interlope.xyz/bl-content/uploads/pages/8665d7e1f603526a0f1317a94f48035f/dalia-png.png)&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Observium&lt;/strong&gt; : network-side monitoring, keeping an eye on the gear.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wazuh&lt;/strong&gt; : a full &lt;strong&gt;Wazuh&lt;/strong&gt; deployment with &lt;strong&gt;agents across the entire homelab&lt;/strong&gt;. Log collection, file-integrity monitoring, intrusion detection on the endpoints themselves. After &lt;a href="https://blog.interlope.xyz/should-i-really-trust-my-binaries-rootkit-hunting-with-rkhunter"&gt;going down the rabbit hole&lt;/a&gt; on why you can never truly trust a compromised machine, having centralized eyes on every box is less paranoia and more &lt;em&gt;therapy&lt;/em&gt;. Even though I never actually look at all those logs...&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;uptime-kuma&lt;/strong&gt; : the simple, beautiful "is it up ? is it green ?" board.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gotify&lt;/strong&gt; : push notifications, so the lab can yell at me. I kinda like when it yells at me, gotta admit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The "useful to actual humans" services&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Immich&lt;/strong&gt; : via docker, self-hosted photos. Google Photos, but mine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nextcloud AIO&lt;/strong&gt; : also via docker, mostly files, the personal-cloud staple.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;media stack VM&lt;/strong&gt; : docker again guys ? Docker-based, &lt;strong&gt;Jellyfin&lt;/strong&gt; and friends. Movie night, self-hosted.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Portainer VM&lt;/strong&gt; : a Docker host managed through Portainer that also runs a grab-bag of smaller tools : &lt;strong&gt;BentoPDF&lt;/strong&gt;, a &lt;strong&gt;dev instance of this very blog&lt;/strong&gt;, &lt;strong&gt;Homebox&lt;/strong&gt;, &lt;strong&gt;PairDrop&lt;/strong&gt; (AirDrop for everyone), and &lt;strong&gt;Vaultwarden&lt;/strong&gt; for secrets and passwords.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Lab-of-the-lab&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GNS3 (gns03)&lt;/strong&gt; : a network emulation sandbox for testing topologies and grinding through certifications without touching the real gear.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ntp01 / ntp02&lt;/strong&gt; : the production time source the trusted zones lean on. Two of them, because time is the one thing you really don't want a single point of failure on (ask anyone who's debugged a cluster with drifting clocks).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;DMZ zone&lt;/u&gt;&lt;/h3&gt;
&lt;p&gt;The sealed-off zone, with its own self-sufficient basics :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pi-hole DNS&lt;/strong&gt; : dedicated DMZ resolver, completely separate from the production one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NTP/DNS box&lt;/strong&gt; : the DMZ's own time and name services, so it never reaches back into prod.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A few Windows VMs&lt;/strong&gt; : idle-game boxes and similar low-trust throwaways. The kind of thing you specifically &lt;em&gt;don't&lt;/em&gt; want on your trusted network, which is what a DMZ is for. (These are the ones Guacamole reaches over to.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;IOT zone&lt;/u&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Home Assistant OS (HAOS)&lt;/strong&gt; : the whole smart-home brain, deliberately corralled on the IoT VLAN. IoT devices are not exactly famous for their security, so they get their own segment and HAOS sits in there with them rather than letting them anywhere near the good stuff.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;u&gt;LAB zone &lt;/u&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Kubernetes cluster&lt;/strong&gt; : 1 control-plane node + 3 workers. My IaC and deployment playground. Somewhere to throw manifests, break things, test GitOps flows, and generally make a mess that doesn't touch anything load-bearing and did I already said break things ? Every homelab needs a corner where breaking things is the &lt;em&gt;point&lt;/em&gt;.
&lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;u&gt;Putting it all together&lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;So here's the whole organism, zoomed all the way out :&lt;/p&gt;
&lt;p&gt;Three flowers, one garden, a 10G spine for storage, a self-healing 1G fabric for the cluster's heartbeat, a zone-based firewall keeping everything in its lane, and a small city of VMs doing everything from serving my photos to catching bots to running my house.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;If you've made it this far : thanks, and also, get a hobby (he says, having just written a small novel about his own).&lt;/p&gt;
&lt;p&gt;None of this happened in a weekend. It's the result of a lot of late nights, a few cursed subnets, one entire storage stack I built and then retired, and a rack that's been full since roughly the day I bought it. Bits of it are over-engineered. Bits of it are held together with &lt;code&gt;post-up&lt;/code&gt; and prayer. The bastion is on the wrong VLAN. And every one of those rough edges is something I learned by breaking first.&lt;/p&gt;
&lt;p&gt;That, to me, is what a production-ready homelab really is. Not a perfect, finished, reference-grade datacenter, but a living thing you keep poking at because poking at it is fun. The day it's "done" is the day it gets boring, and then I'll just buy another switch I don't have room for and start again.&lt;/p&gt;
&lt;p&gt;Thanks for reading me,&lt;/p&gt;
&lt;p&gt;spleenftw&lt;/p&gt;</description>
      <pubDate>Sat, 30 May 2026 01:13:18 +0200</pubDate>
      <guid isPermaLink="false">8665d7e1f603526a0f1317a94f48035f</guid>
    </item>
    <item>
      <title>About me</title>
      <link>https://blog.interlope.xyz/about-me</link>
      <image/>
      <description>&lt;p&gt;Hello there, spleenftw here, french Netops. 
I kinda like Linux so you'll find plenty of articles  about Linux, Network and Security.&lt;/p&gt;
&lt;p&gt;I hope you enjoy your stay, I try to make my articles as readable and fun as possible. &lt;/p&gt;
&lt;p&gt;You can contact me there : &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;via Twitter/X : &lt;a href="https://x.com/spleenftw"&gt;https://x.com/spleenftw&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;via mail : contact@interlope.xyz&lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>Mon, 12 Jan 2026 17:03:56 +0100</pubDate>
      <guid isPermaLink="false">89b6d8740139748ace7826c72c3bfa31</guid>
    </item>
    <item>
      <title>Do you want some honey ? Because bots do.</title>
      <link>https://blog.interlope.xyz/nginx-honeypot-bot-trap</link>
      <image/>
      <description>&lt;h2&gt;Spreading honey on the web&lt;/h2&gt;
&lt;p&gt;I recently got a brand new serv... VPS to play with. I sadly can't rack a new server in, it is FULL AS F. (24U not enough tho but it came home for free so...)&lt;/p&gt;
&lt;p&gt;I wanted for quite some time install a honeypot somewhere (at home or on a VPS) to see what a sole machine could face. 
So here I am, playing with this big boy (which in reality is quite small, but I'm not that filthy rich yet) :&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6&lt;/strong&gt; cores, &lt;strong&gt;12GB&lt;/strong&gt; RAM, &lt;strong&gt;100GB&lt;/strong&gt; SSD and an &lt;strong&gt;unlimited 1GB&lt;/strong&gt; connection. &lt;em&gt;boom&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I feel like it's so powerfull I could probably run Crysis 3 at 4 fps average.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;=&amp;gt; coming from the guy having like a 40 cores 220GB RAM NVME SDS storage over 10G DAC cluster&lt;/i&gt; but whatever, let's have some fun and putting some honey on the web.
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;&lt;u&gt; What is a honey-pot, how does it work and why would you even do that, like, wtf ? &lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;So, according to the internet and most likely &lt;a href="https://en.wikipedia.org/wiki/Honeypot_(computing)"&gt;wikipedia&lt;/a&gt; : &lt;/p&gt;
&lt;p&gt;&lt;code&gt; In computer terminology, a honeypot is a computer security mechanism set to detect, deflect, or, in some manner, counteract attempts at unauthorized use of information systems. Generally, a honeypot consists of data (for example, in a network site) that appears to be a legitimate part of the site which contains information or resources of value to attackers. It is actually isolated, monitored, and capable of blocking or analyzing the attackers. This is similar to police sting operations, colloquially known as "baiting" a suspect. &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To put it in my own words, it's simply a trap. The metaphor of spreading honey to catch bears : you fake a system vulnerability or open ports and wait for bad guys/bots to show up and spam your fake vulnerability. &lt;/p&gt;
&lt;p&gt;Now as the reasons why you would do that, I can think of 3 :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It's &lt;em&gt;fun&lt;/em&gt;. Trapping bots and see them trying to run some commands or whatsoever.&lt;/li&gt;
&lt;li&gt;It's &lt;em&gt;still fun&lt;/em&gt;, but you can do it for research reasons. What are the bots trying nowadays, which CVE are they trying, which users!passwords are they using, where do they come from (country / AS speaking) and doing stats about those logs.&lt;/li&gt;
&lt;li&gt;Which leads to the &lt;em&gt;most fun&lt;/em&gt; part of it : &lt;strong&gt;graphs&lt;/strong&gt;. We &lt;strong&gt;love graphs&lt;/strong&gt;, some probably jerk off to them. Do not start pointing fingers, we're all grown adults here.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;u&gt; The cow that likes honey &lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;I'll speak about the one I knew before starting this project : &lt;a href="https://github.com/cowrie/cowrie"&gt;cowrie&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is probably one of the most well-known honeypots, which is used for ssh/telnet connection. 
Simply load it up via docker, and redirect your port 22/tcp to your cowrie host port 2222, you'll start to see things moving.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker run -p 2222:2222 cowrie/cowrie:latest&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;interlope@guinea-pig:~$ ssh heyyoutube@10.100.40.222 -p 2222
The authenticity of host '[10.100.40.222]:2222 ([10.100.40.222]:2222)' can't be established.
ED25519 key fingerprint is SHA256:MmxFN18Ua65KIc7ls2GXAxkQ0oHKNKpoeQ/tBVO5GOc.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[10.100.40.222]:2222' (ED25519) to the list of known hosts.
heyyoutube@10.100.40.222's password:
Permission denied, please try again.&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;interlope@cowrie:~$ docker run -p 2222:2222 cowrie/cowrie:latest
/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/transport.py:110: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.
  b"3des-cbc": (algorithms.TripleDES, 24, modes.CBC),
/cowrie/cowrie-env/lib/python3.11/site-packages/twisted/conch/ssh/transport.py:117: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.
  b"3des-ctr": (algorithms.TripleDES, 24, modes.CTR),
2026-01-08T20:40:59+0000 [-] Reading configuration from ['/cowrie/cowrie-git/etc/cowrie.cfg.dist']
2026-01-08T20:41:00+0000 [-] Python Version 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]
2026-01-08T20:41:00+0000 [-] Twisted Version 25.5.0
2026-01-08T20:41:00+0000 [-] Cowrie Version 2.9.6.dev6+ge73958d3e
2026-01-08T20:41:00+0000 [-] Sensor UUID: 850f16f4-ec9f-11f0-8012-b2c7425c1004
2026-01-08T20:41:00+0000 [-] Loaded output engine: jsonlog
2026-01-08T20:41:00+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 25.5.0 (/cowrie/cowrie-env/bin/python3 3.11.2) starting up.
2026-01-08T20:41:00+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
2026-01-08T20:41:00+0000 [-] CowrieSSHFactory starting on 2222
2026-01-08T20:41:00+0000 [cowrie.ssh.factory.CowrieSSHFactory#info] Starting factory &amp;lt;cowrie.ssh.factory.CowrieSSHFactory object at 0x7fcd3108fcd0&amp;gt;
2026-01-08T20:41:00+0000 [-] Ready to accept SSH connections
2026-01-08T20:41:01+0000 [cowrie.ssh.factory.CowrieSSHFactory] No moduli, no diffie-hellman-group-exchange-sha1
2026-01-08T20:41:01+0000 [cowrie.ssh.factory.CowrieSSHFactory] No moduli, no diffie-hellman-group-exchange-sha256
2026-01-08T20:41:01+0000 [cowrie.ssh.factory.CowrieSSHFactory] New connection: 10.100.20.23:60226 (172.17.0.2:2222) [session: 7c60efd23782]
2026-01-08T20:41:01+0000 [HoneyPotSSHTransport,0,10.100.20.23] Remote SSH version: SSH-2.0-OpenSSH_10.0p2 Debian-7
2026-01-08T20:41:01+0000 [HoneyPotSSHTransport,0,10.100.20.23] SSH client hassh fingerprint: eeca2460550b9ded084ecf2f70a75356
2026-01-08T20:41:01+0000 [cowrie.ssh.transport.HoneyPotSSHTransport#debug] kex alg=b'curve25519-sha256' key alg=b'ssh-ed25519'
2026-01-08T20:41:01+0000 [cowrie.ssh.transport.HoneyPotSSHTransport#debug] outgoing: b'aes128-ctr' b'hmac-sha2-256' b'none'
2026-01-08T20:41:01+0000 [cowrie.ssh.transport.HoneyPotSSHTransport#debug] incoming: b'aes128-ctr' b'hmac-sha2-256' b'none'
2026-01-08T20:41:02+0000 [cowrie.ssh.transport.HoneyPotSSHTransport#debug] NEW KEYS
2026-01-08T20:41:02+0000 [cowrie.ssh.transport.HoneyPotSSHTransport#debug] starting service b'ssh-userauth'
2026-01-08T20:41:02+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] b'heyyoutube' trying auth b'none'
2026-01-08T20:41:02+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] b'heyyoutube' trying auth b'publickey'
2026-01-08T20:41:02+0000 [HoneyPotSSHTransport,0,10.100.20.23] public key attempt for user b'heyyoutube' of type b'ssh-ed25519' with fingerprint a5:81:35:3f:30:21:7e:12:81:b8:c6:b2:5c:b1:b5:68
2026-01-08T20:41:02+0000 [HoneyPotSSHTransport,0,10.100.20.23] public key login attempt for [b'heyyoutube'] failed
2026-01-08T20:41:02+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] b'heyyoutube' failed auth b'publickey'
2026-01-08T20:41:02+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] reason: ('Incorrect signature', None)
2026-01-08T20:41:06+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] b'heyyoutube' trying auth b'password'
2026-01-08T20:41:06+0000 [HoneyPotSSHTransport,0,10.100.20.23] Could not read etc/userdb.txt, default database activated
2026-01-08T20:41:06+0000 [HoneyPotSSHTransport,0,10.100.20.23] login attempt [b'heyyoutube'/b'hey'] failed
2026-01-08T20:41:07+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] b'heyyoutube' failed auth b'password'
2026-01-08T20:41:07+0000 [cowrie.ssh.userauth.HoneyPotSSHUserAuthServer#debug] unauthorized login: ()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can see here that I tried to ssh into the machine with heyyoutube/hey and it logged it. This is nice, but we can push it.
Let's say we could create an entire fake filesystem where any password works and so we could trap the bots into a fake shell and see what they are trying to do ?&lt;/p&gt;
&lt;p&gt;Create the folders where we will store the logs :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;mkdir -p data/cowrie/{downloads,keys,log/tty}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create the cowrie config to trap our bots :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;cat &amp;gt; data/cowrie/keys/cowrie.cfg &amp;lt;&amp;lt;'EOF'
[honeypot]
hostname = srv04
log_path = log
download_path = dl

[ssh]
enabled = true
listen_endpoints = tcp:22:interface=0.0.0.0

[telnet]
enabled = true
listen_endpoints = tcp:23:interface=0.0.0.0

[output_jsonlog]
logfile = log/cowrie.json
EOF&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Last configuration step, create the file that will accept whatever user!password combinaison :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;cat &amp;gt; data/cowrie/keys/userdb.txt &amp;lt;&amp;lt;'EOF'
*:x:*
EOF&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create the docker-compose file :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-yml"&gt;services:
  cowrie:
    container_name: cowrie
    image: ghcr.io/telekom-security/cowrie:24.04.1
    restart: always
    tmpfs:
      - /tmp/cowrie:uid=2000,gid=2000
      - /tmp/cowrie/data:uid=2000,gid=2000
    ports:
      - "2222:22"
      - "2223:23"
    read_only: true
    volumes:
      - ./data/cowrie/downloads:/home/cowrie/cowrie/dl
      - ./data/cowrie/keys:/home/cowrie/cowrie/etc
      - ./data/cowrie/log:/home/cowrie/cowrie/log
      - ./data/cowrie/log/tty:/home/cowrie/cowrie/log/tty
    networks:
      - cowrie_net

networks:
  cowrie_net:
    driver: bridge&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fire it up :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ docker-compose up -d
[+] Running 1/0
 ✔ Container cowrie  Running                                                                               0.0s&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Results :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;interlope@guinea-pig:~$ ssh heyyoutube@10.100.40.222 -p 2222

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
heyyoutube@ubuntu:~$ whoami
heyyoutube
heyyoutube@ubuntu:~$ touch test
heyyoutube@ubuntu:~$ ls
test
heyyoutube@ubuntu:~$ cat test
heyyoutube@ubuntu:~$ exit
Connection to 10.100.40.222 closed.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There's a real filesystem, that allow us to create a file, read it, whatsoever. &lt;/p&gt;
&lt;p&gt;On the cowrie side, this is what we see : a BIG bunch of json. And do you knows what json means ? &lt;/p&gt;
&lt;p&gt;&lt;u&gt;It means it is time for &lt;strong&gt;JQ&lt;/strong&gt; : &lt;/u&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do you want to see the logins attemps ? BIM&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ cat data/cowrie/log/cowrie.json | jq 'select(.eventid == "cowrie.login.success")'
{
  "eventid": "cowrie.login.success",
  "username": "heyyoutube",
  "fingerprint": "a5:81:35:3f:30:21:7e:12:81:b8:c6:b2:5c:b1:b5:68",
  "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFfQgC3QqH4FZK56WbON+xsuG6wSWK23J7oQ3v2muB/",
  "type": "ssh-ed25519",
  "message": "public key login attempt for [heyyoutube] succeeded",
  "sensor": "ac946bf9fc91",
  "timestamp": "2026-01-08T21:04:27.250111Z",
  "src_ip": "10.100.20.23",
  "session": "b00737ac199d"
}
{
  "eventid": "cowrie.login.success",
  "username": "heyyoutube",
  "fingerprint": "a5:81:35:3f:30:21:7e:12:81:b8:c6:b2:5c:b1:b5:68",
  "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKFfQgC3QqH4FZK56WbON+xsuG6wSWK23J7oQ3v2muB/",
  "type": "ssh-ed25519",
  "message": "public key login attempt for [heyyoutube] succeeded",
  "sensor": "ac946bf9fc91",
  "timestamp": "2026-01-08T21:04:56.856681Z",
  "src_ip": "10.100.20.23",
  "session": "a0093071b009"
}&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Do you want to see the commands used ? BAM&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ cat data/cowrie/log/cowrie.json | jq -r 'select(.eventid == "cowrie.command.input") | .timestamp + " | " + .input'
2026-01-08T21:04:31.103868Z | exit
2026-01-08T21:05:00.038135Z | whoami
2026-01-08T21:05:02.410770Z | touch test
2026-01-08T21:05:02.783707Z | ls
2026-01-08T21:05:03.777663Z | cat test
2026-01-08T21:05:05.661542Z | exit&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Do you want to see the source IP ? BOUM&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ cat data/cowrie/log/cowrie.json | jq -r '.src_ip' | sort | uniq -c | sort -rn
     30 10.100.20.23&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Do you want to see the usernames used  ? BOUMv2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ cat data/cowrie/log/cowrie.json | jq -r 'select(.username) | .username' | sort | uniq
heyyoutube&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But I am not satisfied with only this much, i want MORE. Lets print the entire ssh session :&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;interlope@cowrie:~$ cat data/cowrie/log/cowrie.json  | jq -r '[.timestamp, .eventid, .message // .input // ""] | @tsv' | column -t -s $'\t'
2026-01-08T21:04:56.846202Z  cowrie.session.connect     New connection: 10.100.20.23:33208 (172.20.0.2:22) [session: a0093071b009]
2026-01-08T21:04:56.846761Z  cowrie.client.version      Remote SSH version: SSH-2.0-OpenSSH_10.0p2 Debian-7
2026-01-08T21:04:56.848828Z  cowrie.client.kex          SSH client hassh fingerprint: eeca2460550b9ded084ecf2f70a75356
2026-01-08T21:04:56.856197Z  cowrie.client.fingerprint  public key attempt for user heyyoutube of type ssh-ed25519 with fingerprint a5:81:35:3f:30:21:7e:12:81:b8:c6:b2:5c:b1:b5:68
2026-01-08T21:04:56.856681Z  cowrie.login.success       public key login attempt for [heyyoutube] succeeded
2026-01-08T21:04:56.877192Z  cowrie.client.size         Terminal Size: 112 42
2026-01-08T21:04:56.877691Z  cowrie.client.var          request_env: LANG=en_US.UTF-8
2026-01-08T21:05:00.038135Z  cowrie.command.input       CMD: whoami
2026-01-08T21:05:02.410770Z  cowrie.command.input       CMD: touch test
2026-01-08T21:05:02.783707Z  cowrie.command.input       CMD: ls
2026-01-08T21:05:03.777663Z  cowrie.command.input       CMD: cat test
2026-01-08T21:05:05.661542Z  cowrie.command.input       CMD: exit
2026-01-08T21:05:05.662835Z  cowrie.log.closed          Closing TTY Log: log/tty/761cb3fdd2a24fa4db91c4fbdad1b15de7959a937e51f3bac02fd7df8225567e after 8.8 seconds
2026-01-08T21:05:05.664262Z  cowrie.session.closed      Connection lost after 8.8 seconds&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Anyway, that's all for this playground, let's spice things up.&lt;/p&gt;
&lt;h2&gt;&lt;u&gt; Tpotce &lt;/u&gt;&lt;/h2&gt;
&lt;p&gt;Everything we've done so far leads up to what we could call : a &lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg_machine"&gt;Rube Goldberg machine&lt;/a&gt; AKA &lt;a href="https://github.com/telekom-security/tpotce"&gt;tpotce&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;According to their github page, T-Pot is the all in one, optionally distributed, multiarch (amd64, arm64) honeypot platform, supporting 20+ honeypots and countless visualization options using the Elastic Stack, animated live attack maps and lots of security tools to further improve the deception experience.&lt;/p&gt;
&lt;p&gt;It features 39 dockers running with, according to my own maths : 35. freakings 35 honeypots (including cowrie).
It can be installed via  a sole linux command :&lt;br /&gt;
&lt;code&gt;env bash -c "$(curl -sL https://github.com/telekom-security/tpotce/raw/master/install.sh)"&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS : you will probably need to stop the exim4 service (mail) that uses the port 25/tcp for everything to work flawlessly.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Did i say &lt;strong&gt;graphs&lt;/strong&gt; ? There's plenty of graphs. There's even a LIVE ATTACK MAP, which is crazy cool to show off : 
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/a88ed2358cdd4817a2aeaa5c8e7b0462/image.png" alt="Image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;There's an &lt;em&gt;ELK (Elastic, Logstash and Kibana)&lt;/em&gt; stack which already have a lot of dashboards (one per honeypot at least). This one is one of the most basic, it shows a global view of the honeypot logs :&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/a88ed2358cdd4817a2aeaa5c8e7b0462/image-1.png" alt="Image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;But the most important part of this dashboard is at it's end : you can have a word cloud with every user!password used. And the bigger it is, the more it has been used :
&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/a88ed2358cdd4817a2aeaa5c8e7b0462/image-2.png" alt="Image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
There is also a nice Suricata dashboard, which features the HTTP Content, the User Agent and HTTP Method :&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.interlope.xyz/bl-content/uploads/pages/a88ed2358cdd4817a2aeaa5c8e7b0462/image-3.png" alt="Image description" /&gt;&lt;/p&gt;
&lt;p&gt;This is everything for today, this article will be updated in a month or so, to get more metrics.&lt;/p&gt;
&lt;p&gt;Thanks for reading me,&lt;/p&gt;
&lt;p&gt;spleenftw&lt;/p&gt;</description>
      <pubDate>Thu, 08 Jan 2026 20:50:39 +0100</pubDate>
      <guid isPermaLink="false">a88ed2358cdd4817a2aeaa5c8e7b0462</guid>
    </item>
  </channel>
</rss>
