<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Infra on danbat.es</title><link>https://danbat.es/categories/infra/</link><description>Recent content in Infra on danbat.es</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 13 Jan 2026 19:39:00 +0000</lastBuildDate><atom:link href="https://danbat.es/categories/infra/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting into Self-Hosting: Infrastructure</title><link>https://danbat.es/posts/self-hosting-infrastructure/</link><pubDate>Tue, 13 Jan 2026 19:39:00 +0000</pubDate><guid>https://danbat.es/posts/self-hosting-infrastructure/</guid><description>&lt;p>&lt;a href="https://danbat.es/posts/self-hosting-intro/">So I&amp;rsquo;ve got my photos and music syncing and streaming&lt;/a>, but there are a holes to patch before I can actually rely on these services:&lt;/p>
&lt;ul>
&lt;li>How safe is my data now? Not very, it&amp;rsquo;ll be safer with &lt;strong>Regular Backups&lt;/strong>&lt;/li>
&lt;li>How do I access my services when I&amp;rsquo;m not on the local network? I don&amp;rsquo;t - &lt;strong>A VPN&lt;/strong> would help.&lt;/li>
&lt;li>The first time I know a service is down is when I need to use it and can&amp;rsquo;t. &lt;strong>Container &amp;amp; connectivity monitoring&lt;/strong>&lt;/li>
&lt;li>And how will I know if I&amp;rsquo;m over-extending my little N150? &lt;strong>Real-time system resource monitoring&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>It&amp;rsquo;s time for some Infra!&lt;/p></description><content>&lt;p>&lt;a href="https://danbat.es/posts/self-hosting-intro/">So I&amp;rsquo;ve got my photos and music syncing and streaming&lt;/a>, but there are a holes to patch before I can actually rely on these services:&lt;/p>
&lt;ul>
&lt;li>How safe is my data now? Not very, it&amp;rsquo;ll be safer with &lt;strong>Regular Backups&lt;/strong>&lt;/li>
&lt;li>How do I access my services when I&amp;rsquo;m not on the local network? I don&amp;rsquo;t - &lt;strong>A VPN&lt;/strong> would help.&lt;/li>
&lt;li>The first time I know a service is down is when I need to use it and can&amp;rsquo;t. &lt;strong>Container &amp;amp; connectivity monitoring&lt;/strong>&lt;/li>
&lt;li>And how will I know if I&amp;rsquo;m over-extending my little N150? &lt;strong>Real-time system resource monitoring&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>It&amp;rsquo;s time for some Infra!&lt;/p>
&lt;h1 id="backups">Backups&lt;/h1>
&lt;p>I&amp;rsquo;m running a daily backup of everything on my server that&amp;rsquo;s annoying, difficult or impossible to replace via &lt;a href="https://duplicati.com/">Duplicati&lt;/a> over SSH to a &lt;a href="https://www.hetzner.com/storage/storage-box/bx11/">1TB Hetzner Storage Box&lt;/a>&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>.&lt;/p>
&lt;p>With this I don&amp;rsquo;t have to think about manual backups, nor automated ones since I have duplicati &lt;a href="https://docs.duplicati.com/detailed-descriptions/sending-reports-via-email/sending-reports-with-email">alert me with an email for backup failures&lt;/a>. Everything I&amp;rsquo;ve added or modified in the day will be backed up overnight, and if it isn&amp;rsquo;t, I&amp;rsquo;ll get a report in my inbox.&lt;/p>
&lt;h1 id="vpn-access">VPN Access&lt;/h1>
&lt;p>It&amp;rsquo;s been pretty unanimously agreed that a VPN is the safest way to access self-hosted services out and about. This is where my FOSS philosophy falls apart a bit as &lt;a href="https://tailscale.com/">Tailscale&lt;/a> is just an insanely easy to use freemium option. Being free for up to 3 users and 100 devices, and plenty of client support, it&amp;rsquo;s a no-brainer, at least until I commit to rolling my own Wireguard.&lt;/p>
&lt;h2 id="tls-certificates">TLS Certificates&lt;/h2>
&lt;p>Tailscale makes it easy to connect to my services, but the experience of accessing them still feels a bit second-rate because they&amp;rsquo;re all on HTTP, requiring an exception to be set in the browser the first time they&amp;rsquo;re accessed; as well as being on forgettable port numbers. All in all, having to visit something like &lt;em>192.168.1.123:12345&lt;/em> isn&amp;rsquo;t a great user experience, especially when regularly met with &amp;ldquo;Your connection is insecure&amp;rdquo; messages.&lt;/p>
&lt;p>What&amp;rsquo;ll fix all this is proxy with signed certificates and some nice clean subdomains for each service. I&amp;rsquo;ve found &lt;a href="https://nginxproxymanager.com/">Nginx Proxy Manager&lt;/a> to be of great utility for this. Adding new &amp;lsquo;proxy hosts&amp;rsquo; is a breeze, and it looks after my Let&amp;rsquo;s Encrypt certificate. All I had to do was point the base domain to my server&amp;rsquo;s local IP, and expose my server&amp;rsquo;s subnet to my tailnet (Tailscale&amp;rsquo;s name for a group of devices interconnected on their platform).&lt;/p>
&lt;p>Now I can visit for example &lt;a href="https://immich.mydomain.tld">https://immich.mydomain.tld&lt;/a> with zero friction.&lt;/p>
&lt;h1 id="monitoring">Monitoring&lt;/h1>
&lt;p>But what if any of these important containers crash? I&amp;rsquo;ll know about it since I&amp;rsquo;ve got &lt;a href="https://uptimekuma.org/">Uptime Kuma&lt;/a> monitoring all my containers via docker socket. If any are down for 5 minutes&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup> and fail 3 consecutive 1 minute health checks, I&amp;rsquo;ll get an email about it. This is all shockingly easy to configure in-app.&lt;/p>
&lt;p>What if my broadband goes down? I&amp;rsquo;m monitoring that too. Reachability to both google.com and bbc.co.uk should be a reliable signal as to whether I can connect to the open internet. Further keeping an eye on my ISP, I&amp;rsquo;ve got &lt;a href="https://docs.speedtest-tracker.dev/">Speedtest Tracker&lt;/a> running (hourly on an odd minute) to check what speeds and ping I&amp;rsquo;m actually measurably getting.&lt;/p>
&lt;p>With all these containers, it&amp;rsquo;s nice to have one dashboard where I can actually see what system resources are in use. So far &lt;a href="https://nicolargo.github.io/glances/">Glances&lt;/a> has been a pretty slick one-page app for this.&lt;/p>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>This is somewhat overkill since I&amp;rsquo;m only using about 10% of the total storage, but it&amp;rsquo;s fast and relatively cheap for fast remote storage. I had tried using Backblaze and similar competitors since they have a shockingly low price per terabyte, but I had repeated issues backing up to especially Backblaze due to their connectivity provider. I also wanted to see about finding a reliable and trustworthy european host, and Hetzner has ticked those boxes so far.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>IMHO there&amp;rsquo;s no need to check more often than this, if something stays down that&amp;rsquo;s when I need to care about it. This isn&amp;rsquo;t a commerical application, the main user is me. And I&amp;rsquo;d rather not add more traffic, resource utilisation, and data from my monitoring that I arguably don&amp;rsquo;t need.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></content></item></channel></rss>