<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tailscale on kunat.dev</title>
    <link>https://kunat.dev/tags/tailscale/</link>
    <description>Recent content in Tailscale on kunat.dev</description>
    <generator>Hugo -- 0.147.5</generator>
    <language>en-us</language>
    <copyright>2025 kunat.dev</copyright>
    <lastBuildDate>Mon, 14 Jul 2025 18:34:57 +0200</lastBuildDate>
    <atom:link href="https://kunat.dev/tags/tailscale/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Configuring Tailscale Subnet Routing to Access Docker Containers by LAN IP</title>
      <link>https://kunat.dev/notes/tailscale-subnet-routers/</link>
      <pubDate>Mon, 14 Jul 2025 18:34:57 +0200</pubDate>
      <guid>https://kunat.dev/notes/tailscale-subnet-routers/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been running various Docker containers on my Synology NAS for years, and while Tailscale has been excellent for accessing the NAS itself remotely, I found myself frustrated by one specific limitation: I could &lt;strong&gt;only&lt;/strong&gt; access my Docker containers by their LAN IP addresses when I was actually connected to my home network.&lt;/p&gt;
&lt;p&gt;When I was away from home, even though I could reach my Synology via Tailscale address or Magic DNS, trying to access something like &lt;code&gt;192.168.1.144:7878&lt;/code&gt; for Radarr would just time out.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve been running various Docker containers on my Synology NAS for years, and while Tailscale has been excellent for accessing the NAS itself remotely, I found myself frustrated by one specific limitation: I could <strong>only</strong> access my Docker containers by their LAN IP addresses when I was actually connected to my home network.</p>
<p>When I was away from home, even though I could reach my Synology via Tailscale address or Magic DNS, trying to access something like <code>192.168.1.144:7878</code> for Radarr would just time out.</p>
<p>That&rsquo;s where <a href="https://tailscale.com/kb/1019/subnets" target="_blank" >Tailscale&rsquo;s subnet routers</a> come in. This feature allows you to access all devices on your home network—including your Docker containers—using their actual LAN IP addresses.</p>
<h2 id="what-were-solving">What We&rsquo;re Solving</h2>
<p>We want to access our Docker containers using their LAN IP addresses consistently, regardless of whether we&rsquo;re connected to our home network or accessing remotely through Tailscale.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>Tailscale already set up on your machine. You can use <a href="https://www.youtube.com/watch?v=qulWDpzdY1E" target="_blank" >this guide</a> to set it up.</li>
</ul>
<h2 id="setting-up-subnet-routing">Setting Up Subnet Routing</h2>
<h3 id="step-1-configure-your-synology-as-a-subnet-router">Step 1: Configure Your Synology as a Subnet Router</h3>
<p>First, you&rsquo;ll need to SSH into your Synology. Once you&rsquo;re connected, run this command:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo tailscale up --advertise-routes<span style="color:#f92672">=</span>192.168.1.0/24 --advertise-exit-node --reset
</span></span></code></pre></div><p><strong>Important:</strong> Make sure to replace <code>192.168.1.0/24</code> with the correct subnet for your network. In my case, my Synology has the IP address <code>192.168.1.144</code>, so I use <code>192.168.1.0/24</code>. You can find your network&rsquo;s subnet by checking your router&rsquo;s configuration or running <code>ip route</code> on your Synology.</p>
<h3 id="step-2-enable-subnet-routing-in-tailscale-admin-console">Step 2: Enable Subnet Routing in Tailscale Admin Console</h3>
<p>The command above advertises your local network routes to Tailscale, but you need to explicitly enable them in the admin console:</p>
<ol>
<li>Go to the Tailscale admin console at <a href="https://login.tailscale.com/admin/machines" target="_blank" >https://login.tailscale.com/admin/machines</a></li>
<li>Find your Synology device in the machines list</li>
<li>Click on the device and select &ldquo;Edit route settings&rdquo;</li>
<li>In the &ldquo;Subnet routers&rdquo; section, check the box next to your advertised route (e.g., <code>192.168.1.0/24</code>)</li>
</ol>
<p><img alt="Xcode build timeline" loading="lazy" src="/notes/images/tailscale-subnet-routers/tailscale-subnet-routers.jpg"></p>
<h2 id="testing-your-setup">Testing Your Setup</h2>
<p>With that configuration complete, you should now be able to access all your Docker containers using their LAN IP addresses, regardless of whether you&rsquo;re connected to your home network or not.</p>
<p>For example, if you have a container running on <code>192.168.1.144:7878</code>, you can access it from anywhere by simply navigating to that address in your browser while connected to Tailscale.</p>
<h2 id="taking-it-further-reverse-proxy-setup">Taking It Further: Reverse Proxy Setup</h2>
<p>You can make this setup even more elegant by implementing a reverse proxy. This allows you to access your services using clean subdomains like <code>radarr.kunat.dev</code> instead of remembering IP addresses and port numbers. You can read more about it <a href="/notes/synology-caddy-reverse-proxy/" >here.</a></p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://tailscale.com/kb/1019/subnets" target="_blank" >Tailscale documentation on subnet routers</a></li>
<li><a href="https://www.youtube.com/watch?v=qulWDpzdY1E" target="_blank" >How To Install And Configure Tailscale On Your Synology Nas</a></li>
<li><a href="/notes/synology-caddy-reverse-proxy/" >Setting Up Caddy as a Reverse Proxy on Synology NAS</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Setting Up Caddy as a Reverse Proxy on Synology NAS</title>
      <link>https://kunat.dev/notes/synology-caddy-reverse-proxy/</link>
      <pubDate>Wed, 09 Jul 2025 15:28:57 +0200</pubDate>
      <guid>https://kunat.dev/notes/synology-caddy-reverse-proxy/</guid>
      <description>&lt;p&gt;Setting up a reverse proxy on your Synology NAS can dramatically improve how you access your Docker containers. Instead of remembering ports for each service, you can use clean subdomains like &lt;code&gt;plex.yourdomain.com&lt;/code&gt; or &lt;code&gt;radarr.yourdomain.com&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;whats-caddy&#34;&gt;What&amp;rsquo;s Caddy?&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/caddyserver/caddy&#34; target=&#34;_blank&#34; &gt;Caddy&lt;/a&gt; is a modern, open-source web server that excels at reverse proxying. It&amp;rsquo;s lightweight, easy to configure, and handles HTTPS automatically. What sets it apart is its human-readable configuration format and automatic certificate management capabilities.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Setting up a reverse proxy on your Synology NAS can dramatically improve how you access your Docker containers. Instead of remembering ports for each service, you can use clean subdomains like <code>plex.yourdomain.com</code> or <code>radarr.yourdomain.com</code>.</p>
<h2 id="whats-caddy">What&rsquo;s Caddy?</h2>
<blockquote>
<p><a href="https://github.com/caddyserver/caddy" target="_blank" >Caddy</a> is a modern, open-source web server that excels at reverse proxying. It&rsquo;s lightweight, easy to configure, and handles HTTPS automatically. What sets it apart is its human-readable configuration format and automatic certificate management capabilities.</p></blockquote>
<h2 id="why-i-chose-caddy-over-synologys-built-in-solution">Why I Chose Caddy Over Synology&rsquo;s Built-in Solution</h2>
<p>Synology does include a reverse proxy feature, but it has some limitations:</p>
<p><strong>Platform Agnostic</strong>: Caddy runs in Docker, which means it&rsquo;s not tied to Synology&rsquo;s ecosystem. If I ever migrate to a different NAS or server setup, my configuration comes with me.</p>
<p><strong>File-Based Configuration</strong>: This is the big one for me. Synology&rsquo;s reverse proxy requires you to configure each service through their GUI interface. When you&rsquo;re running more than a few containers, this becomes time-consuming. With Caddy, I can define all my services in a single configuration file that&rsquo;s easy to version control and backup.</p>
<p><strong>Better HTTPS Handling</strong>: Caddy&rsquo;s automatic HTTPS capabilities are far superior to what Synology offers out of the box. We won&rsquo;t use those, but I listed it for completeness&rsquo; sake.</p>
<h2 id="goals">Goals</h2>
<p>Access your Docker containers using clean subdomains instead of remembering port numbers. Instead of typing <code>192.168.1.100:9696</code> to reach Prowlarr, you&rsquo;ll use <code>prowlarr.yourdomain.com</code>.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Before we dive in, you&rsquo;ll need a few things in place:</p>
<p><strong>Docker Setup</strong>: I&rsquo;m assuming you have Docker set up and running using the <a href="https://trash-guides.info/File-and-Folder-Structure/How-to-set-up/Synology/" target="_blank" >Trash Guides</a>. This isn&rsquo;t strictly required, but I&rsquo;ll assume your directory structure and permissions match what&rsquo;s described in their guide.</p>
<p><strong>Cloudflare Domain Management</strong>: This guide assumes your domain is managed through Cloudflare&rsquo;s dashboard. The DNS records must have the <strong>proxy status enabled</strong> (orange cloud icon). This is crucial for the HTTPS setup we&rsquo;ll implement later.</p>
<p><strong>Local DNS Server</strong>: You&rsquo;ll need to be running your own DNS server like AdGuard Home or Pi-hole. This is required to add a wildcard DNS rewrite rule that points <code>*.yourdomain.com</code> to your Synology&rsquo;s IP address.</p>
<h2 id="setup">Setup</h2>
<h3 id="adding-caddy-to-your-docker-compose">Adding Caddy to Your Docker Compose</h3>
<p>First, let&rsquo;s add Caddy to your existing <code>docker-compose.yml</code> file. Here&rsquo;s the configuration I use:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span>  <span style="color:#f92672">caddy</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">container_name</span>: <span style="color:#ae81ff">caddy</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">image</span>: <span style="color:#ae81ff">caddy:latest</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">network_mode</span>: <span style="color:#ae81ff">host</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">environment</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">TZ=${TZ}</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">volumes</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">/volume1/docker/appdata/caddy/Caddyfile:/etc/caddy/Caddyfile:ro</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">/volume1/docker/appdata/caddy/data:/data</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">/volume1/docker/appdata/caddy/config:/config</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">/volume1/docker/appdata/caddy/certs:/caddy/certs:ro</span>
</span></span></code></pre></div><h3 id="creating-the-folder-structure">Creating the Folder Structure</h3>
<p>In your <code>appdata</code> directory (<code>/volume1/docker/appdata</code>), create the necessary Caddy directories:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir -p caddy/<span style="color:#f92672">{</span>certs,config,data<span style="color:#f92672">}</span> <span style="color:#f92672">&amp;&amp;</span> touch caddy/Caddyfile
</span></span></code></pre></div><p>This creates the directory structure that Caddy needs, including directories for certificates, configuration, and data storage, plus the main Caddyfile.</p>
<h3 id="freeing-up-ports-443-and-80">Freeing Up Ports 443 and 80</h3>
<p>Here&rsquo;s something that caught me off guard: Synology automatically binds to ports 443 and 80 even if you&rsquo;re not using their built-in reverse proxy. Since Caddy needs these ports to handle HTTPS and HTTP traffic, we need to free them up.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>sed -i -e <span style="color:#e6db74">&#39;s/80/82/&#39;</span> -e <span style="color:#e6db74">&#39;s/443/444/&#39;</span> /usr/syno/share/nginx/server.mustache /usr/syno/share/nginx/DSM.mustache /usr/syno/share/nginx/WWWService.mustache
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>synosystemctl restart nginx
</span></span></code></pre></div><p>I set up a boot script to handle this automatically on each reboot (Control Panel -&gt; Task Scheduler). While I&rsquo;ve found that this override typically persists between reboots, there&rsquo;s no harm in ensuring it runs at startup. System updates might reset these settings to their defaults, and I&rsquo;d rather be safe than sorry.</p>
<p><img alt="Xcode build timeline" loading="lazy" src="notes/images/synology-caddy-reverse-proxy/scheduled-task.jpg"></p>
<h3 id="setting-up-https-optional-but-recommended">Setting Up HTTPS (Optional but Recommended)</h3>
<p>HTTPS isn&rsquo;t technically required for local-only access, but it eliminates browser warnings. However, there&rsquo;s an important caveat with Caddy&rsquo;s automatic HTTPS feature.</p>
<p><img alt="Xcode build timeline" loading="lazy" src="notes/images/synology-caddy-reverse-proxy/connection-not-private.png"></p>
<p><strong>Why Caddy&rsquo;s Built-in Auto HTTPS Won&rsquo;t Work</strong>: Caddy&rsquo;s automatic HTTPS uses Let&rsquo;s Encrypt, which requires ACME challenges to verify domain ownership. These challenges need your server to be accessible from the internet. If your containers are only accessible through Tailscale or similar private networks (like mine), the ACME validation will fail.</p>
<p><strong>The Solution: Cloudflare Origin CA Certificates</strong>: Since I use Tailscale to access my containers outside my home network, I opted for Cloudflare&rsquo;s Origin CA certificates. These certificates are valid for 15 years and don&rsquo;t require internet accessibility for validation.</p>
<h4 id="generating-cloudflare-origin-certificates">Generating Cloudflare Origin Certificates</h4>
<p>Your domain needs to be using Cloudflare for this to work. Navigate to the Cloudflare Origin CA dashboard and generate a wildcard certificate for your domain. See <a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/" target="_blank" >Cloudflare Docs</a> for step-by-step instructions.</p>
<p>Save the public and private keys to these files:</p>
<ul>
<li><code>cert.pem</code> (public key)</li>
<li><code>key.pem</code> (private key)</li>
</ul>
<p>Move both files to your <code>caddy/certs</code> directory.</p>
<h4 id="adding-the-certificate-to-your-devices">Adding the Certificate to Your Devices</h4>
<p>To eliminate browser security warnings, you&rsquo;ll need to add the public certificate (<code>cert.pem</code>) to your device&rsquo;s trusted certificate store. On macOS, this means adding it to your keychain and marking it as trusted. You&rsquo;ll need to repeat this process for each device you want to use to access your containers.</p>
<p><img alt="Xcode build timeline" loading="lazy" src="/notes/images/synology-caddy-reverse-proxy/cloudflare-origin-cert.jpg"></p>
<h3 id="setting-proper-permissions">Setting Proper Permissions</h3>
<p>Following the Trash Guides approach, set the correct permissions for the docker user:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>sudo chown -R docker:users /volume1/docker/appdata/caddy
</span></span><span style="display:flex;"><span>sudo chmod -R a<span style="color:#f92672">=</span>,a+rX,u+w,g+w /volume1/docker/appdata/caddy
</span></span></code></pre></div><h3 id="configuring-the-caddyfile">Configuring the Caddyfile</h3>
<p>Here&rsquo;s a sample Caddyfile configuration. This is where the magic happens:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#75715e"># Global options</span>
</span></span><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>	<span style="color:#75715e"># Disable automatic HTTPS since we&#39;re using Cloudflare Origin CA certs</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">auto_https off</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Prowlarr</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">prowlarr.kunat.dev {</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">reverse_proxy localhost:9696</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">tls /caddy/certs/cert.pem /caddy/certs/key.pem</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Plex</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">plex.kunat.dev {</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">reverse_proxy localhost:32400</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">tls /caddy/certs/cert.pem /caddy/certs/key.pem</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># AdGuard</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">adguard.kunat.dev {</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">reverse_proxy localhost:3000</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">tls /caddy/certs/cert.pem /caddy/certs/key.pem</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Synology Dashboard (HTTPS backend)</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">synology.kunat.dev {</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">reverse_proxy https://localhost:5001 {</span>
</span></span><span style="display:flex;"><span>		<span style="color:#ae81ff">transport http {</span>
</span></span><span style="display:flex;"><span>			<span style="color:#ae81ff">tls_insecure_skip_verify</span>
</span></span><span style="display:flex;"><span>		}
</span></span><span style="display:flex;"><span>	}
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">tls /caddy/certs/cert.pem /caddy/certs/key.pem</span>
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Homarr</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">homarr.kunat.dev {</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">reverse_proxy localhost:7575</span>
</span></span><span style="display:flex;"><span>	<span style="color:#ae81ff">tls /caddy/certs/cert.pem /caddy/certs/key.pem</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>Each service follows the same pattern: define the subdomain, specify the reverse proxy target (localhost:port), and point to our TLS certificates.</p>
<h3 id="running-caddy">Running Caddy</h3>
<p>Start Caddy with:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo docker-compose up -d caddy
</span></span></code></pre></div><p>If everything is configured correctly, you should see logs similar to these:</p>
<pre tabindex="0"><code>caddy  | {&#34;level&#34;:&#34;warn&#34;,&#34;ts&#34;:1752004979.244892,&#34;msg&#34;:&#34;failed to set GOMAXPROCS&#34;,&#34;error&#34;:&#34;open /sys/fs/cgroup/cpu/cpu.cfs_quota_us: no such file or directory&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2452004,&#34;msg&#34;:&#34;GOMEMLIMIT is updated&#34;,&#34;package&#34;:&#34;github.com/KimMachineGun/automemlimit/memlimit&#34;,&#34;GOMEMLIMIT&#34;:18851998924,&#34;previous&#34;:9223372036854775807}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2452545,&#34;msg&#34;:&#34;using config from file&#34;,&#34;file&#34;:&#34;/etc/caddy/Caddyfile&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.247973,&#34;msg&#34;:&#34;adapted config to JSON&#34;,&#34;adapter&#34;:&#34;caddyfile&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2502022,&#34;logger&#34;:&#34;admin&#34;,&#34;msg&#34;:&#34;admin endpoint started&#34;,&#34;address&#34;:&#34;localhost:2019&#34;,&#34;enforce_origin&#34;:false,&#34;origins&#34;:[&#34;//localhost:2019&#34;,&#34;//[::1]:2019&#34;,&#34;//127.0.0.1:2019&#34;]}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2507207,&#34;logger&#34;:&#34;tls.cache.maintenance&#34;,&#34;msg&#34;:&#34;started background certificate maintenance&#34;,&#34;cache&#34;:&#34;0xc00079c480&#34;}
caddy  | {&#34;level&#34;:&#34;warn&#34;,&#34;ts&#34;:1752004979.2785668,&#34;logger&#34;:&#34;tls&#34;,&#34;msg&#34;:&#34;stapling OCSP&#34;,&#34;error&#34;:&#34;no OCSP stapling for [cloudflare origin certificate *.kunat.dev]: no URL to issuing certificate&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.278835,&#34;logger&#34;:&#34;http.auto_https&#34;,&#34;msg&#34;:&#34;automatic HTTPS is completely disabled for server&#34;,&#34;server_name&#34;:&#34;srv0&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2799113,&#34;logger&#34;:&#34;http&#34;,&#34;msg&#34;:&#34;enabling HTTP/3 listener&#34;,&#34;addr&#34;:&#34;:443&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2799726,&#34;msg&#34;:&#34;failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2800903,&#34;logger&#34;:&#34;http.log&#34;,&#34;msg&#34;:&#34;server running&#34;,&#34;name&#34;:&#34;srv0&#34;,&#34;protocols&#34;:[&#34;h1&#34;,&#34;h2&#34;,&#34;h3&#34;]}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.280308,&#34;msg&#34;:&#34;autosaved config (load with --resume flag)&#34;,&#34;file&#34;:&#34;/config/caddy/autosave.json&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.2811198,&#34;msg&#34;:&#34;serving initial configuration&#34;}
caddy  | {&#34;level&#34;:&#34;info&#34;,&#34;ts&#34;:1752004979.38889,&#34;logger&#34;:&#34;tls&#34;,&#34;msg&#34;:&#34;finished cleaning storage units&#34;}
</code></pre><p>The key things to look for are &ldquo;server running&rdquo; and &ldquo;serving initial configuration&rdquo; messages. These indicate that Caddy has successfully started and is ready to handle requests.</p>
<p>Now try accessing one of your Docker containers using its subdomain. If everything is working correctly, you should be able to reach your services through clean URLs like <code>https://prowlarr.yourdomain.com</code>.</p>
<h2 id="troubleshooting">Troubleshooting</h2>
<p><strong>Clean Your DNS Cache</strong>: If you&rsquo;re having trouble accessing your services after setup, try clearing your DNS cache. On macOS, run:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
</span></span></code></pre></div><p><strong>Check Your Wildcard DNS</strong>: Make sure your local DNS server (AdGuard Home or Pi-hole) has the wildcard rewrite rule in place. Without <code>*.yourdomain.com -&gt; your_synology_ip</code>, your subdomains won&rsquo;t resolve locally.</p>
<p><img alt="Xcode build timeline" loading="lazy" src="/notes/images/synology-caddy-reverse-proxy/dns-override.jpg"></p>
<p><strong>Verify Certificate Trust</strong>: If you&rsquo;re seeing browser security warnings, double-check that you&rsquo;ve properly installed and trusted the Cloudflare Origin CA certificate on your client devices.</p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://3os.org/infrastructure/synology/disable-dms-listening-on-80-443-ports/#disable-the-synology-nas-dsm-to-listen-on-80-443-ports" target="_blank" >Free 80,443 Ports - 3os</a></li>
<li><a href="https://caddyserver.com/docs/" target="_blank" >Caddy Documentation</a></li>
<li><a href="https://developers.cloudflare.com/ssl/origin-configuration/origin-ca/" target="_blank" >Cloudflare Origin CA Documentation</a></li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>Setting up Caddy as a reverse proxy on Synology has been a game-changer for my homelab. The ability to access all my services through clean subdomains makes everything feel more professional and easier to remember. While the initial setup requires some work, especially with the certificate configuration, the long-term benefits are worth it.</p>
<blockquote>
<p><strong>Update 14/07/25:</strong> If you want to access your Docker containers using their LAN IP addresses consistently, regardless of whether we’re connected to our home network or accessing remotely through Tailscale check out <a href="/notes/tailscale-subnet-routers/" >this aritcle</a> on Tailscale subnet routers.</p></blockquote>
]]></content:encoded>
    </item>
    <item>
      <title>My Synology Setup</title>
      <link>https://kunat.dev/notes/my-synology-setup/</link>
      <pubDate>Wed, 09 Oct 2024 18:13:32 +0200</pubDate>
      <guid>https://kunat.dev/notes/my-synology-setup/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been using Synology for the past year, and during this time it&amp;rsquo;s become the center of my home computing. I&amp;rsquo;m still discovering new use cases, so I&amp;rsquo;ll keep this post updated. Today, I want to share how I ended up with this setup - the how and why. Here are the main things I use my NAS for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Media Server&lt;/strong&gt; - My Synology stores and serves my entire collection of movies, TV shows, and music. Using Plex, I can stream this content to any device, creating a personalized Netflix-like experience.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usenet / Torrent Client&lt;/strong&gt; - I have the standard *ARR stack setup for managing my media library. I can’t recommend it enough. This suite of apps is a crown jewel of the entire setup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HomeBridge&lt;/strong&gt; - HomeBridge allows me to integrate non-HomeKit devices into my Apple HomeKit setup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Time Machine Backup Destination&lt;/strong&gt; - My Synology serves as a Time Machine backup destination for all my Macs. This is a major improvement over manually connecting external HDDs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DNS Server&lt;/strong&gt; - I run AdGuard Home on my Synology as a DNS server. Similar to Pi-hole, it blocks ads across all devices on my network. You can read more about it &lt;a href=&#34;https://kunat.dev/notes/adguard-home-synology-tailscale/#heading-id&#34; &gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personal Cloud Storage&lt;/strong&gt; - While I use iCloud for critical documents, my Synology acts as a personal cloud for miscellaneous files. It&amp;rsquo;s a great way to keep less important documents accessible without cluttering my primary cloud storage.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the following sections, I&amp;rsquo;ll dive deeper into this setup, providing a high-level overview and sharing useful resources that have helped me create this system.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve been using Synology for the past year, and during this time it&rsquo;s become the center of my home computing. I&rsquo;m still discovering new use cases, so I&rsquo;ll keep this post updated. Today, I want to share how I ended up with this setup - the how and why. Here are the main things I use my NAS for:</p>
<ul>
<li><strong>Media Server</strong> - My Synology stores and serves my entire collection of movies, TV shows, and music. Using Plex, I can stream this content to any device, creating a personalized Netflix-like experience.</li>
<li><strong>Usenet / Torrent Client</strong> - I have the standard *ARR stack setup for managing my media library. I can’t recommend it enough. This suite of apps is a crown jewel of the entire setup.</li>
<li><strong>HomeBridge</strong> - HomeBridge allows me to integrate non-HomeKit devices into my Apple HomeKit setup.</li>
<li><strong>Time Machine Backup Destination</strong> - My Synology serves as a Time Machine backup destination for all my Macs. This is a major improvement over manually connecting external HDDs.</li>
<li><strong>DNS Server</strong> - I run AdGuard Home on my Synology as a DNS server. Similar to Pi-hole, it blocks ads across all devices on my network. You can read more about it <a href="/notes/adguard-home-synology-tailscale/#heading-id" >here</a>.</li>
<li><strong>Personal Cloud Storage</strong> - While I use iCloud for critical documents, my Synology acts as a personal cloud for miscellaneous files. It&rsquo;s a great way to keep less important documents accessible without cluttering my primary cloud storage.</li>
</ul>
<p>In the following sections, I&rsquo;ll dive deeper into this setup, providing a high-level overview and sharing useful resources that have helped me create this system.</p>
<h2 id="the-initial-setup">The Initial Setup</h2>
<h3 id="storage-pools--shares--volumes">Storage Pools / Shares / Volumes</h3>
<p>The first question I asked myself when setting up the system was &ldquo;What volume structure should I use?&rdquo; Initially, I aimed for complete separation between documents, media, and backups. This approach would have resulted in a single storage pool with three separate volumes.</p>
<p>However, I learned that creating separate volumes doesn&rsquo;t offer significant advantages in this case (if any). It doesn&rsquo;t provide any real security benefits. Instead, having separate shared folders with properly set up permissions is more than sufficient. So, unless you have a compelling reason to do otherwise, you should default to a single storage pool with a single volume.</p>
<blockquote>
<p>95% of users should use a single SHR pool, with a single BTRFS volume. If you need something else, you&rsquo;re an advanced user with an unusual use case (or just a big nerd who likes to tinker, even when it&rsquo;s slightly harmful).</p>
<p>Some people make multiple pools for different RAID levels for different uses, or making a separate pool with surveillance-class drives for their cameras. IMO, it&rsquo;s not worth that level of control, but it&rsquo;s available. You must make separate pools for HDDs and SSDs.</p>
<p>There&rsquo;s even less reason to use multiple volumes on the same pool. All of the backup, permissions, quota, etc. management is done at the shared folder level, so there just isn&rsquo;t much benefit to multiple volumes, unless you&rsquo;re hitting the 108TB limit and are forced to.</p>
<p><a href="https://www.reddit.com/r/synology/comments/11c1hu4/practical_reasons_for_having_multiple_storage/" target="_blank" >From the synology community on Reddit</a></p></blockquote>
<h3 id="access-control">Access Control</h3>
<p>All of my shared folders use the default permissions, except for <code>docker</code>. The permissions for this directory are described in detail <a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/" target="_blank" >here</a>. The gist of this setup is that the &ldquo;docker&rdquo; user has full access to the &ldquo;docker&rdquo; shared folder and nothing else. All other users can access anything except the docker folder.</p>
<p>I have three accounts in total:</p>
<ul>
<li>An admin account that I only use when I need to make changes to Synology.</li>
<li>My personal account, which I use day-to-day. All of my client devices use it to access documents, media, and backups.</li>
<li>The docker account I mentioned earlier.</li>
</ul>
<h3 id="setting-up-time-machine">Setting up Time Machine</h3>
<p>Use <a href="https://www.youtube.com/watch?v=yQFuJJqqWbc" target="_blank" >this video</a> and you should be good to go.</p>
<h3 id="docker">Docker</h3>
<p>I started my Docker setup with <a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/" target="_blank" >this guide</a> as part of setting up the *ARR stack. It goes into detail on how to set it up from the ground up. Once you&rsquo;re done, it should be fairly easy to build on top of it.</p>
<blockquote>
<p>I still haven&rsquo;t gotten around to setting up automation for updating the containers, so I can&rsquo;t speak on pullio, the solution suggested in the guide above.</p></blockquote>
<h2 id="remote-access">Remote Access</h2>
<p>With the initial setup done, it&rsquo;s time to decide how to access your Synology outside of your home network. In my setup, I wanted to balance security and convenience. That&rsquo;s why I decided against Synology&rsquo;s Quick Connect and went with Tailscale. The free tier is more than enough for my needs, and this setup is beautifully simple to configure.</p>
<p>I wrote <a href="/notes/synology-plex-tailscale/#heading-id" >a separate article</a> on how to set up Plex to work with Tailscale. If you want to learn more about the available options for remote access, <a href="https://www.youtube.com/watch?v=o2ck1g3_k3o" target="_blank" >this video</a> covers the most popular choices.</p>
<h2 id="backup">Backup</h2>
<p>I backup my entire system using the built-in Hyper Backup solution. <a href="https://www.youtube.com/watch?v=W43G5DSZ-Ik" target="_blank" >Here&rsquo;s a tutorial</a> on how to set it up.</p>
<blockquote>
<p>I don&rsquo;t backup media to save space. In the worst-case scenario of two subsequent disk failures, I&rsquo;ll still have all of my most important documents intact. The media library should be fairly simple to rebuild.</p></blockquote>
<p>I have a monthly reminder to connect the external HDD and make a backup. You can configure it so that the external disk will be unmounted when the backup is finished. This makes the process easy and hassle-free. I connect the drive, initiate the backup, and detach it the next morning. You could keep it connected, but I prefer to keep my backup offsite. It&rsquo;s my final safety net when everything else fails.</p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://www.reddit.com/r/synology/comments/11c1hu4/practical_reasons_for_having_multiple_storage/" target="_blank" >Practical reasons for having multiple storage pools and volumes : r/synology</a></li>
<li><a href="/notes/adguard-home-synology-tailscale/#heading-id" >Setting up AdGuard Home on Synology NAS with Tailscale | kunat.dev</a></li>
<li><a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/" target="_blank" >Synology - TRaSH Guides</a></li>
<li><a href="https://www.youtube.com/watch?v=yQFuJJqqWbc" target="_blank" >How to Backup MacOS to Synology NAS using Time Machine (easy) - YouTube</a></li>
<li><a href="/notes/synology-plex-tailscale/#heading-id" >Secure Remote Access to Your Synology Plex Server via Tailscale | kunat.dev</a></li>
<li><a href="https://www.youtube.com/watch?v=o2ck1g3_k3o" target="_blank" >The Complete Guide to Remotely Access Synology NAS - All 5 Options Explained - YouTube</a></li>
<li><a href="https://www.youtube.com/watch?v=W43G5DSZ-Ik" target="_blank" >Do this FIRST - How to Backup Synology NAS to USB Hard Drive (Hyperbackup) - YouTube</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Setting up AdGuard Home on Synology NAS with Tailscale</title>
      <link>https://kunat.dev/notes/adguard-home-synology-tailscale/</link>
      <pubDate>Thu, 08 Aug 2024 22:06:39 +0200</pubDate>
      <guid>https://kunat.dev/notes/adguard-home-synology-tailscale/</guid>
      <description>&lt;h1 id=&#34;setting-up-adguard-home-as-a-docker-container-on-synology-nas&#34;&gt;Setting up AdGuard Home as a Docker Container on Synology NAS&lt;/h1&gt;
&lt;p&gt;In this guide, I&amp;rsquo;ll walk you through the steps to set up AdGuard Home (AGH) as a Docker container on a Synology NAS. This setup will allow you to use AGH both inside and outside of your home network.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/AdguardTeam/AdGuardSDNSFilter&#34; target=&#34;_blank&#34; &gt;AdGuard Home&lt;/a&gt; is a network-wide DNS server that blocks ads and trackers for all devices on your network. It filters unwanted content before it reaches your devices, eliminating the need for individual ad blockers. With customizable rules and open-source flexibility, it offers comprehensive protection and can be installed on various platforms, including Raspberry Pi.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h1 id="setting-up-adguard-home-as-a-docker-container-on-synology-nas">Setting up AdGuard Home as a Docker Container on Synology NAS</h1>
<p>In this guide, I&rsquo;ll walk you through the steps to set up AdGuard Home (AGH) as a Docker container on a Synology NAS. This setup will allow you to use AGH both inside and outside of your home network.</p>
<blockquote>
<p><a href="https://github.com/AdguardTeam/AdGuardSDNSFilter" target="_blank" >AdGuard Home</a> is a network-wide DNS server that blocks ads and trackers for all devices on your network. It filters unwanted content before it reaches your devices, eliminating the need for individual ad blockers. With customizable rules and open-source flexibility, it offers comprehensive protection and can be installed on various platforms, including Raspberry Pi.</p></blockquote>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>Basic Docker setup running on your Synology NAS (users, permissions, folders)
<ul>
<li>I highly recommend following the <a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/" target="_blank" >Synology | TRaSH Guides</a></li>
</ul>
</li>
</ul>
<p>The following steps assume you have a setup similar (ideally identical) to the one from the article linked above. The most important aspects are user permissions and folder structure.</p>
<h2 id="configuration">Configuration</h2>
<h3 id="env">.env:</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#75715e">## Edit/update your settings that will be used for your docker-compose</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">## This will only work if you follow exactly the path structure in the Guide!</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">COMPOSE_PROJECT_NAME=trash-guides</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">## Global Settings</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Change &#34;/volume1/docker/appdata&#34; to your config path</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">DOCKERCONFDIR=/volume1/docker/appdata</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Change &#34;/volume1/data&#34; to your library + torrent/usenet downloads path</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">DOCKERSTORAGEDIR=/volume1/data</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Find your PUID/PGID through SSH, run in terminal: id $user</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Change $user to the user you created if needed</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">PUID=XXXX</span>
</span></span><span style="display:flex;"><span><span style="color:#ae81ff">PGID=YYY</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Other app-specific settings and variables</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># ...</span>
</span></span></code></pre></div><p>This setup doesn&rsquo;t use any environment variables specific to AGH. The key thing is to set PUID and PGID correctly.</p>
<h3 id="docker-composeyml">docker-compose.yml:</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">version</span>: <span style="color:#e6db74">&#34;3.2&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">services</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">adguardhome</span>:
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">image</span>: <span style="color:#ae81ff">adguard/adguardhome:latest</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">container_name</span>: <span style="color:#ae81ff">adguardhome</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">network_mode</span>: <span style="color:#ae81ff">host</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">volumes</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">${DOCKERCONFDIR}/adguardhome/work:/opt/adguardhome/work</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">${DOCKERCONFDIR}/adguardhome/conf:/opt/adguardhome/conf</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">environment</span>:
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">PUID=${PUID}</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">PGID=${PGID}</span>
</span></span><span style="display:flex;"><span>      - <span style="color:#ae81ff">TZ=${TZ}</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Other containers</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># ...</span>
</span></span></code></pre></div><h3 id="folder-structure">Folder structure</h3>
<p><img alt="Folder structure" loading="lazy" src="/notes/images/adguard-home-synology-tailscale/folder-structure.png"></p>
<h2 id="initial-setup">Initial Setup</h2>
<p>After running the container for the first time, complete the initial AGH setup:</p>
<ol>
<li>When asked to choose the network interface for DNS requests, select &ldquo;All Interfaces&rdquo;.</li>
<li>Switch the Web Interface port to 3000 if it&rsquo;s not already set.</li>
<li>Set credentials for your admin account.</li>
</ol>
<p>If you encounter issues, refer to <a href="https://drfrankenstein.co.uk/adguard-home-in-container-manager-on-a-synology-nas/" target="_blank" >this guide</a>.</p>
<h2 id="local-network-setup">Local Network Setup</h2>
<p>To use AGH as your DNS server:</p>
<ol>
<li>Set it on your router (preferred method).</li>
<li>If router modification isn&rsquo;t possible, set it manually for each device on your home WiFi network. Here&rsquo;s a <a href="https://support.nordvpn.com/hc/en-us/articles/20398776567313-Change-your-DNS-servers-on-iOS" target="_blank" >guide for iOS</a>.</li>
</ol>
<p>Use your Synology&rsquo;s local network IP address. Update your DHCP settings to ensure your Synology&rsquo;s local IP address doesn&rsquo;t expire.</p>
<p>With this setup, you&rsquo;ll see the benefits of AGH whenever you&rsquo;re connected to your home network.</p>
<h2 id="remote-setup">Remote Setup</h2>
<p>To use AGH when not on your home network, there are several options:</p>
<ul>
<li>Dynamic DNS (DDNS) and port forwarding</li>
<li>Setting up a VPN server on your NAS</li>
<li>Using Cloudflare Tunnel</li>
<li>Tailscale (the method used in this guide)</li>
</ul>
<blockquote>
<p>Tailscale is a modern, user-friendly virtual private network (VPN) solution that leverages the WireGuard protocol to create secure, peer-to-peer connections between devices. It simplifies network configuration by eliminating the need for traditional VPN servers and complex firewall rules.</p></blockquote>
<p>To set up Tailscale:</p>
<ol>
<li>Set custom DNS in Tailscale admin panel (your Synology&rsquo;s tailnet IP address)</li>
<li>Enable &ldquo;override local DNS&rdquo;
<img alt="Tailscale DNS settings" loading="lazy" src="/notes/images/adguard-home-synology-tailscale/tailscale-admin-panel.png"></li>
<li>Set up Tailscale on all devices you plan to use outside your home network</li>
<li><a href="/notes/adguard-home-advanced-data-protection/" >Set up VPN On-Demand</a></li>
</ol>
<p>With these steps, your device will automatically connect to your Tailscale mesh network, which will use AGH as a DNS server.</p>
<h2 id="cleanup">Cleanup</h2>
<p>For Safari users: Consider disabling Advanced Tracking and Fingerprinting Protection, as it can override local DNS settings and interfere with AGH. More details on this issue can be found <a href="/notes/adguard-home-advanced-data-protection/" >here</a>.</p>
<p>Note: Client names may not resolve properly due to Docker&rsquo;s host network mode. If you find a solution to this issue, please share!
<img alt="Client resolution issue" loading="lazy" src="/notes/images/adguard-home-synology-tailscale/adguard-home-dashboard.png"></p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://nicolaslouge.com/post/install-adguard-home-raspberry-pi-enable-remote-acces-via-tailscale/" target="_blank" >Install Adguard Home on a Raspberry Pi 4 and enable remote access with Tailscale | Senior Project Manager in Toronto, Ontario | Nicolas Louge</a></li>
<li><a href="https://akashrajpurohit.com/blog/adguard-home-tailscale-erase-ads-on-the-go/?ref=reddit" target="_blank" >AdGuard Home + Tailscale = Erase Ads on the Go</a></li>
<li><a href="https://drfrankenstein.co.uk/adguard-home-in-container-manager-on-a-synology-nas/" target="_blank" >AdGuard Home in Container Manager on a Synology NAS</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>AdGuard Home Not Working in Safari: A Fix for Custom DNS Issues</title>
      <link>https://kunat.dev/notes/adguard-home-advanced-data-protection/</link>
      <pubDate>Wed, 24 Jul 2024 18:56:46 +0200</pubDate>
      <guid>https://kunat.dev/notes/adguard-home-advanced-data-protection/</guid>
      <description>&lt;p&gt;&lt;em&gt;tl;dr: If your custom DNS does not work in Safari, you might want to try disabling Advanced Tracking and Fingerprinting Protection.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A few weeks back, I set up AdGuard Home on my Synology NAS. I&amp;rsquo;ve been using it without any issues inside and outside of my home network thanks to Tailscale. There was one issue with this setup though: battery drainage on all of my mobile devices. I noticed that my battery usage went up by 25% on my phone.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><em>tl;dr: If your custom DNS does not work in Safari, you might want to try disabling Advanced Tracking and Fingerprinting Protection.</em></p>
<p>A few weeks back, I set up AdGuard Home on my Synology NAS. I&rsquo;ve been using it without any issues inside and outside of my home network thanks to Tailscale. There was one issue with this setup though: battery drainage on all of my mobile devices. I noticed that my battery usage went up by 25% on my phone.</p>
<blockquote>
<p>From what I could find, the increased battery usage might have been caused by a few factors:</p>
<ul>
<li>Constant network connection: Tailscale maintains a persistent VPN connection</li>
<li>Encryption overhead: The VPN encrypts and decrypts all traffic, which requires additional processing power</li>
<li>Background processes: Tailscale might be doing some work in the background</li>
</ul></blockquote>
<p>To solve this issue, I decided to update my config so that I use VPN only when I&rsquo;m not on my home network. My ISP-provided router does not allow me to change the default DNS, so my only option was to manually set it for each device.</p>
<p>Tailscale&rsquo;s VPN On-Demand feature is just the tool for the job. It allows you to connect to your mesh network only when some specific rules are satisfied. For example, with the following configuration, my phone will connect to the VPN only when I&rsquo;m not connected to my home network.</p>
<p><img loading="lazy" src="/notes/images/adguard-home-advanced-data-protection-tailscale.png"></p>
<p>This setup worked beautifully. The battery issue was gone. Tailscale worked as advertised. I could still access my server from anywhere. The only issue was that AdGuard Home seemed to not work in private Safari tabs.</p>
<p>My first suspect was Private Relay. I toggled it on and off, but it didn&rsquo;t fix the issue. The second suspect was the &ldquo;Prevent cross-site tracking&rdquo; setting. Still nothing. Finally, I found <a href="https://discussions.apple.com/thread/255140280?sortBy=rank" target="_blank" >this</a> thread that pointed me in the right direction. Turns out, the issue was caused by the Advanced Tracking and Fingerprinting Protection setting located in Advanced settings. Turning it off fixes the issue instantly.</p>
<h3 id="ios">iOS</h3>
<p><img loading="lazy" src="/notes/images/adguard-home-advanced-data-protection-ios.png"></p>
<h3 id="macos">macOS</h3>
<p><img loading="lazy" src="/notes/images/adguard-home-advanced-data-protection-macos.png"></p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://discussions.apple.com/thread/255140280?sortBy=rank" target="_blank" >iOS 17 private browsing overrides DNS - Apple Community</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Secure Remote Access to Your Synology Plex Server via Tailscale</title>
      <link>https://kunat.dev/notes/synology-plex-tailscale/</link>
      <pubDate>Wed, 03 Jul 2024 14:40:04 +0200</pubDate>
      <guid>https://kunat.dev/notes/synology-plex-tailscale/</guid>
      <description>&lt;p&gt;In this article, I’ll describe how to set up your Plex server so you can access it remotely through Tailscale, with Remote Access completely disabled in Plex server settings.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Have a Plex server running as a Docker container using &lt;a href=&#34;https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/&#34; target=&#34;_blank&#34; &gt;this guide&lt;/a&gt;. When you’re done, you should have a &lt;code&gt;docker-compose.yml&lt;/code&gt; and a &lt;code&gt;.env&lt;/code&gt; file with all your environment variables.&lt;/li&gt;
&lt;li&gt;Have Tailscale set up and running on your Synology. You can use &lt;a href=&#34;https://www.youtube.com/watch?v=qulWDpzdY1E&#34; target=&#34;_blank&#34; &gt;this guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Make sure to disable the expiry for the IP address assigned to your Synology NAS in the Tailscale dashboard.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>In this article, I’ll describe how to set up your Plex server so you can access it remotely through Tailscale, with Remote Access completely disabled in Plex server settings.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>Have a Plex server running as a Docker container using <a href="https://trash-guides.info/Hardlinks/How-to-setup-for/Synology/" target="_blank" >this guide</a>. When you’re done, you should have a <code>docker-compose.yml</code> and a <code>.env</code> file with all your environment variables.</li>
<li>Have Tailscale set up and running on your Synology. You can use <a href="https://www.youtube.com/watch?v=qulWDpzdY1E" target="_blank" >this guide</a>.</li>
</ul>
<blockquote>
<p>Make sure to disable the expiry for the IP address assigned to your Synology NAS in the Tailscale dashboard.</p></blockquote>
<h2 id="steps">Steps</h2>
<ol>
<li>Set <code>PLEX_ADVERTISE_URL</code> (in the <code>.env</code> file) to your Synology IP address in the Tailscale dashboard and your local network IP address:</li>
</ol>
<pre tabindex="0"><code>## PLEX
# ... other keys
PLEX_ADVERTISE_URL=&#34;http://ds1512p:32400,http://192.168.0.186:32400&#34;
</code></pre><blockquote>
<p>Remember to include port numbers in both IP addresses!</p></blockquote>
<ol start="2">
<li>Restart the Plex container using the latest changes:</li>
</ol>
<pre tabindex="0"><code>sudo docker-compose up --force-recreate plex
</code></pre><ol start="3">
<li>Check if the changes have been applied successfully. “Custom server access URLs” should be set to <code>$PLEX_ADVERTISE_URL</code>.</li>
</ol>
<p><img alt="Plex Server dashboard" loading="lazy" src="/notes/images/synology-plex-tailscale.png"></p>
<h2 id="summary">Summary</h2>
<p>That’s it! With the above setup, you should be able to connect to your Plex server from your local network as well as from anywhere, as long as you’re connected to Tailscale.</p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://community.umbrel.com/t/how-to-run-plex-through-tailscale/14595" target="_blank" >How to run Plex through Tailscale</a></li>
</ul>
]]></content:encoded>
    </item>
  </channel>
</rss>
