<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alessandro Crugnola &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/author/sephiroth74/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Mon, 16 Nov 2026 15:10:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>Alessandro Crugnola &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Lokyr, another terminal for macOS</title>
		<link>https://blog.sephiroth.it/2026/11/16/lokyr-another-terminal-for-macos/</link>
					<comments>https://blog.sephiroth.it/2026/11/16/lokyr-another-terminal-for-macos/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Mon, 16 Nov 2026 17:08:00 +0000</pubDate>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Rust]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[claude]]></category>
		<category><![CDATA[luau]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[rust]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tty]]></category>
		<guid isPermaLink="false">https://blog.sephiroth.it/?p=1928</guid>

					<description><![CDATA[I&#8217;d like to introduce Lokyr, a terminal emulator for macOS I started a little more than a month ago. I spend most of my day in a terminal, and over the years I&#8217;ve tried practically all of them: Terminal.app, iTerm2, Alacritty, kitty, WezTerm, Ghostty, and probably a few more I don&#8217;t even remember. Every one &#8230; <a href="https://blog.sephiroth.it/2026/11/16/lokyr-another-terminal-for-macos/" class="more-link">Continue reading <span class="screen-reader-text">Lokyr, another terminal for macOS</span></a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I&#8217;d like to introduce <strong>Lokyr</strong>, a terminal emulator for macOS I started a little more than a month ago.</p>



<p class="wp-block-paragraph">I spend most of my day in a terminal, and over the years I&#8217;ve tried practically all of them: Terminal.app, iTerm2, Alacritty, kitty, WezTerm, Ghostty, and probably a few more I don&#8217;t even remember. Every one of them had something I liked, but none of them had everything I wanted, at least not all together.. so I always ended up going back and forth between two or three of them.</p>



<p class="wp-block-paragraph">So I thought: why not make my own? Writing a terminal emulator from scratch is not exactly a small project (and honestly I know a little about it), so I decided to make it an experiment in vibe coding too: I described what I wanted, an AI agent wrote the code, and my job was to use it every day, test it, measure it and ask for changes until it worked the way I wanted.</p>



<p class="wp-block-paragraph">The result is Lokyr.</p>



<figure class="wp-block-image size-large"><a href="https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-scaled.png"><img fetchpriority="high" decoding="async" width="1024" height="611" src="https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-1024x611.png" alt="" class="wp-image-1929" srcset="https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-1024x611.png 1024w, https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-300x179.png 300w, https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-768x458.png 768w, https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-1536x916.png 1536w, https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-2048x1222.png 2048w, https://blog.sephiroth.it/wp-content/uploads/2026/11/Screenshot-2026-11-16-at-15.55.44-681x406.png 681w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<h2 class="wp-block-heading">What it is</h2>



<p class="wp-block-paragraph">Lokyr is written in <strong>Rust</strong> and it&#8217;s native on macOS: an AppKit window, Metal for the rendering, CoreText for the fonts.</p>



<p class="wp-block-paragraph">The idea behind it is a small core, the terminal itself (the screen, the input, the rendering), with <strong>everything else as a plugin</strong>. The tab bar, the splits, the search and the command palette are all plugins, built on the same API that third party plugins get, so if you don&#8217;t need one of them you can just turn it off.</p>



<p class="wp-block-paragraph">Third party plugins are written in Luau and run in a sandbox: each plugin has to declare what it wants to access (the screen, the clipboard, files, the network) and Lokyr asks you before the first use. They are installed with Sleip, Lokyr&#8217;s own package manager.</p>



<p class="wp-block-paragraph">Some of the other things I wanted, which are already there:</p>



<ul class="wp-block-list">
<li>tabs at the top, at the bottom or on a side, and split panes</li>



<li>shell integration for zsh, bash and fish: jump between prompts, the outcome of each command, a notification when a long command ends</li>



<li>a quick terminal that slides in from an edge of the screen with a global shortcut</li>



<li>tabs that show what the AI agent inside them is doing (Claude Code, Codex, Gemini CLI): working, waiting for you, or done</li>



<li>themes, and since version 1.2.0 a theme editor in the settings window</li>



<li>a TOML config file, applied as soon as you save it</li>
</ul>



<p class="wp-block-paragraph">Performance was one of the goals since the beginning, so every change is measured against the previous builds and against six other terminals. Lokyr does better on some measures and not on others: all the numbers are in the repository.</p>



<h2 class="wp-block-heading">Install</h2>



<p class="wp-block-paragraph">Lokyr requires macOS 26 or later on Apple Silicon. You can download the DMG from the website, or install it with Homebrew:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>brew install --cask sephiroth74/tap/lokyr</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">brew</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">install</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">cask</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">sephiroth74</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">tap</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">lokyr</span></span></code></pre></div>



<p class="wp-block-paragraph">After that, Lokyr updates itself.</p>



<p class="wp-block-paragraph">It&#8217;s open source (MIT license) and it&#8217;s still a work in progress, so there&#8217;s a lot more on my list.</p>



<p class="wp-block-paragraph">For more information and download:</p>



<p class="wp-block-paragraph"><a href="https://lokyr.dev">https://lokyr.dev</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2026/11/16/lokyr-another-terminal-for-macos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Building an All-in-One Home Server on Raspberry Pi 5</title>
		<link>https://blog.sephiroth.it/2026/10/14/building-an-all-in-one-home-server-on-raspberry-pi-5/</link>
					<comments>https://blog.sephiroth.it/2026/10/14/building-an-all-in-one-home-server-on-raspberry-pi-5/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Wed, 14 Oct 2026 08:34:27 +0000</pubDate>
				<category><![CDATA[general]]></category>
		<category><![CDATA[raspberry]]></category>
		<guid isPermaLink="false">https://blog.sephiroth.it/?p=1909</guid>

					<description><![CDATA[I am writing this guide for my future self, for the next time he inadvertently destroys the Raspberry Pi&#8217;s SD card.!This is a simple deep-dive on turning a Raspberry Pi 5 into a secure home server. In this guide, we will transform a raw micro-SD card into a self-hosted infrastructure featuring network-wide ad-blocking (AdGuard Home), &#8230; <a href="https://blog.sephiroth.it/2026/10/14/building-an-all-in-one-home-server-on-raspberry-pi-5/" class="more-link">Continue reading <span class="screen-reader-text">Building an All-in-One Home Server on Raspberry Pi 5</span></a>]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">I am writing this guide for my future self, for the next time he inadvertently destroys the Raspberry Pi&#8217;s SD card.!<br /><em>This is a simple deep-dive on turning a Raspberry Pi 5 into a secure home server. In this guide, we will transform a raw micro-SD card into a self-hosted infrastructure featuring network-wide ad-blocking (AdGuard Home), private VPN access (WireGuard), reverse proxy routing (Nginx Proxy Manager), root-level file management (Filebrowser), centralized Docker administration (Portainer), automated encrypted cloud backups (Kopia + Rclone), and a clean unified dashboard (Homepage).</em></p>
</blockquote>



<h3 id="table-of-contents" class="wp-block-heading">Table of Contents</h3>



<ul class="wp-block-list">
<li><a href="#1-hardware--prerequisites">1. Hardware &amp; Prerequisites</a></li>



<li><a href="#2-microsd-preparation-with-raspberry-pi-imager">2. MicroSD Preparation with Raspberry Pi Imager</a></li>



<li><a href="#3-initial-system-setup--network-discovery">3. Initial System Setup &amp; Network Discovery</a></li>



<li><a href="#4-docker--docker-compose-installation">4. Docker &amp; Docker Compose Installation</a></li>



<li><a href="#5-deploying-adguard-home-dns--ad-blocking">5. Deploying AdGuard Home (DNS &amp; Ad-Blocking)</a></li>



<li><a href="#6-router-configuration--networking">6. Router Configuration &amp; Networking</a></li>



<li><a href="#7-deploying-core-infrastructure-services">7. Deploying Core Infrastructure Services</a>
<ul class="wp-block-list">
<li><a href="#wireguard--wireguard-ui-secure-remote-access">WireGuard &amp; WireGuard-UI (Secure Remote Access)</a></li>



<li><a href="#nginx-proxy-manager-reverse-proxy">Nginx Proxy Manager (Reverse Proxy)</a></li>



<li><a href="#portainer-ce-container-management">Portainer CE (Container Management)</a></li>



<li><a href="#filebrowser-full-filesystem-scope">Filebrowser (Full Filesystem Scope)</a></li>



<li><a href="#homepage-unified-application-dashboard">Homepage (Unified Application Dashboard)</a></li>
</ul>
</li>



<li><a href="#8-automated-offsite-backup-engine-kopia--rclone">8. Automated Offsite Backup Engine (Kopia + Rclone)</a></li>



<li><a href="#9-system-verification--health-checks">9. System Verification &amp; Health Checks</a></li>



<li><a href="#10-local-domain-routing-adguard-home-nginx-proxy-manager-integration">10. Local Domain Routing (AdGuard Home &amp; Nginx Proxy Manager Integration)</a></li>
</ul>



<h2 id="1-hardware-prerequisites" class="wp-block-heading">1. Hardware &amp; Prerequisites</h2>



<p class="wp-block-paragraph">Before starting, ensure you have the following hardware:</p>



<ul class="wp-block-list">
<li><strong>Single Board Computer</strong>: Raspberry Pi 5 (8GB RAM recommended).</li>



<li><strong>Storage</strong>: High-speed A2-rated MicroSD card (64GB+) or NVMe M.2 SSD with PCIe HAT.</li>



<li><strong>Power Supply</strong>: Official 27W USB-C Power Supply.</li>



<li><strong>Network Connection</strong>: Ethernet cable connected directly to your primary router.</li>
</ul>



<h2 id="2-microsd-preparation-with-raspberry-pi-imager" class="wp-block-heading">2. MicroSD Preparation with Raspberry Pi Imager</h2>



<p class="wp-block-paragraph">We will flash <strong>Raspberry Pi OS (64-bit)</strong> using the official <a href="https://www.raspberrypi.com/software/">Raspberry Pi Imager</a> to pre-configure SSH and user credentials headlessly.</p>



<ol class="wp-block-list">
<li><strong>Download &amp; Install</strong>: Download Raspberry Pi Imager from the official website.</li>



<li><strong>Select Device &amp; OS</strong>:</li>
</ol>



<ul class="wp-block-list">
<li><strong>Device</strong>: Raspberry Pi 5</li>



<li><strong>OS</strong>: Raspberry Pi OS (64-bit) (Debian Bookworm)</li>



<li><strong>Storage</strong>: Select your inserted MicroSD card.</li>
</ul>



<ol start="3" class="wp-block-list">
<li><strong>Configure OS Customization Settings</strong>:</li>
</ol>



<ul class="wp-block-list">
<li>Click <strong>EDIT SETTINGS</strong>:</li>



<li><strong>General Tab</strong>:
<ul class="wp-block-list">
<li>Set hostname: <code>Raspberry-PI5</code></li>



<li>Set username: <code>kenshiro</code></li>



<li>Set password: <em>(Enter a secure password)</em></li>



<li>Configure Wireless LAN (optional, Ethernet preferred).</li>



<li>Set Locale Settings (Time zone and Keyboard layout).</li>
</ul>
</li>



<li><strong>Services Tab</strong>:
<ul class="wp-block-list">
<li>Check <strong>Enable SSH</strong> → Select <strong>Use password authentication</strong>.</li>
</ul>
</li>



<li>Click <strong>SAVE</strong> and proceed to flash the MicroSD card.</li>
</ul>



<h2 id="3-initial-system-setup-network-discovery" class="wp-block-heading">3. Initial System Setup &amp; Network Discovery</h2>



<p class="wp-block-paragraph">Insert the MicroSD card into your Raspberry Pi 5, attach the Ethernet cable, and power it on.</p>



<h3 id="step-3-1-locating-your-raspberry-pi-s-local" class="wp-block-heading">Step 3.1: Locating Your Raspberry Pi&#8217;s Local IP Address</h3>



<p class="wp-block-paragraph">Before establishing the first SSH connection, locate the local IPv4 address assigned to your Raspberry Pi by your router&#8217;s DHCP server:</p>



<ul class="wp-block-list">
<li><strong>Method 1: Router Admin Interface (Recommended)</strong>:<br />Log in to your router&#8217;s web interface (e.g., <code>http://192.168.1.1</code>). Navigate to <strong>Connected Devices</strong> or <strong>DHCP Client List</strong> and locate the device named <code>Raspberry-PI5</code>.</li>



<li><strong>Method 2: Hostname Resolution (mDNS)</strong>:<br />On macOS, Linux, or Windows (with Bonjour/mDNS enabled), open your terminal and ping the hostname directly:</li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>ping Raspberry-PI5.local</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">ping</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Raspberry</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">PI5</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">local</span></span></code></pre></div>



<ul class="wp-block-list">
<li><strong>Method 3: Network Scanning</strong>:<br />Use a mobile network scanner app (e.g., Fing) or run a command-line utility on your local network:</li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>arp -a | grep -i "Raspberry"</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">arp</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">a</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">|</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">grep</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">i</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">Raspberry</span><span style="color: #ECEFF4">&quot;</span></span></code></pre></div>



<h3 id="step-3-2-connect-via-ssh" class="wp-block-heading">Step 3.2: Connect via SSH</h3>



<p class="wp-block-paragraph">Once you have retrieved the IP address (e.g., <code>192.168.1.118</code>), connect via SSH using the username <code>kenshiro</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>ssh kenshiro@192.168.1.118</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">ssh</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kenshiro</span><span style="color: #D8DEE9FF">@</span><span style="color: #B48EAD">192.168</span><span style="color: #ECEFF4">.</span><span style="color: #B48EAD">1.118</span></span></code></pre></div>



<p class="wp-block-paragraph">Or using mDNS hostname</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>ssh kenshiro@Raspberry-PI5.local</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">ssh</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kenshiro</span><span style="color: #D8DEE9FF">@</span><span style="color: #D8DEE9">Raspberry</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">PI5</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">local</span></span></code></pre></div>



<h3 id="step-3-3-system-update-directory-workspace" class="wp-block-heading">Step 3.3: System Update &amp; Directory Workspace</h3>



<p class="wp-block-paragraph">Perform a full upgrade of Debian packages and establish a clean <code>/opt</code> workspace structure:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># Update system packages
sudo apt update &amp;&amp; sudo apt full-upgrade -y
sudo apt autoremove -y

# Create stack and application volume directories
sudo mkdir -p /opt/stacks/{adguard,wireguard,nginxproxymanager,portainer,filebrowser,homepage}
sudo mkdir -p /opt/{adguard/conf,adguard/work,filebrowser,portainer/data}
sudo chown -R kenshiro:kenshiro /opt/stacks /opt/adguard /opt/filebrowser /opt/portainer</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Update</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">system</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">packages</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">apt</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">update</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">apt</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">full</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">upgrade</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">y</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">apt</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">autoremove</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">y</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Create</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">stack</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">and</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">application</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">volume</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">directories</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">mkdir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">p</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #ECEFF4">{</span><span style="color: #D8DEE9">adguard</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">wireguard</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">nginxproxymanager</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">portainer</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">homepage</span><span style="color: #ECEFF4">}</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">mkdir</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">p</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #ECEFF4">{</span><span style="color: #D8DEE9">adguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">conf</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">adguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">work</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">,</span><span style="color: #D8DEE9">portainer</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">data</span><span style="color: #ECEFF4">}</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">chown</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">R</span><span style="color: #D8DEE9FF"> kenshiro</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">kenshiro</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguard</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">portainer</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="4-docker-docker-compose-installation" class="wp-block-heading">4. Docker &amp; Docker Compose Installation</h2>



<p class="wp-block-paragraph">Install Docker Engine using the official installation script:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># Download and run official Docker installer
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add user 'kenshiro' to docker group to run containers without sudo
sudo usermod -aG docker kenshiro

# Enable and start Docker service
sudo systemctl enable --now docker

# Remove installation script
rm get-docker.sh</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Download</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">and</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">run</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">official</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">installer</span></span>
<span class="line"><span style="color: #D8DEE9">curl</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">fsSL</span><span style="color: #D8DEE9FF"> https</span><span style="color: #ECEFF4">:</span><span style="color: #616E88">//get.docker.com -o get-docker.sh</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">sh</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">get</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">docker</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">sh</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Add</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">user</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">kenshiro</span><span style="color: #ECEFF4">&#39;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">to</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">group</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">to</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">run</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">containers</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">without</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">sudo</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">usermod</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">aG</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kenshiro</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Enable</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">and</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">start</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">service</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">systemctl</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">enable</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">now</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Remove</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">installation</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">script</span></span>
<span class="line"><span style="color: #D8DEE9">rm</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">get</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">docker</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">sh</span></span></code></pre></div>



<p class="wp-block-paragraph"><em>Verification:</em> Log out and reconnect via SSH, then verify Docker and Compose:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>docker --version
docker compose version</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">version</span></span>
<span class="line"><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">version</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="5-deploying-adguard-home-dns-ad-blocking" class="wp-block-heading">5. Deploying AdGuard Home (DNS &amp; Ad-Blocking)</h2>



<p class="wp-block-paragraph">AdGuard Home is deployed first so that local DNS filtering and custom domain rewrites are active before delegating router DNS traffic.</p>



<h3 id="step-5-1-create-docker-compose-configuration" class="wp-block-heading">Step 5.1: Create Docker Compose Configuration</h3>



<p class="wp-block-paragraph">Create <code>/opt/stacks/adguard/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  adguardhome:
    image: adguard/adguardhome:latest
    container_name: adguardhome
    restart: unless-stopped
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8080:8080/tcp" # Web UI mapped to 8080 (frees Port 3000 for Homepage)
    volumes:
      - /opt/adguard/work:/opt/adguardhome/work
      - /opt/adguard/conf:/opt/adguardhome/conf</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  adguardhome</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">adguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">adguardhome</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">latest</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">adguardhome</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    ports</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">53:53/tcp</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">53:53/udp</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">8080:8080/tcp</span><span style="color: #ECEFF4">&quot;</span><span style="color: #D8DEE9FF"> # </span><span style="color: #D8DEE9">Web</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">UI</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">mapped</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">to</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">8080</span><span style="color: #D8DEE9FF"> (</span><span style="color: #D8DEE9">frees</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Port</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">3000</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">for</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Homepage</span><span style="color: #D8DEE9FF">)</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">work</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguardhome</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">work</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">conf</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguardhome</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">conf</span></span></code></pre></div>



<h3 id="step-5-2-start-adguard-home" class="wp-block-heading">Step 5.2: Start AdGuard Home</h3>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>cd /opt/stacks/adguard &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">adguard</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<h3 id="step-5-3-web-setup-dns-rewrites" class="wp-block-heading">Step 5.3: Web Setup &amp; DNS Rewrites</h3>



<ul class="wp-block-list">
<li>Navigate to <code><a href="http://192.168.1.118:8080">http://192.168.1.118:8080</a></code> in your web browser.</li>



<li>Complete the setup wizard (set admin web port to <code><strong>8080</strong></code>).</li>



<li><strong>Configure DNS Rewrites</strong>:<br />Go to <strong>Filters</strong> -&gt; <strong>DNS Rewrites</strong> and add:
<ul class="wp-block-list">
<li><code>files.home</code> → <code>192.168.1.118</code> *(Local subdomain routing, see at the end).</li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="6-router-configuration-networking" class="wp-block-heading">6. Router Configuration &amp; Networking</h2>



<p class="wp-block-paragraph">With AdGuard Home active, configure your primary router (<code>192.168.1.1</code>) to delegate all DNS queries to the Raspberry Pi.</p>



<h4 id="how-to-find-your-raspberry-pi-s-ipv6-address" class="wp-block-heading">How to Find Your Raspberry Pi&#8217;s IPv6 Address</h4>



<ul class="wp-block-list">
<li><strong>Method 1: Via Terminal (Recommended)</strong>:<br />Run the following command on the Raspberry Pi:</li>
</ul>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>ip -6 addr show dev eth0</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">ip</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #B48EAD">6</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">addr</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">show</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">dev</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">eth0</span></span></code></pre></div>



<p class="wp-block-paragraph">Output snippet:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>inet6 2a02:1210:2033:2d00:8ba2:9efe:fe96:f29e/64 scope global dynamic
inet6 fe80::8ba2:9efe:fe96:f29e/64 scope link</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">inet6</span><span style="color: #D8DEE9FF"> 2a02</span><span style="color: #ECEFF4">:</span><span style="color: #B48EAD">1210</span><span style="color: #D8DEE9FF">:</span><span style="color: #B48EAD">2033</span><span style="color: #D8DEE9FF">:2d00</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">8ba2</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">9efe</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">fe96</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">f29e</span><span style="color: #81A1C1">/</span><span style="color: #B48EAD">64</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">scope</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">global</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">dynamic</span></span>
<span class="line"><span style="color: #D8DEE9">inet6</span><span style="color: #D8DEE9FF"> fe80</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">:8ba2</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">9efe</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF">fe96</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">f29e</span><span style="color: #81A1C1">/</span><span style="color: #B48EAD">64</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">scope</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">link</span></span></code></pre></div>



<ul class="wp-block-list">
<li><strong>Global Unicast Address (<code>2a02:...</code> or <code>2001:...</code>)</strong>: Public IPv6 assigned dynamically by your ISP.</li>



<li><strong>Link-Local Address (<code>fe80::...</code>)</strong>: Static local IPv6 address. <strong>Recommended for router setup</strong> because it never changes, even if your ISP updates your public IPv6 prefix.</li>



<li><em>Quick alternative:</em> Run <code>hostname -I</code> to view all assigned IPs simultaneously.</li>
</ul>



<ul class="wp-block-list">
<li><strong>Method 2: Via AdGuard Home Web UI</strong>:
<ul class="wp-block-list">
<li>Open <code><a href="http://192.168.1.118:8080">http://192.168.1.118:8080</a></code>, navigate to <strong>Setup Guide</strong>, and locate the detected IPv4 and IPv6 addresses.</li>
</ul>
</li>
</ul>



<h3 id="router-configuration-steps" class="wp-block-heading">Router Configuration Steps</h3>



<ul class="wp-block-list">
<li><strong>Static IP Reservation</strong>:
<ul class="wp-block-list">
<li>Assign a fixed IPv4 address to your Raspberry Pi 5 MAC address (<code>192.168.1.118</code>).</li>
</ul>
</li>



<li><strong>Router DNS Delegation (IPv4 &amp; IPv6)</strong>:
<ul class="wp-block-list">
<li><strong>Primary IPv4 DNS</strong>: Set to <code>192.168.1.118</code>.</li>



<li><strong>Primary IPv6 DNS (DHCPv6)</strong>: Set &#8220;DNS Server IPv6 notified through DHCPv6&#8221; to your Raspberry Pi&#8217;s Link-Local address (<code>fe80::8aa2:9efe:fe96:f29e</code>).</li>



<li><em>Why IPv6 DNS is critical:</em> Notifying AdGuard&#8217;s IPv6 address ensures all network devices resolve DNS via AdGuard regardless of connection protocol.</li>
</ul>
</li>



<li><strong>Port Forwarding (Remote Access via WireGuard)</strong>:
<ul class="wp-block-list">
<li><strong>WireGuard VPN</strong>: Forward External UDP Port <code>51820</code> → <code>192.168.1.118:51820</code>.</li>



<li><strong>Ports 80 &amp; 443 (HTTP/HTTPS)</strong>: <strong>Keep ports 80 and 443 closed to the Internet.</strong> Following a &#8220;VPN-First&#8221; security architecture, Nginx Proxy Manager handles reverse proxying internally. Remote access to web services is securely tunneled through WireGuard, keeping your server hidden from public port scanners.</li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="7-deploying-core-infrastructure-services" class="wp-block-heading">7. Deploying Core Infrastructure Services</h2>



<h3 id="wireguard-wireguard-ui-secure-remote-access" class="wp-block-heading">WireGuard &amp; WireGuard-UI (Secure Remote Access)</h3>



<p class="wp-block-paragraph">Create <code>/opt/stacks/wireguard/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  wireguard-ui:
    image: ngoduykhanh/wireguard-ui:latest
    container_name: wireguard-ui
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    network_mode: host
    environment:
      - WGUI_SERVER_POST_UP_SCRIPT=iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
      - WGUI_SERVER_POST_DOWN_SCRIPT=iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
    volumes:
      - /opt/wireguard/db:/app/db
      - /etc/wireguard:/etc/wireguard</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #D8DEE9">wireguard</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">ui</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">ngoduykhanh</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">wireguard</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">ui</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">latest</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">wireguard</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">ui</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    cap_add</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">NET_ADMIN</span></span>
<span class="line"><span style="color: #D8DEE9FF">    network_mode</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">host</span></span>
<span class="line"><span style="color: #D8DEE9FF">    environment</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">WGUI_SERVER_POST_UP_SCRIPT</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">iptables</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">A</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">FORWARD</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">i</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">wg0</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">j</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">ACCEPT</span><span style="color: #81A1C1">;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">iptables</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">t</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">nat</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">A</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">POSTROUTING</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">o</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">eth0</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">j</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">MASQUERADE</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">WGUI_SERVER_POST_DOWN_SCRIPT</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">iptables</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">D</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">FORWARD</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">i</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">wg0</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">j</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">ACCEPT</span><span style="color: #81A1C1">;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">iptables</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">t</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">nat</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">D</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">POSTROUTING</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">o</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">eth0</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">j</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">MASQUERADE</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">wireguard</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">db</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">app</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">db</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">etc</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">wireguard</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">etc</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">wireguard</span></span></code></pre></div>



<p class="wp-block-paragraph">Start WireGuard-UI:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>cd /opt/stacks/wireguard &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">wireguard</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 id="nginx-proxy-manager-reverse-proxy" class="wp-block-heading">Nginx Proxy Manager (Reverse Proxy)</h3>



<p class="wp-block-paragraph">Create <code>/opt/stacks/nginxproxymanager/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    container_name: nginxproxymanager
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - /opt/nginxproxymanager/data:/data
      - /opt/nginxproxymanager/letsencrypt:/etc/letsencrypt</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  app</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">jc21/nginx-proxy-manager:latest</span><span style="color: #ECEFF4">&#39;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">nginxproxymanager</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    ports</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">80:80</span><span style="color: #ECEFF4">&#39;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">81:81</span><span style="color: #ECEFF4">&#39;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;</span><span style="color: #A3BE8C">443:443</span><span style="color: #ECEFF4">&#39;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">nginxproxymanager</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">data</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">data</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">nginxproxymanager</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">letsencrypt</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">etc</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">letsencrypt</span></span></code></pre></div>



<p class="wp-block-paragraph">Start Nginx Proxy Manager:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>cd /opt/stacks/nginxproxymanager &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">nginxproxymanager</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 id="portainer-ce-container-management" class="wp-block-heading">Portainer CE (Container Management)</h3>



<p class="wp-block-paragraph">Create <code>/opt/stacks/portainer/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    ports:
      - "9000:9000"
      - "9443:9443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /opt/portainer/data:/data</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  portainer</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">portainer</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">portainer</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF">ce</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">latest</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">portainer</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    security_opt</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">no</span><span style="color: #81A1C1">-new-</span><span style="color: #D8DEE9FF">privileges</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">true</span></span>
<span class="line"><span style="color: #D8DEE9FF">    ports</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">9000:9000</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">9443:9443</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/var</span><span style="color: #D8DEE9FF">/</span><span style="color: #D8DEE9">run</span><span style="color: #D8DEE9FF">/docker.sock</span><span style="color: #81A1C1">:</span><span style="color: #D8DEE9FF">/var/run/docker</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9FF">sock</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">portainer</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">data</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">data</span></span></code></pre></div>



<p class="wp-block-paragraph">Start Portainer:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>cd /opt/stacks/portainer &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">portainer</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 id="filebrowser-full-filesystem-scope" class="wp-block-heading">Filebrowser (Full Filesystem Scope)</h3>



<p class="wp-block-paragraph">To grant Filebrowser full access to host system directories (<code>/opt</code>, <code>/etc</code>, <code>/home</code>), run the container with root permissions (<code>user: "0:0"</code>), map root <code>/</code> to <code>/srv</code>, and explicitly specify the listening address <code>--address 0.0.0.0</code>.</p>



<p class="wp-block-paragraph">Create <code>/opt/stacks/filebrowser/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    restart: unless-stopped
    user: "0:0"
    ports:
      - "8082:80"
    volumes:
      - /:/srv
      - /opt/filebrowser/filebrowser.db:/database/filebrowser.db
    command: --address 0.0.0.0 --port 80 --database /database/filebrowser.db --root /srv</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  filebrowser</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">filebrowser</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">filebrowser</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">latest</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">filebrowser</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    user</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">0:0</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    ports</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">8082:80</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">srv</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">db</span><span style="color: #D8DEE9FF">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">database</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">db</span></span>
<span class="line"><span style="color: #D8DEE9FF">    command</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">address</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">0.0</span><span style="color: #ECEFF4">.</span><span style="color: #B48EAD">0.0</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">port</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">80</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">database</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">database</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">db</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">root</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">srv</span></span></code></pre></div>



<p class="wp-block-paragraph">Initialize the database file and start Filebrowser:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo touch /opt/filebrowser/filebrowser.db
cd /opt/stacks/filebrowser &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">touch</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">db</span></span>
<span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">filebrowser</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 id="homepage-unified-application-dashboard" class="wp-block-heading">Homepage (Unified Application Dashboard)</h3>



<p class="wp-block-paragraph">Create <code>/opt/stacks/homepage/docker-compose.yml</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>services:
  homepage:
    image: ghcr.io/gethomepage/homepage:latest
    container_name: homepage
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - /opt/homepage/config:/app/config
      - /var/run/docker.sock:/var/run/docker.sock:ro</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">services</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">  homepage</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">    image</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">ghcr</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">io</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">gethomepage</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">homepage</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9">latest</span></span>
<span class="line"><span style="color: #D8DEE9FF">    container_name</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">homepage</span></span>
<span class="line"><span style="color: #D8DEE9FF">    restart</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">unless</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">stopped</span></span>
<span class="line"><span style="color: #D8DEE9FF">    ports</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">3000:3000</span><span style="color: #ECEFF4">&quot;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    volumes</span><span style="color: #ECEFF4">:</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">homepage</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9FF">config</span><span style="color: #ECEFF4">:</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">app</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">config</span></span>
<span class="line"><span style="color: #D8DEE9FF">      </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/var</span><span style="color: #D8DEE9FF">/</span><span style="color: #D8DEE9">run</span><span style="color: #D8DEE9FF">/docker.sock</span><span style="color: #81A1C1">:</span><span style="color: #D8DEE9FF">/var/run/docker</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9FF">sock</span><span style="color: #81A1C1">:</span><span style="color: #D8DEE9FF">ro</span></span></code></pre></div>



<p class="wp-block-paragraph">Start Homepage:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>cd /opt/stacks/homepage &amp;&amp; docker compose up -d</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">cd</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">stacks</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">homepage</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">&amp;&amp;</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">compose</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">up</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">d</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="8-automated-offsite-backup-engine-kopia-rclone" class="wp-block-heading">8. Automated Offsite Backup Engine (Kopia + Rclone)</h2>



<p class="wp-block-paragraph">To back up host directories (<code>/opt</code>, <code>/etc</code>, <code>/home/kenshiro</code>) securely to Google Drive, we run an <strong>Rclone WebDAV bridge</strong> paired with <strong>Kopia Server</strong>.</p>



<h3 id="step-8-1-configure-rclone-remote" class="wp-block-heading">Step 8.1: Configure Rclone Remote</h3>



<pre class="wp-block-code"><code>rclone config
# Name: gdrive
# Storage: Google Drive
# Complete interactive OAuth token authorization flow</code></pre>



<h3 id="step-8-2-systemd-unit-for-rclone-webdav-server" class="wp-block-heading">Step 8.2: Systemd Unit for Rclone WebDAV Server</h3>



<p class="wp-block-paragraph">Create <code>/etc/systemd/system/rclone-kopia.service</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&#91;Unit&#93;
Description=Rclone WebDAV Bridge for Kopia Backup
After=network-online.target
Wants=network-online.target

&#91;Service&#93;
Type=simple
User=kenshiro
ExecStart=/usr/bin/rclone serve webdav gdrive: --addr 127.0.0.1:8085 --config /home/kenshiro/.config/rclone/rclone.conf --vfs-cache-mode full
Restart=always
RestartSec=10

&#91;Install&#93;
WantedBy=multi-user.target</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Unit</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">Description</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">Rclone</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">WebDAV</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Bridge</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">for</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Kopia</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Backup</span></span>
<span class="line"><span style="color: #D8DEE9">After</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">network</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">online</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">target</span></span>
<span class="line"><span style="color: #D8DEE9">Wants</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">network</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">online</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">target</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Service</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">Type</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">simple</span></span>
<span class="line"><span style="color: #D8DEE9">User</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">kenshiro</span></span>
<span class="line"><span style="color: #D8DEE9">ExecStart</span><span style="color: #81A1C1">=/</span><span style="color: #D8DEE9">usr</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">bin</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">rclone</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">serve</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">webdav</span><span style="color: #D8DEE9FF"> gdrive</span><span style="color: #ECEFF4">:</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">addr</span><span style="color: #D8DEE9FF"> </span><span style="color: #B48EAD">127.0</span><span style="color: #ECEFF4">.</span><span style="color: #B48EAD">0.1</span><span style="color: #D8DEE9FF">:</span><span style="color: #B48EAD">8085</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">config</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">home</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">kenshiro</span><span style="color: #81A1C1">/</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">config</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">rclone</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">rclone</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">conf</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">vfs</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">cache</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">mode</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">full</span></span>
<span class="line"><span style="color: #D8DEE9">Restart</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">always</span></span>
<span class="line"><span style="color: #D8DEE9">RestartSec</span><span style="color: #81A1C1">=</span><span style="color: #B48EAD">10</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Install</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">WantedBy</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">multi</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">user</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">target</span></span></code></pre></div>



<p class="wp-block-paragraph">Enable and start the service:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl daemon-reload
sudo systemctl enable --now rclone-kopia</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">systemctl</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">daemon</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">reload</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">systemctl</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">enable</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">now</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">rclone</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">kopia</span></span></code></pre></div>



<h3 id="step-8-3-systemd-unit-for-kopia-daemon" class="wp-block-heading">Step 8.3: Systemd Unit for Kopia Daemon</h3>



<p class="wp-block-paragraph">Create <code>/etc/systemd/system/kopia-server.service</code>:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&#91;Unit&#93;
Description=Kopia Backup Daemon
After=network-online.target rclone-kopia.service
Wants=rclone-kopia.service

&#91;Service&#93;
Type=simple
User=root
ExecStart=/usr/bin/kopia server start --insecure
Restart=always
RestartSec=10

&#91;Install&#93;
WantedBy=multi-user.target</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Unit</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">Description</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">Kopia</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Backup</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">Daemon</span></span>
<span class="line"><span style="color: #D8DEE9">After</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">network</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">online</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">target</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">rclone</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">kopia</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">service</span></span>
<span class="line"><span style="color: #D8DEE9">Wants</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">rclone</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">kopia</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">service</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Service</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">Type</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">simple</span></span>
<span class="line"><span style="color: #D8DEE9">User</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">root</span></span>
<span class="line"><span style="color: #D8DEE9">ExecStart</span><span style="color: #81A1C1">=/</span><span style="color: #D8DEE9">usr</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">bin</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">kopia</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">server</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">start</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">insecure</span></span>
<span class="line"><span style="color: #D8DEE9">Restart</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">always</span></span>
<span class="line"><span style="color: #D8DEE9">RestartSec</span><span style="color: #81A1C1">=</span><span style="color: #B48EAD">10</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF">&#91;</span><span style="color: #D8DEE9">Install</span><span style="color: #D8DEE9FF">&#93;</span></span>
<span class="line"><span style="color: #D8DEE9">WantedBy</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9">multi</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">user</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">target</span></span></code></pre></div>



<p class="wp-block-paragraph">Enable and start Kopia Server:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>sudo systemctl daemon-reload
sudo systemctl enable --now kopia-server</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">systemctl</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">daemon</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">reload</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">systemctl</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">enable</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">now</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kopia</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">server</span></span></code></pre></div>



<h3 id="step-8-4-set-retention-automated-backup-schedules" class="wp-block-heading">Step 8.4: Set Retention &amp; Automated Backup Schedules</h3>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly># Set weekly backup policy for target host directories
sudo kopia policy set /opt /etc /home/kenshiro --snapshot-interval=168h --keep-weekly=4 --keep-monthly=12

# Trigger initial manual backup snapshot
sudo kopia snapshot create /opt /etc /home/kenshiro</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Set</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">weekly</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">backup</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">policy</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">for</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">target</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">host</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">directories</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kopia</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">policy</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">set</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">etc</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">home</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">kenshiro</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">snapshot</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">interval</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF">168</span><span style="color: #D8DEE9">h</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">keep</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">weekly</span><span style="color: #81A1C1">=</span><span style="color: #B48EAD">4</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">keep</span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">monthly</span><span style="color: #81A1C1">=</span><span style="color: #B48EAD">12</span></span>
<span class="line"></span>
<span class="line"><span style="color: #D8DEE9FF"># </span><span style="color: #D8DEE9">Trigger</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">initial</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">manual</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">backup</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">snapshot</span></span>
<span class="line"><span style="color: #D8DEE9">sudo</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">kopia</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">snapshot</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">create</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">opt</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">etc</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">home</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">kenshiro</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="9-system-verification-health-checks" class="wp-block-heading">9. System Verification &amp; Health Checks</h2>



<p class="wp-block-paragraph">Verify all endpoints and active service ports on your home server:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td>Service</td><td>Protocol/Address</td><td>Local Gateway Port</td><td>Purpose</td></tr><tr><td>Nginx</td><td>http://192.168.1.118:81</td><td>81</td><td>Reverse Proxy Router</td></tr><tr><td>AdGuard</td><td>http://192.168.1.118:8080</td><td>53 / 8080</td><td>DNS Filtering &amp; Local Rewrites</td></tr><tr><td>Portainer</td><td>http://192.168.1.118:9000</td><td>9000</td><td>Docker Web Interface</td></tr><tr><td>Filebrowser</td><td>http://192.168.1.118:8082</td><td>8082</td><td>File Manager</td></tr><tr><td>Homepage Dashboard</td><td>http://192.168.1.118:3000</td><td>3000</td><td>Unified UI Portal</td></tr><tr><td>Rclone</td><td>http://127.0.0.1:8085</td><td>8085</td><td>Cloud Backup Transport</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Check container health at any time using:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">docker</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">ps</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">--</span><span style="color: #D8DEE9">format</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">table {{.Names}}</span><span style="color: #EBCB8B">\t</span><span style="color: #A3BE8C">{{.Status}}</span><span style="color: #EBCB8B">\t</span><span style="color: #A3BE8C">{{.Ports}}</span><span style="color: #ECEFF4">&quot;</span></span></code></pre></div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 id="10-local-domain-routing-adguard-home-nginx-proxy-manager-integration" class="wp-block-heading">10. Local Domain Routing (AdGuard Home &amp; Nginx Proxy Manager Integration)</h2>



<p class="wp-block-paragraph">To access your containerized services using friendly custom domain names (such as <code>files.home</code> or <code>portainer.home</code>) instead of remembering IP addresses and port numbers (<code>192.168.1.118:8082</code>), <strong>AdGuard Home</strong> and <strong>Nginx Proxy Manager</strong> work in tandem:</p>



<ol class="wp-block-list">
<li><strong>AdGuard Home (DNS Level)</strong>: Intercepts local domain requests (e.g., <code>files.home</code>) and resolves them to the Raspberry Pi&#8217;s local IP address (<code>192.168.1.118</code>).</li>



<li><strong>Nginx Proxy Manager (Application Level)</strong>: Listens on HTTP port <code>80</code>, inspects the incoming host header (<code>files.home</code>), and reverse-proxies the traffic to the designated container&#8217;s port (e.g., <code>8082</code>).</li>
</ol>



<h3 id="step-1-create-dns-rewrites-in-adguard-home" class="wp-block-heading">Step 1: Create DNS Rewrites in AdGuard Home</h3>



<ul class="wp-block-list">
<li>Access the <strong>AdGuard Home</strong> web dashboard at <code><a href="http://192.168.1.118:8080">http://192.168.1.118:8080</a></code>.</li>



<li>Navigate to <strong>Filters</strong> → <strong>DNS Rewrites</strong>.</li>



<li>Click <strong>Add DNS rewrite</strong> and enter:
<ul class="wp-block-list">
<li><strong>Domain Name</strong>: <code>files.home</code> (or a wildcard rule like <code>*.home</code> to route all local subdomains).</li>



<li><strong>IP Address</strong>: <code>192.168.1.118</code></li>
</ul>
</li>



<li>Click <strong>Save</strong>.</li>
</ul>



<h3 id="step-2-configure-proxy-hosts-in-nginx-proxy-manager" class="wp-block-heading">Step 2: Configure Proxy Hosts in Nginx Proxy Manager</h3>



<ul class="wp-block-list">
<li>Access <strong>Nginx Proxy Manager</strong> at <code><a href="http://192.168.1.118:81">http://192.168.1.118:81</a></code>.</li>



<li>Log in using your administrator credentials.</li>



<li>Go to <strong>Hosts</strong> → <strong>Proxy Hosts</strong> and click <strong>Add Proxy Host</strong>.</li>



<li>In the <strong>Details</strong> tab, configure:
<ul class="wp-block-list">
<li><strong>Domain Names</strong>: <code>files.home</code> <em>(press Enter after typing)</em></li>



<li><strong>Scheme</strong>: <code>http</code></li>



<li><strong>Forward Hostname / IP</strong>: <code>192.168.1.118</code></li>



<li><strong>Forward Port</strong>: <code>8082</code> <em>(Filebrowser host port)</em></li>



<li>Check <strong>Block Common Exploits</strong>.</li>



<li>Check <strong>Websockets Support</strong> <em>(required for live file upload/download in Filebrowser)</em>.</li>
</ul>
</li>



<li>Click <strong>Save</strong>.</li>
</ul>



<h3 id="step-3-verification" class="wp-block-heading">Step 3: Verification</h3>



<p class="wp-block-paragraph">Open a new browser tab and navigate to <code><a href="http://files.home">http://files.home</a></code>. You will be seamlessly routed to Filebrowser without entering port <code>:8082</code>.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2026/10/14/building-an-all-in-one-home-server-on-raspberry-pi-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Android: pipe(&#8220;&#124;&#8221;) and ProcessBuilder</title>
		<link>https://blog.sephiroth.it/2022/10/22/android-pipe-and-processbuilder/</link>
					<comments>https://blog.sephiroth.it/2022/10/22/android-pipe-and-processbuilder/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 22 Oct 2022 12:32:03 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[kotlin]]></category>
		<guid isPermaLink="false">https://blog.sephiroth.it/?p=1856</guid>

					<description><![CDATA[How to implement a pipe between processes in android using kotlin.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As of today there&#8217;s no public implementation of the java <a rel="noreferrer noopener" href="https://docs.oracle.com/javase/9/docs/api/java/lang/ProcessBuilder.html#startPipeline-java.util.List-" target="_blank">ProcessBuilder.startPipeline</a> in Android.</p>



<p class="wp-block-paragraph">So I came out with this quick solution, using <strong>Kotlin</strong>, to pipe multiple processes in Android:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="kotlin" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">object ProcessUtil {
    private fun check(process: Process, error: (() -> String)) {
        try {
            if (process.errorStream.available() > 0) {
                process.errorStream.bufferedReader().use {
                    it.readText().also { errorText ->
                        check(errorText.isBlank()) { "${error.invoke()} failed with error: $errorText" }
                    }
                }
            }
        } catch (_: IOException) {
            // ignore
        }
    }

    @Throws(IOException::class, IllegalStateException::class)
    fun pipe(vararg processes: ProcessBuilder): String {
        check(processes.size > 1) { "At least 2 processes are required" }

        var previous: Process? = null
        var result: String = ""

        processes.forEachIndexed { index, builder ->
            val cmdString = builder.command().joinToString(" ")
            println("Executing command $index -> $cmdString")

            if (index > 0) {
                check(builder.redirectInput() == Redirect.PIPE) { "Builder redirectInput must be PIPE except for the first builder" }
            } else if (index &lt; processes.size - 1) {
                check(builder.redirectOutput() == Redirect.PIPE) { "Builder redirectOutput must be PIPE except for the last builder" }
            }

            val current: Process = builder.start()
            check(current) { cmdString }

            previous?.let { prevProcess ->
                prevProcess.inputStream.bufferedReader().use { reader ->
                    current.outputStream.bufferedWriter().use { writer ->
                        reader.readLines().forEach { line ->
                            println("writing --> $line")
                            writer.write(line)
                            writer.newLine()
                        }
                        check(current) { cmdString }

                    } // writer

                    if (index == processes.size - 1) {
                        current.inputStream.bufferedReader().use { reader2 ->
                            result = reader2.readText()
                        }
                    }

                } // reader
            }
            previous = current
        }
        return result
    }

    fun pipe(vararg commands: List&lt;String>) = pipe(*commands.map { ProcessBuilder(it) }.toTypedArray())

    fun pipe(vararg commands: String) = pipe(*commands.map { ProcessBuilder(it) }.toTypedArray())
}</pre>



<p class="wp-block-paragraph">And it can be used like this:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="kotlin" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">    @Test
    fun testPipe() {
        val packageName = context.packageName
        val result = ProcessUtil.pipe(listOf("ps", "-A"), listOf("grep", packageName), listOf("awk", "{ print $9 }"))
        println("result = '$result'")
        Assert.assertTrue(result.contains(packageName))
    }</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2022/10/22/android-pipe-and-processbuilder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Photoshop Extension: Opacity Editor</title>
		<link>https://blog.sephiroth.it/2018/09/29/photoshop-extension-opacity-editor/</link>
					<comments>https://blog.sephiroth.it/2018/09/29/photoshop-extension-opacity-editor/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 29 Sep 2018 00:16:37 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[layers]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[stack]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1739</guid>

					<description><![CDATA[Today I&#8217;d like to introduce an extension I&#8217;ve created for Adobe Photoshop: Opacity Editor. I like to take pictures, ok, I&#8217;m definitely not a professional photographer, but I still like to try to be one &#240;&#159;&#153;&#130; In particular I like to take pictures at night, I like to take pictures of moving clouds, stars.. etc. &#8230; <a href="https://blog.sephiroth.it/2018/09/29/photoshop-extension-opacity-editor/" class="more-link">Continue reading <span class="screen-reader-text">Photoshop Extension: Opacity Editor</span></a>]]></description>
										<content:encoded><![CDATA[<p>Today I&#8217;d like to introduce an extension I&#8217;ve created for <strong>Adobe Photoshop: Opacity Editor.</strong></p>
<p>I like to take pictures, ok, I&#8217;m definitely not a professional photographer, but I still like to try to be one 🙂</p>
<p>In particular I like to take pictures at night, I like to take pictures of moving clouds, stars.. etc. And then I like to stack all the photos into a single document. The problem is that most of the times this Photoshop document has hundreds, if not thousands, of layers (and we&#8217;re talking about 40MP images) and, despite the fact that photoshop can barely survive after I&#8217;ve added all those layers to the document, the real problem comes after that.. In order to create a nice stacking effect it&#8217;s not just a matter of changing the blending mode of the different layers, but also to change their opacity.</p>
<p>Unfortunately Photoshop doesn&#8217;t have an option to manage the opacity of multiple layers at the same time, like, for instance, from 0 to 100 of all the selected layers.. or even more advanced options.</p>
<p>That&#8217;s why I&#8217;ve decided to make an extension (<a href="https://www.adobeexchange.com/creativecloud.details.20327.html">available here</a>) for this. This is it&#8217;s pretty easy interface:</p>
<p><a href="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor.png"><img decoding="async" class="size-medium wp-image-1740 alignnone" src="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-300x233.png" alt="" width="300" height="233" srcset="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-300x233.png 300w, https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-522x406.png 522w, https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor.png 595w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>So basically what it does is: you select a bunch of layers in your document, then you create the bezier curve. Once you click on &#8220;Apply Opacity&#8221; the opacity of every selected layer will follow the designed curve value. Let&#8217;s make it easier. If you design a curve like this:</p>
<p><a href="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-2.png"><img decoding="async" class="size-medium wp-image-1745 alignnone" src="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-2-300x233.png" alt="" width="300" height="233" srcset="https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-2-300x233.png 300w, https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-2-522x406.png 522w, https://blog.sephiroth.it/wp-content/uploads/2018/09/opacity-editor-2.png 595w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>the first selected layer will have an opacity of 0 (completely invisible), while the last layer will have 100 as opacity. (If you&#8217;ve selected 100 layers, then the second one will have an opacity value of 1, the third of 2 and so on..)</p>
<p>These 2 images, for instance, have been created using this extension:</p>
<p>&nbsp;</p>
<table style="border-collapse: collapse; width: 100%; height: 225px;" border="0">
<tbody>
<tr style="height: 225px;">
<td style="width: 50%; height: 225px;"><a href="https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-1742" src="https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1-300x200.jpg" alt="" width="300" height="200" srcset="https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1-300x200.jpg 300w, https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1-768x513.jpg 768w, https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1-1024x684.jpg 1024w, https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1-608x406.jpg 608w, https://blog.sephiroth.it/wp-content/uploads/2018/09/Jordan-Pond-1.jpg 1600w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a></td>
<td style="width: 50%; height: 225px;">
<p><figure id="attachment_1743" aria-describedby="caption-attachment-1743" style="width: 300px" class="wp-caption aligncenter"><a href="https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB.jpg"><img loading="lazy" decoding="async" class="size-medium wp-image-1743" src="https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB-300x193.jpg" alt="" width="300" height="193" srcset="https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB-300x193.jpg 300w, https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB-768x494.jpg 768w, https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB-1024x659.jpg 1024w, https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB-631x406.jpg 631w, https://blog.sephiroth.it/wp-content/uploads/2018/09/DSC5546-Edit-2-sRGB.jpg 1600w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-1743" class="wp-caption-text">1200~ pics</figcaption></figure></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The second one is the result of 1200 layers stacked together and without that extension I would probably still working on it!</p>
<p>And here&#8217;s an example of the Extension in action:</p>
<table style="border-collapse: collapse; width: 100%;" border="0">
<tbody>
<tr>
<td style="width: 100%; text-align: center;"><iframe loading="lazy" src="//www.youtube.com/embed/jW3uDrZoIzI" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>For more information and download:<br />
<a href="https://www.adobeexchange.com/creativecloud.details.20327.html">https://www.adobeexchange.com/creativecloud.details.20327.html</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2018/09/29/photoshop-extension-opacity-editor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Why it&#8217;s hard to find Android developers</title>
		<link>https://blog.sephiroth.it/2014/09/16/why-its-hard-to-find-android-developers/</link>
					<comments>https://blog.sephiroth.it/2014/09/16/why-its-hard-to-find-android-developers/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Tue, 16 Sep 2014 07:30:41 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[new york]]></category>
		<category><![CDATA[startups]]></category>
		<category><![CDATA[tech]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1694</guid>

					<description><![CDATA[I&#8217;m an Android developer (at Aviary) and a New Yorker since&#160;late 2010. I&#8217;ve been also an actionscript and python developer for more than 10 years. I hear this every day. Your New York based company is desperately&#160;looking for an Android developer, and it&#8217;s damn hard to find one. And you know what? This is your &#8230; <a href="https://blog.sephiroth.it/2014/09/16/why-its-hard-to-find-android-developers/" class="more-link">Continue reading <span class="screen-reader-text">Why it&#8217;s hard to find Android developers</span></a>]]></description>
										<content:encoded><![CDATA[<blockquote>
<p class="p1">I&#8217;m an Android developer (at <a href="https://aviary.com/" target="_blank" rel="noopener">Aviary</a>) and a New Yorker since&nbsp;late 2010. I&#8217;ve been also an actionscript and python developer for more than 10 years.</p>
</blockquote>
<p class="p1">I hear this every day. Your New York based company is desperately&nbsp;looking for an Android developer, and it’s damn hard to find one.</p>
<p class="p1">And you know what? <strong>This is your fault</strong>. I mean you, tech startup. Yes, you.</p>
<p class="p1">Almost all the startups I know here in NYC have launched their core product for iOS first (most of the PMs I’ve spoken with have said that was because of lack of people or time).&nbsp;And then, maybe, if there&#8217;s time… they start to realize they need to have an Android version of their app. But by this point the job is not to &#8220;create” something, it’s just a “porting” job. Which, for obvious reasons, is a much less attractive job for developers, just as it would be for a PM or a designer.<span id="more-1694"></span></p>
<p class="p1">Anyway, ignoring Android at first is somewhat understandable, if you think in short terms and you’re not thinking globally.&nbsp;Here in the US, and even more in NYC, the iOS market share is still very strong: as of this past May,&nbsp;Android has 50% of the share and iOS has 42% nationwide (<a href="https://www.comscore.com/ita/Insights/Market-Rankings/comScore-Reports-May-2014-U.S.-Smartphone-Subscriber-Market-Share"><span class="s1">https://www.comscore.com/ita/Insights/Market-Rankings/comScore-Reports-May-2014-U.S.-Smartphone-Subscriber-Market-Share</span></a>).<br />
If you remove the huge number of “low end” (not profitable) devices from the Android share &#8211; as most people do &#8211; you’ll see why I said I can understand it.</p>
<p class="p1">But, that said, I don’t agree with it. Because globally, for the rest of the world, things are completely different. Android has 80% of the market share and iOS only has around 12% (<a href="http://www.idc.com/prodserv/smartphone-os-market-share.jsp"><span class="s1">http://www.idc.com/prodserv/smartphone-os-market-share.jsp</span></a>).</p>
<p class="p1"><b>Ok, I know the numbers, but why is hard to find Android developers?</b><br />
Because you are not committed to Android development.&nbsp;You just think you “have” to do that. Because at some point you realize either that you need it to go global, or because a lot of users are asking it, or just because you think that porting your app will double your users overnight.</p>
<p class="p1">But you’re not committed to doing it.</p>
<p class="p1">And when you start, most of the time it’s with a 1-to-1 porting of your iOS app, or at the very best a porting of UI created ad hoc for an iOS environment, which cannot be applied to Android (although, to your credit, you probably don’t know this because you didn&#8217;t bother hiring an Android PM or UX expert). I don’t think I even need to mention the cases where you&#8217;ve already given the initial porting to 3rd party companies&#8230;</p>
<p class="p1">Then, after all of this, you complain because the response of the Android market is not as good as you expected and the profits are not comparable to iOS. Well, I would be extremely surprised if this weren&#8217;t the case. You’re not committed to it, and you didn&#8217;t build an app that takes advantage of any of the benefits of the platform, so what do you expect?</p>
<p class="p1">(When I say committed, I mean all the departments in your company from top to bottom. You can’t say you’re committed to it just because you have an Android team. The whole company needs to acknowledge that it&#8217;s a priority.)</p>
<p class="p1"><b>Ok, but I still don’t get why it’s hard to find Android developers.</b><br />
Well, try to think from a developer&#8217;s perspective.&nbsp;Android developers don’t find it very attractive to join a company where Android will be always the 2nd choice. That’s very frustrating.</p>
<p class="p1">And as for developers who are approaching the mobile market for the first time, which platform do you think they’ll choose?&nbsp;They see all of your apps being introduced on iOS first, they see that the Android version is not as good as the iOS one, and they see you complaining about the Android market.</p>
<p class="p1"><strong>So, why should they choose Android? And why should they choose your company if they do?</strong></p>
<p class="p1">Here are some suggestions for ways that you can help:</p>
<ul class="ul1">
<li class="li1">Switch to Android (temporarily, if you want). Get to know the platform. Understand why some people prefer it. Read some articles about purchasing habits of the users. Understand the differences between ios and android. Etc.</li>
<li class="li1">Commit to Android as a platform. Talk openly at your company (and externally) about the market share, the benefits of the platform, and think about ways it can help your product &#8211; so that when an Android developer does join, he or she has some interesting projects to work on.</li>
<li class="li1">Offer a signing bonus to developers who switch to Android for your company.</li>
<li class="li1">Launch your next product on Android first (or at the same time as iOS).</li>
<li class="li1">Attend Android meetups. Speak at Android meetups! Encourage the developers you work with to do the same.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/09/16/why-its-hard-to-find-android-developers/feed/</wfw:commentRss>
			<slash:comments>50</slash:comments>
		
		
			</item>
		<item>
		<title>Android &#8211; Create a Vignette effect</title>
		<link>https://blog.sephiroth.it/2014/07/06/android-create-a-vignette-effect/</link>
					<comments>https://blog.sephiroth.it/2014/07/06/android-create-a-vignette-effect/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sun, 06 Jul 2014 03:32:17 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[radialgradient]]></category>
		<category><![CDATA[shader]]></category>
		<category><![CDATA[vignette]]></category>
		<category><![CDATA[xfermode]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1685</guid>

					<description><![CDATA[Let&#8217;s say you want to want to dynamically&#160;apply a &#8220;vignette&#8221; on an ImageView. Something like this: These are basically 4&#160;steps we need in order to accomplish the task: Create a Paint using the&#160;PorterDuff.Mode.DST_OUT as&#160;Xfermode Create a RadialGradient and assign to our Paint object as a Shader Alter the gradient matrix using the&#160;setLocalMatrix method. Use&#160;canvas.saveLayer when &#8230; <a href="https://blog.sephiroth.it/2014/07/06/android-create-a-vignette-effect/" class="more-link">Continue reading <span class="screen-reader-text">Android &#8211; Create a Vignette effect</span></a>]]></description>
										<content:encoded><![CDATA[<p>Let&#8217;s say you want to want to dynamically apply a &#8220;vignette&#8221; on an <a href="http://developer.android.com/reference/android/widget/ImageView.html">ImageView</a>.<br />
Something like this:</p>
<table style="height: 300px;" width="100%">
<tbody>
<tr>
<td><img loading="lazy" decoding="async" src="https://blog.sephiroth.it/wp-content/uploads/2014/07/Screenshot_2014-07-05-22-30-30-168x300.png" alt="Screenshot_2014-07-05-22-30-30" width="168" height="300" hspace="20" /></td>
</tr>
</tbody>
</table>
<p>These are basically 4 steps we need in order to accomplish the task:<br />
<span id="more-1685"></span></p>
<ol>
<li>Create a Paint using the <a href="http://developer.android.com/reference/android/graphics/PorterDuff.Mode.html">PorterDuff.Mode</a>.DST_OUT as Xfermode</li>
<li>Create a <a href="http://developer.android.com/reference/android/graphics/RadialGradient.html">RadialGradient</a> and assign to our Paint object as a Shader</li>
<li>Alter the gradient matrix using the setLocalMatrix method.</li>
<li>Use canvas.saveLayer when drawing</li>
</ol>
<h3>1. Paint using PorterDuff.Mode.DST_OUT</h3>
<p>This is needed in order to draw an &#8220;hole&#8221; in our back background.</p>
<pre>
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
</pre>
<h3>2. Create the RadialGradient shader:</h3>
<p>This is required in order to draw a radial gradient &#8220;hole&#8221; in our black background. Thus revealing the background image using a &#8220;vignette&#8221; filter.</p>
<pre>
final int[] colors = new int[]{0xff000000, 0xff000000, 0};
final float[] anchors = new float[]{0, 0.5f, 1};
Shader shader = new android.graphics.RadialGradient(0, 0, 1, colors, anchors, Shader.TileMode.CLAMP);
paint.setShader(shader);
</pre>
<h3>3. Alter the gradient matrix</h3>
<p>The again, in order to create a real vignette effect we need to draw a custom &#8220;oval&#8221;, otherwise the result of draw something using the radialgradient shader will result in a simple circle. Instead, if we alter its matrix we can modify its aspect ratio, giving it the oval shape:</p>
<pre>
Matrix matrix = new Matrix();
matrix.postTranslate(rect.centerX(), rect.centerY());
matrix.postScale(rect.width() / 2, rect.height() / 2, rect.centerX(), rect.centerY());
shader.setLocalMatrix(matrix);
</pre>
<h3>4. Draw on a canvas</h3>
<p>Now we need to draw our objects on a real canvas. We need to save the current layer using <a href="http://developer.android.com/reference/android/graphics/Canvas.html#saveLayer(android.graphics.RectF,%20android.graphics.Paint, int)">Canvas.saveLayer</a> because otherwise everything we previously drawn will be erased by our paint. But because we&#8217;re using saveLayer, we actually are drawing on an offscreen bitmap.</p>
<pre>
// save current status
// 'pBitmapRect' is the current Bitmap rectangle
canvas.saveLayer(pBitmapRect, mPaint, Canvas.ALL_SAVE_FLAG);
// draw the black background
canvas.drawRect(pBitmapRect, mBlackPaint);
// draw the vignette on the black background using our radial gradient
canvas.drawOval(tempRect2, mPaintShader);
canvas.restore();
</pre>
<h2>Source Code</h2>
<p>You can download the complete source code here:<br />
<a href="https://github.com/sephiroth74/vignette_demo">https://github.com/sephiroth74/vignette_demo</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/07/06/android-create-a-vignette-effect/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Floating Action Menu for Android</title>
		<link>https://blog.sephiroth.it/2014/05/25/floating-action-menu-for-android/</link>
					<comments>https://blog.sephiroth.it/2014/05/25/floating-action-menu-for-android/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sun, 25 May 2014 06:10:46 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[opensource]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1679</guid>

					<description><![CDATA[I&#8217;ve just created this simple Android library, inspired from the recent changes to the Google+ app, which introduced a floating action item to the bottom. In G+ the action item appears and disappears based on the page scrolling. In the same way I&#8217;ve created this library, with some more customization options, like the gravity and &#8230; <a href="https://blog.sephiroth.it/2014/05/25/floating-action-menu-for-android/" class="more-link">Continue reading <span class="screen-reader-text">Floating Action Menu for Android</span></a>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve just created this simple Android library, inspired from the recent changes to the Google+ app, which introduced a floating action item to the bottom. In G+ the action item appears and disappears based on the page scrolling.</p>
<p>In the same way I&#8217;ve created this library, with some more customization options, like the gravity and direction of the floating menu items.</p>
<p>Here&#8217;s a video of a sample implementation:</p>
<p><iframe loading="lazy" src="//www.youtube.com/embed/mLplXAJ5vug" width="400" height="711"></iframe></p>
<p>Source code and documentation can be find on the github project page:</p>
<p><a href="https://github.com/sephiroth74/android-floating-action-menu" target="_blank">https://github.com/sephiroth74/android-floating-action-menu</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/05/25/floating-action-menu-for-android/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>java.lang.UnsatisfiedLinkError workaround</title>
		<link>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/</link>
					<comments>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Sat, 12 Apr 2014 04:21:52 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[packagemanager]]></category>
		<category><![CDATA[UnsatisfiedLinkError]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[xperia]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1668</guid>

					<description><![CDATA[If you ever worked with native shared libraries in Android you&#8217;ve probably already faced the &#8220;java.lang.UnsatisfiedLinkError&#8221; java exception which randomly seems to happen on certain devices ( actually it&#8217;s happening on xperia phones mostly, based on my reports ). There are a bunch of bug reports in the android project like this: https://code.google.com/p/android/issues/detail?id=35962 or this &#8230; <a href="https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/" class="more-link">Continue reading <span class="screen-reader-text">java.lang.UnsatisfiedLinkError workaround</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you ever worked with native shared libraries in Android you&#8217;ve probably already faced the <strong>&#8220;java.lang.UnsatisfiedLinkError&#8221;</strong> java exception which randomly seems to happen on certain devices ( actually it&#8217;s happening on <strong>xperia</strong> phones mostly, based on my reports ).<br />
There are a bunch of bug reports in the android project like this: <a href="https://code.google.com/p/android/issues/detail?id=35962" target="_blank">https://code.google.com/p/android/issues/detail?id=35962</a> or this <a href="https://code.google.com/p/android/issues/detail?id=64111" target="_blank">https://code.google.com/p/android/issues/detail?id=64111</a>.<br />
The problem is that Google basically marked all of them as &#8220;resolved&#8221;, even if developers are still complaining about it.</p>
<p><span id="more-1668"></span></p>
<p>The fun thing is that it seems that they are aware of the problem and in fact they&#8217;re trying to use a workaround internally in the chromium source code.<br />
For instance, this is the first workaround I found:<br />
<a href="https://codereview.chromium.org/180273005/patch/80001/90003" target="_blank">https://codereview.chromium.org/180273005/patch/80001/90003</a></p>
<p>which is basically looking into the <em>&#8220;/data/app-lib/{packagename}-1/&#8221;</em> folder for the missing libraries.<br />
And in fact, inside the comments of that file you can read this:</p>
<blockquote><p><cite>Native library directory in an updated package is a symbolic link<br />
to a directory in /data/app-lib/, for example:<br />
/data/data/com.android.chrome/lib -&gt; /data/app-lib/com.android.chrome[-1].<br />
When updating the application, the PackageManager create a new directory,<br />
e.g., /data/app-lib/com.android.chrome-2, and remove the old symlink and<br />
recreate one to the new directory. However, on some devices (e.g. Sony Xperia),<br />
the old directory was deleted, but deleting the old symlink failed,<br />
and that makes system loading library from the /system/lib directory.</cite></p></blockquote>
<p>Then I noticed another approach which is probably better: <a href="http://goo.gl/cbCAmC">http://goo.gl/cbCAmC</a></p>
<p>which is basically doing what the PackageManager was supposed to do, unzip the shared libraries from the apk file to the &#8220;lib&#8221; dir of the application itself.</p>
<p>Btw, I&#8217;m gonna try both of them and verify if they actually work so I can finally stop seeing that annoying bug in the Google Play Console!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/04/12/java-lang-unsatisfiedlinkerror-workaround/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>More Picasso changes</title>
		<link>https://blog.sephiroth.it/2014/01/28/more-picasso-changes/</link>
					<comments>https://blog.sephiroth.it/2014/01/28/more-picasso-changes/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Tue, 28 Jan 2014 20:28:24 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[gradle]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[picasso]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1663</guid>

					<description><![CDATA[I recently added more changes to my forked version of the Picasso library. Delay Added withDelay(long ms) method in the RequestCreator class. Basically it will delay the load of the passed resource by n milliseconds. [cce] Picasso.with( context ) .load( url ) .withDelay( 100 ) .into( image ); [/cce] Batch toggle on/off In the original &#8230; <a href="https://blog.sephiroth.it/2014/01/28/more-picasso-changes/" class="more-link">Continue reading <span class="screen-reader-text">More Picasso changes</span></a>]]></description>
										<content:encoded><![CDATA[<p>I recently added more changes to my <a href="https://github.com/sephiroth74/picasso">forked</a> version of the <a href="https://github.com/square/picasso">Picasso</a> library.</p>
<p><strong>Delay</strong></p>
<p>Added <em>withDelay(long ms)</em> method in the RequestCreator class. Basically it will delay the load of the passed resource by <strong><em>n</em></strong> milliseconds.</p>
<p>[cce]<br />
Picasso.with( context )<br />
	.load( url )<br />
	.withDelay( 100 )<br />
	.into( image );<br />
[/cce]</p>
<p><strong>Batch toggle on/off</strong></p>
<p>In the original Picasso code all the &#8220;complete&#8221; events are dispatched using a batch operation, this means that you can have at the same time 3/4 &#8220;complete&#8221; events being triggered, which eventually can cause lags in the UI.<br />
In this fork the batch is disabled by default and can be re-enabled by using:</p>
<p>[cce]<br />
Picasso.with( context )<br />
	.setUseBatch( true );<br />
[/cce]</p>
<p>Fork or download the source from GitHub: <br />
<a href="https://github.com/sephiroth74/picasso">https://github.com/sephiroth74/picasso</a></p>
<p>Link the library in your build.gradle:<br /> <strong>compile &#8220;it.sephiroth.android.library.picasso:picasso:+&#8221;</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2014/01/28/more-picasso-changes/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Forking Picasso</title>
		<link>https://blog.sephiroth.it/2013/10/16/forking-picasso/</link>
					<comments>https://blog.sephiroth.it/2013/10/16/forking-picasso/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Wed, 16 Oct 2013 18:12:50 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[picasso]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1651</guid>

					<description><![CDATA[Recently I started using this nice library, Picasso, for my Android projects. Basically it&#8217;s a library which allows you to load any type of images (local or remote, assets or resources) asynchronously&#160;into your ImageView. It will load them in background for you, this not blocking the UI. It has also an internal cache system and &#8230; <a href="https://blog.sephiroth.it/2013/10/16/forking-picasso/" class="more-link">Continue reading <span class="screen-reader-text">Forking Picasso</span></a>]]></description>
										<content:encoded><![CDATA[<p>Recently I started using this nice library, <a href="https://github.com/square/picasso" target="_blank">Picasso</a>, for my Android projects.<br />
Basically it&#8217;s a library which allows you to load any type of images (local or remote, assets or resources) asynchronously into your ImageView. It will load them in background for you, this not blocking the UI. It has also an internal cache system and it also comes with some useful features like &#8220;fade&#8221; ( when an image is loaded into the view it will automatically create a fade in effect ), &#8220;transform&#8221; ( you want to post transform the loaded bitmap ), &#8220;resize&#8221;, &#8220;fit&#8221; and more.</p>
<p>You can find a better explanation of the project here: <a href="http://square.github.io/picasso/">http://square.github.io/picasso/</a></p>
<p>By the way, long story short, as often happens, when you start to use a 3rd party library you also find it&#8217;s limitations and you want to make your own changes to fit your particular needs. In fact I made a <a href="https://github.com/sephiroth74/picasso" target="_blank">fork</a> of this library starting adding my changes.</p>
<p>Here&#8217;s a first list of changes I made:</p>
<p><strong>Cache</strong></p>
<p>Added the possibility to use an external cache instance per request.<br />
Example:</p>
<p>[cce]// creating a cache object with 1MB max size<br />
Cache cache = new LruCache( 1024*1024*1 );</p>
<p>// now create a new request which will use this cache object<br />
Picasso.with( this ).load( file ).withCache( myCache ).into( imageView );[/cce]</p>
<blockquote><p>Remember to clear the cache when you don&#8217;t need that anymore ( using cache.clear() )</p></blockquote>
<p><strong>Generators</strong></p>
<p>Generators can be used to load images which cannot be loaded using the common scheme convention. There are different situations when you need to generate a Bitmap which is not directly related to a file or url or even a real bitmap resource.</p>
<p>In this case you can use the scheme &#8220;custom.resource&#8221; with a Generator.<br />
A Generator is a simple interface with only one method:</p>
<p>[cce]public interface Generator {<br />
	Bitmap decode( String path ) throws IOException;<br />
}[/cce]</p>
<p>So you can use a generator in this way:</p>
<p>[cce]Picasso.with(this)<br />
	.load( Uri.parse( &#8220;custom.resource://&#8221; + file ) )<br />
	.withGenerator( new Generator() {<br />
		@Override<br />
			public Bitmap decode( String path ) throws IOException {<br />
				return whatever(path);<br />
			}<br />
		} ).into( imageView );<br />
[/cce]</p>
<p><strong>Resize</strong></p>
<p>Both the original Picasso methods resize and resizeDimen have been modified in the followings new methods:</p>
<p>[cce]public RequestCreator resizeDimen(int targetWidthResId, int targetHeightResId, boolean onlyIfBigger);<br />
public RequestCreator resize(int targetWidth, int targetHeight, boolean onlyIfBigger);[/cce]</p>
<p>basically you can pass an option to skip the resize operation if the loaded bitmap is smaller than the passed `targetWidth` and `targetHeight`</p>
<p><strong>BitmapFactory.Options</strong></p>
<p>Picasso uses a default BitmapFactory.Options object, every time, to decode the required Bitmap.</p>
<p>I&#8217;ve added a method `withOptions` in the RequestCreator which allow you to pass your own Options object which will be used to decode the image.<br />
Example:</p>
<p>[cce]BitmapFactory.Options options = new BitmapFactory.Options();<br />
options.inPreferredConfig = Config.RGB_565;</p>
<p>Picasso.with(this)<br />
	.load(file)<br />
	.withOptions(options)<br />
	.into(imageView);<br />
[/cce]</p>
<p><a href="https://github.com/sephiroth74/picasso" target="_blank">https://github.com/sephiroth74/picasso</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2013/10/16/forking-picasso/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
