<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[ Tomorrow's Devs Blog]]></title><description><![CDATA[Maciej Filutowski]]></description><link>https://maciejfil.com/</link><image><url>https://maciejfil.com/favicon.png</url><title> Tomorrow&apos;s Devs Blog</title><link>https://maciejfil.com/</link></image><generator>Ghost 5.82</generator><lastBuildDate>Thu, 16 Apr 2026 20:01:48 GMT</lastBuildDate><atom:link href="https://maciejfil.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Setting Up Git Over SSH with Forgejo in a Homelab]]></title><description><![CDATA[Check out how to fix SSH authentication issues when running Forgejo behind Nginx Proxy Manager in a homelab setup using Pi-hole and Proxmox.]]></description><link>https://maciejfil.com/setting-up-git-over-ssh-with-forgejo-in-a-homelab/</link><guid isPermaLink="false">698e2e5e0dce6c0001b502c4</guid><category><![CDATA[git]]></category><category><![CDATA[homelab]]></category><category><![CDATA[linux]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Thu, 12 Feb 2026 20:02:32 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2026/02/Designer--1-.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2026/02/Designer--1-.png" alt="Setting Up Git Over SSH with Forgejo in a Homelab"><p>Setting up Git to work over SSH gave me a bit of a headache. I wanted to host my own private Git service in my homelab, so I chose Forgejo. The installation itself was easy, but getting SSH to work properly required a bit more digging.</p><h2 id="my-homelab-environment">My Homelab Environment</h2><ul><li>Ubuntu LXC on Proxmox</li><li>Forgejo installed in the Linux container</li><li>Pi-hole for DNS</li><li>Nginx Proxy Manager for reverse proxy</li></ul><h2 id="generating-a-new-ssh-key-pair-for-forgejo">Generating a New SSH Key Pair for Forgejo</h2><p>First, I recommend creating a new pair of SSH keys dedicated to Forgejo. On macOS, you can generate them like this:</p><pre><code class="language-bash">ssh-keygen -t ed25519 -a 100 -C &quot;forgejo user email&quot;
pbcopy &lt; ~/.ssh/forgejo.pub // on macOS &#x2014; or just copy the file content manually
</code></pre><p>Once you have the <code>.pub</code> file, go to Forgejo &#x2192; <strong>Settings &#x2192; SSH Keys</strong>, click <strong>Add</strong>, and paste the key.</p><h2 id="why-ssh-was-still-asking-for-a-password">Why SSH Was Still Asking for a Password</h2><p>At this point, when I tried testing the connection with:</p><pre><code class="language-bash">ssh -T git@git.filut.ovh
</code></pre><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2026/02/Pasted-image-20260211135259.png" class="kg-image" alt="Setting Up Git Over SSH with Forgejo in a Homelab" loading="lazy" width="1226" height="102" srcset="https://maciejfil.com/content/images/size/w600/2026/02/Pasted-image-20260211135259.png 600w, https://maciejfil.com/content/images/size/w1000/2026/02/Pasted-image-20260211135259.png 1000w, https://maciejfil.com/content/images/2026/02/Pasted-image-20260211135259.png 1226w" sizes="(min-width: 720px) 720px"></figure><p>SSH still asked me for a password.<br>I initially tried modifying my <code>~/.ssh/config</code> by adding a new <code>Host</code> section with all the required options, hoping it would help SSH pick the correct identity. Unfortunately, no luck.<br>After some research, I discovered the real issue: when connecting over the domain name while using Nginx Proxy Manager, SSH was trying to connect to the NPM host instead of my Forgejo container.</p><h2 id="the-solution-bypassing-the-proxy-for-ssh-access">The Solution: Bypassing the Proxy for SSH Access</h2><p>I found a blog post by<a href="https://www.williamkillerud.com/blog/2025/set-up-my-own-forgejo-instance/?ref=maciejfil.com"> William Killerud </a>where he described bypassing Cloudflare for SSH. Turns out, using a similar approach solved my problem as well.<br>In the end my <code>.ssh/config</code> file looks like this:</p><pre><code>Host git.filut.ovh
  HostName 192.168.0.86
  User git
  IdentityFile ~/.ssh/forgejo
  AddKeysToAgent yes
  UseKeychain yes
</code></pre><p>And here&apos;s the proof that everything is finally working &#x1F389;</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2026/02/Pasted-image-20260212203157-1.png" class="kg-image" alt="Setting Up Git Over SSH with Forgejo in a Homelab" loading="lazy" width="941" height="277" srcset="https://maciejfil.com/content/images/size/w600/2026/02/Pasted-image-20260212203157-1.png 600w, https://maciejfil.com/content/images/2026/02/Pasted-image-20260212203157-1.png 941w" sizes="(min-width: 720px) 720px"></figure><p>Until next time!</p>]]></content:encoded></item><item><title><![CDATA[How to Fix Docker “Permission Denied” Error on Proxmox After System Update]]></title><description><![CDATA[After updating my LXC containers, Docker stopped working and showed a “permission denied” error related to unprivileged_port_start. The fix turned out to be an outdated Proxmox host. ]]></description><link>https://maciejfil.com/how-to-fix-docker-permission-denied-error-on-proxmox-after-system-update/</link><guid isPermaLink="false">6984ec2e0dce6c0001b502ab</guid><category><![CDATA[linux]]></category><category><![CDATA[proxmox]]></category><category><![CDATA[docker]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Thu, 05 Feb 2026 19:25:05 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2026/02/Designer.png" medium="image"/><content:encoded><![CDATA[<h3 id="updating-lxcs-after-a-long-break"><strong>Updating LXCs After a Long Break</strong></h3><img src="https://maciejfil.com/content/images/2026/02/Designer.png" alt="How to Fix Docker &#x201C;Permission Denied&#x201D; Error on Proxmox After System Update"><p>It&apos;s been ages since I last updated my LXCs, and one day I suddenly thought &#x2014; <em>today is the day</em>.<br>I started with the most obvious choice: the entry point to all other services &#x2014; <strong>Nginx Proxy Manager</strong>.</p><h3 id="running-the-update"><strong>Running the Update</strong></h3><p>As usual, I ran:</p><pre><code class="language-bash">apt update
apt upgrade
</code></pre><p>After a few minutes the upgrade finished, but I quickly realized that none of my self&#x2011;hosted services were reachable. That could only mean one thing &#x2014; the <strong>reverse proxy was down</strong>.</p><h3 id="checking-docker"><strong>Checking Docker</strong></h3><p>A quick look at <code>docker ps</code> showed that no containers were running.<br>I navigated to the directory containing my entire <code>docker-compose</code> setup and ran:</p><pre><code class="language-bash">docker compose up
</code></pre><p>&#x2026;only to see this friendly error:</p><pre><code class="language-bash">Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied</code></pre><h3 id="what-caused-the-problem"><strong>What Caused the Problem?</strong></h3><p>Fortunately, the solution turned out to be simple &#x2014; no need to roll back Docker or modify configs.</p><p>The issue was an <strong>outdated Proxmox host</strong>.</p><h3 id="fixing-the-host"><strong>Fixing the Host</strong></h3><p>I logged into my <code>PVE</code> host and performed:</p><pre><code class="language-bash">apt update &amp;&amp; apt upgrade
</code></pre><p>In the end, my Proxmox instance jumped from <strong>v8.4.2</strong> to <strong>v8.4.16</strong>, and just like that, <strong>Nginx Proxy Manager was running again</strong>.</p>]]></content:encoded></item><item><title><![CDATA[DIY NAS Setup with OpenMediaVault on Old Hardware]]></title><description><![CDATA[Turned an old PC into a NAS with OMV 7, RAID1, and SMB sharing. Easy setup, great for media and backups!]]></description><link>https://maciejfil.com/installation-process/</link><guid isPermaLink="false">68d557a8d8d12700014ed003</guid><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Thu, 25 Sep 2025 15:40:08 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2025/09/nas_openmediavault.png" medium="image"/><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2><img src="https://maciejfil.com/content/images/2025/09/nas_openmediavault.png" alt="DIY NAS Setup with OpenMediaVault on Old Hardware"><p>In this article I will show how I set up a custom NAS server out of some old hardware and OpenMediaVault. This will be my base storage solution and I plan to use it with media player and as a general backup solution.</p><h3 id="hardware">Hardware</h3><p>Some time ago I bought used HP G3 desktop for 20 euros. The specs are quite low e.g. an old Intel i5, 8 gigs of RAM, nothing fancy. I equipped it with a set of WD Red Plus 4TB and 256Gb Nvme drive.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/B75B82F4-46D6-46F8-B4A9-E909E914FE6B_1_105_c.jpeg" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="768" height="1024" srcset="https://maciejfil.com/content/images/size/w600/2025/09/B75B82F4-46D6-46F8-B4A9-E909E914FE6B_1_105_c.jpeg 600w, https://maciejfil.com/content/images/2025/09/B75B82F4-46D6-46F8-B4A9-E909E914FE6B_1_105_c.jpeg 768w" sizes="(min-width: 720px) 720px"></figure><h2 id="openmediavault-7-installation">OpenMediaVault 7 Installation</h2><p>Download the .iso file from <a href="https://www.openmediavault.org/?ref=maciejfil.com">official site</a>, and burn it onto a USB stick. For macOs I would recommend using <a href="https://etcher.balena.io/?ref=maciejfil.com">Etcher</a>. During the installation make sure that the device is connected to the network. DHCP will set an IP address for the machine. We will change it later to make it <code>static</code>. Personally, I left each configuration as default, however feel free to customize as needed (language, timezone etc.).</p><p>After installation, the system will reboot. Make sure to remove the USB stick. After restart the IP address will be shown . In my case it was <code>eno1: 192.168.0.190</code>. When I entered the IP address in the browser, I was greeted with the login page. For first login, use <code>admin</code> for login and <code>openmediavault</code> as password. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250913123354.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1250" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250913123354.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250913123354.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250913123354.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250913123354.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Although I downloaded the latest version of OMV first thing I usually do is to update the entire system. Navigate to <code>System -&gt; Update management</code> and update the system.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250913123858-1.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1250" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250913123858-1.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250913123858-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250913123858-1.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250913123858-1.png 2000w" sizes="(min-width: 720px) 720px"></figure><h2 id="changing-omv-ip-address">Changing OMV IP address</h2><p>There is always a risk that DHCP given IP may change in the future. OpenMediaVault will be my primary data storage solution and many devices will be connected to it. That&apos;s why I want to have static IP here. We can easily modify its value by going to <code>Network -&gt; Interfaces</code> menu, and change the address. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250913124853.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1250" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250913124853.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250913124853.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250913124853.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250913124853.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>I gave the following configuration: </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250913125006.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1250" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250913125006.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250913125006.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250913125006.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250913125006.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>For DNS I used my PiHole instance, which is at 192.168.0.80. If you don&apos;t have your own DNS server, you can use for example Google which is <code>8.8.8.8</code>. I don&apos;t use IPv6, so I left it disabled. And after applying changes, I entered the new IP address, and OMV worked as expected.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250913125443.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1250" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250913125443.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250913125443.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250913125443.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250913125443.png 2000w" sizes="(min-width: 720px) 720px"></figure><h2 id="create-a-btrfs-file-system-openmediavault">Create a BTRFS file system OpenMediaVault</h2><p>I will focus on BTFRS file system type as for my use case and honestly majority of users it will be the best and easiest solution to start with. BTRFS characteristics:</p><ul><li>Provide snapshots</li><li>Raid support on file system level</li></ul><p>I started with drives not plugged in, so now it is good time to plug them in. New drives should be visible in <code>Storage -&gt; Disks</code> pane. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121242.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917121242.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917121242.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917121242.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121242.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Now navigate to <code>Storage -&gt; File Systems</code>. Hit the + icon, and then <code>BTRFS</code>. On next screen choose RAID1, and select your disks. </p><p><strong>Why use RAID1?</strong> </p><p>Having two disks RAID1 makes a live copy to second disk. It is called <code>mirror</code>. However it should not be considered as a backup. More like availability case when one drive fails then file system would be still accessible.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121552.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917121552.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917121552.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917121552.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121552.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>On the next screen I left the default values. Don&apos;t forget to commit the changes.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121736.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917121736.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917121736.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917121736.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917121736.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>In <strong>RAID1</strong>, we should have maximum capacity the same as the smallest drive. I used 4TB drives, so I expect capacity around that number. OMV showed sum of two disks, but as it was reported, this is a bug that will correct itself once data is transferred.</p><h2 id="create-smb-share-in-openmediavault">Create SMB share in OpenMediaVault</h2><p>A few thing we have to set to <strong>create a SMB share</strong>. Shares Go to <code>Storage -&gt; Shared Folder</code> and hit <code>+</code> icon. Give a name to your share. I gave mine <code>movies</code> as I plan to later integrate it with Jellyfin (self-hosted app for storing and watching videos).</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123057.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917123057.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917123057.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917123057.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123057.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>We can&apos;t use the share straight away. We need to <strong>enable the SMB service</strong>. To do so, navigate to <code>Services -&gt; SMB/CIFS</code> and go to Setting. Tick <code>Enabled</code>, and save the changes. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123752.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917123752.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917123752.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917123752.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123752.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Next go to <code>Shares</code> and create new share. I left default options on. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123959.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917123959.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917123959.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917123959.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917123959.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>One last change is to grant user permission to the share.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125314.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917125314.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917125314.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917125314.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125314.png 2000w" sizes="(min-width: 720px) 720px"></figure><h2 id="testing-openmedavault-smb-share">Testing OpenMedaVault SMB share</h2><p>Now that we have all set up properly, let&apos;s test the solution. I&apos;m on MacOs so I will be using Finder to connect to shared folder. On Windows or Linux it shouldn&apos;t be hard to connect to it. </p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125314-1.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917125314-1.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917125314-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917125314-1.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125314-1.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>And yes, after providing user and password, our share is accessible.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125404.png" class="kg-image" alt="DIY NAS Setup with OpenMediaVault on Old Hardware" loading="lazy" width="2000" height="1062" srcset="https://maciejfil.com/content/images/size/w600/2025/09/Pasted-image-20250917125404.png 600w, https://maciejfil.com/content/images/size/w1000/2025/09/Pasted-image-20250917125404.png 1000w, https://maciejfil.com/content/images/size/w1600/2025/09/Pasted-image-20250917125404.png 1600w, https://maciejfil.com/content/images/2025/09/Pasted-image-20250917125404.png 2064w" sizes="(min-width: 720px) 720px"></figure><h2 id="summary">Summary</h2><p>In this article, I shared how I built a custom NAS server using an old HP desktop and OpenMediaVault 7. I walked through the hardware setup, installing OMV, configuring a static IP, and creating a BTRFS file system with RAID1 for redundancy. I also showed how to set up an SMB share so the NAS can be accessed from other devices on the network. It&#x2019;s a simple, budget-friendly solution that works great for media storage and backups.</p>]]></content:encoded></item><item><title><![CDATA[How to change Proxmox IP address]]></title><description><![CDATA[Learn how to fix Proxmox WebUI access issues after switching to a TP-Link C64 router by setting a static IP and updating network settings.]]></description><link>https://maciejfil.com/how-to-change-proxmox-ip-address/</link><guid isPermaLink="false">6895e00bc400f60001fcbbfc</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Wed, 03 Sep 2025 16:30:00 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2025/09/change_proxmox_ip.png" medium="image"/><content:encoded><![CDATA[<h3 id="introduction">Introduction</h3>
<img src="https://maciejfil.com/content/images/2025/09/change_proxmox_ip.png" alt="How to change Proxmox IP address"><p>I moved to a new apartment and I got a new router. The TPLink C64 default DHCP settings are different from my previous one so my entire configuration was corrupted and I lost connection to the Proxmox WebUI. I will describe the steps I took to make it work again.</p>
<h3 id="goals">Goals</h3>
<ul>
<li>Restore Proxmox Web GUI</li>
</ul>
<h2 id="checking-tplinks-dhcp-ip-ranges">Checking TPLink&apos;s DHCP IP ranges</h2>
<p>To start off, let&apos;s first check what is the DHCP ip range. I want my Proxmox to be outside that range. Otherwise, I might risk the IP address changing in the feature. On the TPLink C64 you can view that information under <code>Advanced -&gt; Network -&gt; DHCP server</code>.<br>
<img src="https://maciejfil.com/content/images/2025/09/image-1.png" alt="How to change Proxmox IP address" loading="lazy"></p>
<p>In my case, the default range is between <code>192.168.0.100</code> and <code>192.168.0.249</code>.</p>
<h2 id="how-to-configure-ip-address-for-proxmox">How to configure IP address for Proxmox</h2>
<p>Let&apos;s change the configuration. Since I could not access the Proxmox WebUI, I had to connect a screen to Proxmox host with an HDMI cable.<br>
<img src="https://maciejfil.com/content/images/2025/09/image-1-1.png" alt="How to change Proxmox IP address" loading="lazy"><br>
You should see the login screen. Log in as <code>root</code>.<br>
Next, we need to edit <code>interfaces</code> file. Run <code>nano /etc/network/interfaces</code><br>
Below you can find my configuration. I set my address to <code>192.168.0.90/24</code>.</p>
<pre><code class="language-bash">auto lo
iface lo inet loopback

iface enp0s31f6 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.90/24 # change to desired ip
        gateway 192.168.0.1     # change gateway ip
        bridge-ports enp0s31f6
        bridge-stp off
        bridge-fd 0


source /etc/network/interfaces.d/*
</code></pre>
<p>Once configuration is changed, restart the <code>networking</code> service. To do that, enter:</p>
<pre><code class="language-bash">systemctl restart networking
</code></pre>
<p>Now it is time to verify whether the changes actually worked. Enter the IP address in your browser:<br>
<code>https://192.168.0.90:8006</code></p>
<p><img src="https://maciejfil.com/content/images/2025/09/image-2.png" alt="How to change Proxmox IP address" loading="lazy"></p>
<h3 id="summary">Summary</h3>
<p>In this short tutorial you learned how to regain access to Proxmox WebUI after changing network environment. I covered how to check router&apos;s DHCP IP range, configure static IP address in Proxmox, and restarting the network service.</p>
]]></content:encoded></item><item><title><![CDATA[Simple Thermostat Automation with Home Assistant]]></title><description><![CDATA[<h3 id="introduction">Introduction</h3><p>The heating season in Poland is ongoing. Automating room temperature can significantly reduce costs. Here, I will present a simple setup that utilizes just two devices.</p><h3 id="what-will-you-learn">What will You learn?</h3><ul><li>Create a new Home Assistant automation</li><li>Execute a specific action based on a trigger</li><li>Monitor automation executions</li></ul><h3 id="related-posts">Related posts</h3>]]></description><link>https://maciejfil.com/simple-thermostat-automation-with-home-assistant/</link><guid isPermaLink="false">672f9b57e1d5590001ddda9e</guid><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Mon, 25 Nov 2024 08:00:22 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/11/Heating_automation.png" medium="image"/><content:encoded><![CDATA[<h3 id="introduction">Introduction</h3><img src="https://maciejfil.com/content/images/2024/11/Heating_automation.png" alt="Simple Thermostat Automation with Home Assistant"><p>The heating season in Poland is ongoing. Automating room temperature can significantly reduce costs. Here, I will present a simple setup that utilizes just two devices.</p><h3 id="what-will-you-learn">What will You learn?</h3><ul><li>Create a new Home Assistant automation</li><li>Execute a specific action based on a trigger</li><li>Monitor automation executions</li></ul><h3 id="related-posts">Related posts</h3><ul><li><a href="https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/" rel="noreferrer">How to install Home Assistant</a></li><li><a href="https://maciejfil.com/how-to-set-up-zigbee2mqtt-for-home-assistant/" rel="noreferrer">How to set up Zigbee2MQTT</a></li><li><a href="https://maciejfil.com/avatto-trv6-home-assistant-setup/" rel="noreferrer">Avatto TRV6 installation and review</a></li></ul><h3 id="what-devices-to-use">What devices to use?</h3><p>I began building my home automation with basic devices, including the Aqara temperature sensor and the <strong>Avatto TRV6</strong> thermostat. I recently purchased both on AliExpress at a fair price. Please check out the linked articles if you would like to learn more about them and their installation.</p><h2 id="setting-up-heat-automation"><strong>Setting up heat automation</strong></h2><p>Open Home Assistant homepage and navigate to Settings -&gt; Automation.</p><p>Since this is a simple automation, I will create two procedures: one for turning on the heating and another for switching it off.</p><p>Let&#x2019;s start with the first one. Click <strong>Create automation</strong> button, and then <strong>Create New Automation.</strong></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Create-automation.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="1010" height="658" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Create-automation.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Create-automation.png 1000w, https://maciejfil.com/content/images/2024/11/Create-automation.png 1010w" sizes="(min-width: 720px) 720px"></figure><p>Add a trigger. In my case, it&#x2019;s Aqara sensor, placed in the living area.</p><p>When the temperature stays below 21 degrees Celsius for at least 10 minutes, the automation will be triggered.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-135-1.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="1088" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-135-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-135-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-135-1.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-135-1.png 2150w" sizes="(min-width: 720px) 720px"></figure><p>Next up, you can add an optional condition for example time is between. Personally I don&#x2019;t want to heat the living room in the night, because I&#x2019;m in bedroom. So here I&#x2019;ve added another condition if current time is between 6am and 10pm.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-136.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="1277" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-136.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-136.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-136.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-136.png 2114w" sizes="(min-width: 720px) 720px"></figure><p>Last step for this automation is to set what actually needs to be done, so turning on the heating. I chose the correct thermostat and set its mode to `heat`.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-137.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="888" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-137.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-137.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-137.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-137.png 2158w" sizes="(min-width: 720px) 720px"></figure><p>That&#x2019;s it for now.&#xA0; Click <strong>Save </strong>and you will be asked to give that automation a name.</p><p>If you prefer <strong>YAML</strong> code, I&#x2019;m sharing it below:</p><pre><code class="language-yaml">alias: Living Room Radiator Daily
description: Heat when below 21degrees between 6 and 22
trigger:
  - type: temperature
    platform: device
    device_id: 9a40ade37c2b29a15e93c3a687521361
    entity_id: 7d8b003e895fcb140feb0535e63daf7b
    domain: sensor
    below: 21
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition:
  - condition: time
    after: &quot;06:00:00&quot;
    before: &quot;22:00:00&quot;
action:
  - device_id: dbd3dc4af8c1a68b75a9b23532abdebf
    domain: climate
    entity_id: 3fa5058913a0b77ee1d623acedd43848
    type: set_hvac_mode
    hvac_mode: heat
mode: single</code></pre><h2 id="turning-off-the-heating">Turning off the heating</h2><p>In the same manner as previously create a new automation.</p><p>I will also check the current room temperature, but this time, the condition is that the temperature must be above 21 degrees Celsius.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-138.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="1124" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-138.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-138.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-138.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-138.png 2138w" sizes="(min-width: 720px) 720px"></figure><p>And the actual action to be executed:</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-139.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="981" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-139.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-139.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-139.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-139.png 2132w" sizes="(min-width: 720px) 720px"></figure><p>Same as previously I&#x2019;m sharing the YAML:</p><pre><code class="language-yaml">alias: Living Room Radiator Daily
description: Heat when below 21degrees between 6 and 22
trigger:
  - type: temperature
    platform: device
    device_id: 9a40ade37c2b29a15e93c3a687521361
    entity_id: 7d8b003e895fcb140feb0535e63daf7b
    domain: sensor
    below: 21
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition:
  - condition: time
    after: &quot;06:00:00&quot;
    before: &quot;22:00:00&quot;
action:
  - device_id: dbd3dc4af8c1a68b75a9b23532abdebf
    domain: climate
    entity_id: 3fa5058913a0b77ee1d623acedd43848
    type: set_hvac_mode
    hvac_mode: heat
mode: single</code></pre><p>And that&#x2019;s it! Your<strong> simple heating management</strong> should be up and running.&#xA0;</p><h2 id="monitoring-automation-execution">Monitoring automation execution</h2><p>You can check whether your automation is working as expected using two methods.</p><p>The first, and in my opinion the most useful, is to view the <strong>Logbook</strong>. You can access it from main navigation panel on the left hand side.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-140.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="1158" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-140.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-140.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-140.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-140.png 2096w" sizes="(min-width: 720px) 720px"></figure><p>In the screenshot, you can clearly see exactly when the heating was turned on and when it was turned off.</p><p>Another option, especially useful when debugging is to check <strong>Traces</strong>. Traces are accessible from automation menu. There you can check every step and parameters used.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-142.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="502" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-142.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-142.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-142.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/11/Pasted-Graphic-142.png 2400w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-141.png" class="kg-image" alt="Simple Thermostat Automation with Home Assistant" loading="lazy" width="2000" height="620" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-141.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-141.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-141.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/11/Pasted-Graphic-141.png 2400w" sizes="(min-width: 720px) 720px"></figure>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Simple Thermostat Automation with Home Assistant" style="height: 60px !important;width: 217px !important; margin: 0 auto;"></a></div>
<!--kg-card-end: html-->
<h2 id="conclusion">Conclusion</h2><p>In this article I showed you how to set up a simple automation in Home Assistant. With this automation, you will be able to manage the heating in your home. It serves as a baseline, so if you need something more tailored to your needs, please experiment and share your results!</p>]]></content:encoded></item><item><title><![CDATA[How to install PostgreSQL in Ubuntu]]></title><description><![CDATA[<h2 id="introduction"><strong>Introduction</strong></h2><p>When developing applications or running any sort of service in your home, sooner or later, you will need a relational database. PostgreSQL is one of the best choices available.</p><h2 id="what-will-you-learn"><strong>What will You learn?</strong></h2><p>In this tutorial, I will guide you through setting up PostgreSQL on an Ubuntu machine in</p>]]></description><link>https://maciejfil.com/how-to-install-postgresql-in-ubuntu/</link><guid isPermaLink="false">672f9735e1d5590001ddda62</guid><category><![CDATA[databases]]></category><category><![CDATA[linux]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Mon, 11 Nov 2024 08:00:48 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/11/installing_postgres.png" medium="image"/><content:encoded><![CDATA[<h2 id="introduction"><strong>Introduction</strong></h2><img src="https://maciejfil.com/content/images/2024/11/installing_postgres.png" alt="How to install PostgreSQL in Ubuntu"><p>When developing applications or running any sort of service in your home, sooner or later, you will need a relational database. PostgreSQL is one of the best choices available.</p><h2 id="what-will-you-learn"><strong>What will You learn?</strong></h2><p>In this tutorial, I will guide you through setting up PostgreSQL on an Ubuntu machine in my homelab.</p><h2 id="postgresql-installation-on-ubuntu"><strong>PostgreSQL Installation on Ubuntu</strong></h2><p>I assume that you have already installed a fresh copy of Ubuntu, or you have one running. If not, check out <strong>Creating LXC Containers tutorial </strong>for a quick start (<a href="https://maciejfil.com/how-to-create-linux-containers-in-proxmox">https://maciejfil.com/how-to-create-linux-containers-in-proxmox</a>).</p><p>Let&#x2019;s start by updating the repositories and system (especially if it is a fresh Ubuntu copy).</p><p><code>apt update &amp;&amp; apt upgrade</code></p><p>Now we can install PostgreSQL. Run the following command:</p><p><code>apt install postgresql</code></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-7.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="1622" height="821" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-7.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-7.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image-7.png 1600w, https://maciejfil.com/content/images/2024/11/image-7.png 1622w" sizes="(min-width: 720px) 720px"></figure><p>Verify the installation by checking if the service is running.</p><p><code>systemctl status postgresql</code></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-6.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="1290" height="337" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-6.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-6.png 1000w, https://maciejfil.com/content/images/2024/11/image-6.png 1290w" sizes="(min-width: 720px) 720px"></figure><h2 id="create-new-postgresql-database-and-table">Create new PostgreSQL database and table</h2><p>As shown in the screenshot, it seems to be working. Let&#x2019;s try to log into our freshly installed database. During installation, user <strong>postgres</strong> was created for us. So, let&#x2019;s use it:</p><p><code>sudo -u postgres psql</code></p><p>At this point, please set up a password. Just type <code>\password postgres</code> and you will be asked to provide one.</p><p>Next, let&#x2019;s list all database schemas in PostgreSQL with the <code>\list</code> command. By default, database <code>postgres</code> is created for us.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-5.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="2000" height="631" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-5.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-5.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image-5.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/11/image-5.png 2400w" sizes="(min-width: 720px) 720px"></figure><p>Let&#x2019;s add a new database, call it <code>test_db</code> and create a table <code>Users</code></p><p><code>CREATE DATABASE test_db;</code></p><p>With below command we will switch context to use only <code>test_db</code>.</p><p><code>\c test_db</code></p><p>And now let&#x2019;s create a table with some example data.</p><pre><code class="language-sql">CREATE TABLE Users ( id SERIAL PRIMARY KEY, username VARCHAR(50) NOT NULL, email VARCHAR(100) UNIQUE NOT NULL );

INSERT INTO Users (username, email) VALUES&#xA0;
(&apos;john_doe&apos;, &apos;john.doe@example.com&apos;),
(&apos;jane_smith&apos;, &apos;jane.smith@example.com&apos;),
(&apos;mike_jones&apos;, &apos;mike.jones@example.com&apos;);

select * from users;</code></pre><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-4.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="2000" height="685" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-4.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-4.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image-4.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/11/image-4.png 2400w" sizes="(min-width: 720px) 720px"></figure><h2 id="connecting-to-postgresql-from-client"><strong>Connecting to PostgreSQL from client</strong></h2><p>Before we begin, let&#x2019;s check what port PostgreSQL is exposing. In terminal type <code>netstat -plnt</code>. It is <code>5453</code>. I was trying to connect to database from my laptop, but it failed.</p><p>By default, every new installation of PostgreSQL allows connections only locally &#x2014; in my case, when I&#x2019;m logged into the Ubuntu machine. There may be a time when you need to allow an external service to connect to the database. In order to do so, we need to perform couple of steps.</p><p>I&#x2019;m always backing up every config file before I make any changes, so execute the following:</p><pre><code class="language-shell">cd /etc/postgresql/16/main
cp postgresql.conf postgresql.confBACUP</code></pre><p>Then open file in your favourite text editor. I&#x2019;m using <code>nano</code>.</p><p><code>nano postgresql.conf</code></p><p>Find the <code>listen_addresses</code> line, uncomment it, and put <code>*</code> in the brackets.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-2.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="2000" height="1056" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-2.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-2.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image-2.png 1600w, https://maciejfil.com/content/images/2024/11/image-2.png 2047w" sizes="(min-width: 720px) 720px"></figure><p>Next up open <code>pg_hba.conf</code> and add the following line:</p><p><code>host all all 0.0.0.0/0 md5</code></p><p>This configuration line basically means that we will be able to connect to any database with any user from any IP address. You can <strong>adjust those parameters as needed</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image-1.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="1694" height="1268" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image-1.png 1600w, https://maciejfil.com/content/images/2024/11/image-1.png 1694w" sizes="(min-width: 720px) 720px"></figure><p>Save all and exit. To make those changes take affect, we need to restart postgresql service.</p><pre><code class="language-shell">systemctl restart postgresql
systemctl status postgresql</code></pre><p>If everything was done correctly, then service should be active again.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/image.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="2000" height="753" srcset="https://maciejfil.com/content/images/size/w600/2024/11/image.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/image.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/image.png 1600w, https://maciejfil.com/content/images/2024/11/image.png 2006w" sizes="(min-width: 720px) 720px"></figure><p>As you can see, I was able to connect from Visual Studio Code and query the Users table.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/11/Pasted-Graphic-126.png" class="kg-image" alt="How to install PostgreSQL in Ubuntu" loading="lazy" width="2000" height="1571" srcset="https://maciejfil.com/content/images/size/w600/2024/11/Pasted-Graphic-126.png 600w, https://maciejfil.com/content/images/size/w1000/2024/11/Pasted-Graphic-126.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/11/Pasted-Graphic-126.png 1600w, https://maciejfil.com/content/images/2024/11/Pasted-Graphic-126.png 2000w" sizes="(min-width: 720px) 720px"></figure><h2 id="conclusion"><strong>Conclusion</strong></h2><p>In this tutorial, I&#x2019;ve guided you through installing and performing the initial setup of a PostgreSQL database. Try it yourself and let me know if you had any issues installing it.</p>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="How to install PostgreSQL in Ubuntu" style="height: 60px !important;width: 217px !important; margin: 0 auto;"></a></div>
<!--kg-card-end: html-->
<h3 id="references">References:</h3><p><a href="https://www.postgresql.org/docs/16/index.html?ref=maciejfil.com" rel="noreferrer">https://www.postgresql.org/docs/16/index.html</a></p>]]></content:encoded></item><item><title><![CDATA[Avatto TRV6 Home Assistant Setup]]></title><description><![CDATA[<p>The heating season in Warsaw has begun. I&#x2019;ve heard that smart radiator thermostats can work miracles when it comes to lowering heating bills. I&#x2019;ve spotted a good price for the <strong>Avatto TRV6 Tuya Zigbee</strong> thermostat and decided to give it a try. My friends who have</p>]]></description><link>https://maciejfil.com/avatto-trv6-home-assistant-setup/</link><guid isPermaLink="false">6716859be1d5590001ddda3e</guid><category><![CDATA[home automation]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Mon, 21 Oct 2024 16:56:16 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/10/avvatto-trv6-review.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/10/avvatto-trv6-review.png" alt="Avatto TRV6 Home Assistant Setup"><p>The heating season in Warsaw has begun. I&#x2019;ve heard that smart radiator thermostats can work miracles when it comes to lowering heating bills. I&#x2019;ve spotted a good price for the <strong>Avatto TRV6 Tuya Zigbee</strong> thermostat and decided to give it a try. My friends who have similar solutions in their homes claim that after the first winter season, the savings they made paid off the entire investment!</p><h2 id="what-will-you-learn"><strong>What will you learn?</strong></h2><p>You will learn how to install the thermostat onto a radiator with a Danfoss-type valve. Then, I will guide you through connecting the device to Home Assistant via Zigbee2MQTT, and, at the end, we will set up an simple automation.</p><h2 id="avatto-thermostat-trv6-review"><strong>Avatto Thermostat TRV6 review</strong></h2><p>I bought my devices just a few days ago on AliExpress. The delivery took around 2 weeks to Warsaw, so quite fast.&#xA0;</p><p>Each package contains a thermostat, valve adapters, and a user manual. <strong>Please note that no batteries are included.&#xA0;</strong></p><p>Overall, the materials it is made from feel a bit cheap, but I&#x2019;m more interested in its capabilities than its looks. You get what you pay for, and for around 30$, that&#x2019;s a bargain!</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/865F2E05-63F9-4154-94E9-306E96966B90_1_105_c.jpeg" class="kg-image" alt="Avatto TRV6 Home Assistant Setup" loading="lazy" width="1024" height="768" srcset="https://maciejfil.com/content/images/size/w600/2024/10/865F2E05-63F9-4154-94E9-306E96966B90_1_105_c.jpeg 600w, https://maciejfil.com/content/images/size/w1000/2024/10/865F2E05-63F9-4154-94E9-306E96966B90_1_105_c.jpeg 1000w, https://maciejfil.com/content/images/2024/10/865F2E05-63F9-4154-94E9-306E96966B90_1_105_c.jpeg 1024w" sizes="(min-width: 720px) 720px"></figure><h2 id="how-to-install-avatto-thermostat"><strong>How to install Avatto thermostat?</strong></h2><p>Before installing it on the radiator, completely remove the white cover (there is a battery sign at the bottom). Install two fresh AA batteries. Personally I used IKEA rechargeable batteries (LADDA). Once installed, it should automatically turn on, and the dot screen should show LA sign. Give it at least 2 minutes to perform initial setup.</p><p>In the meantime, remove your old thermostat from the valve. My valve is of Danfoss type, so I had to install an adapter first. Make sure it sits tightly and is screwed in (but be gentle; overtightening may cause the plastic to break). Next, install the thermostat, and again, in need to sit thigh, but be careful when tightening. Now lower the temperature on the thermostat by turning the knob counterclockwise until you see &apos;OF&apos; on the screen. That&#x2019;s all for now!</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/A9DCD525-9CA8-4F42-978C-7E6A99B611D8_1_105_c.jpeg" class="kg-image" alt="Avatto TRV6 Home Assistant Setup" loading="lazy" width="1024" height="768" srcset="https://maciejfil.com/content/images/size/w600/2024/10/A9DCD525-9CA8-4F42-978C-7E6A99B611D8_1_105_c.jpeg 600w, https://maciejfil.com/content/images/size/w1000/2024/10/A9DCD525-9CA8-4F42-978C-7E6A99B611D8_1_105_c.jpeg 1000w, https://maciejfil.com/content/images/2024/10/A9DCD525-9CA8-4F42-978C-7E6A99B611D8_1_105_c.jpeg 1024w" sizes="(min-width: 720px) 720px"></figure><h2 id="setup-communication-with-ha"><strong>Setup communication with HA</strong></h2><p>If you&#x2019;re using Zigbee2MQTT, then the installation process is pretty straightforward. First of all, <strong>Permit Join </strong>in Home Assistant, and then while the thermostat is in OF position, press and hold circular button for couple of seconds, until the WiFi icon appears. Home Assistant should recognize and pair the device shortly. Check out this link for detailed instructions on pairing a new device. <a href="https://maciejfil.com/how-to-set-up-zigbee2mqtt-for-home-assistant/">https://maciejfil.com/how-to-set-up-zigbee2mqtt-for-home-assistant/</a></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/image.png" class="kg-image" alt="Avatto TRV6 Home Assistant Setup" loading="lazy" width="1992" height="1888" srcset="https://maciejfil.com/content/images/size/w600/2024/10/image.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/image.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/image.png 1600w, https://maciejfil.com/content/images/2024/10/image.png 1992w" sizes="(min-width: 720px) 720px"></figure><h2 id="create-home-assistant-automation"><strong>Create Home Assistant automation</strong></h2><p>Alright, so I created a really <strong>simple automation</strong>. Go to <strong>Settings</strong>, and then <strong>Automation</strong>. There you can add a new automation. When I wake up and go to the living room, I like when it is a little bit warmer in the morning. So my automation every day at 6.30AM turns on the radiator for 20 minutes, and then it turns off. Below you can find the whole YAML configuration.</p><pre><code class="language-yaml">alias: Living Room Warmup DAILY
description: Turn on the heating every day at 6.30am
trigger:
  - platform: time_pattern
    hours: &quot;6&quot;
    minutes: &quot;30&quot;
condition: []
action:
  - device_id: dbd3dc4af8c1a68b75a9b23532abdebf
    domain: climate
    entity_id: 3fa5058913a0b77ee1d623acedd43848
    type: set_hvac_mode
    hvac_mode: heat
  - delay:
      hours: 0
      minutes: 20
      seconds: 0
      milliseconds: 0
  - device_id: dbd3dc4af8c1a68b75a9b23532abdebf
    domain: climate
    entity_id: 3fa5058913a0b77ee1d623acedd43848
    type: set_hvac_mode
    hvac_mode: &quot;off&quot;
mode: single</code></pre><p>Feel free to experiment with your use cases! For example in my bedroom Home Assistant has a task to maintain 21 degrees between 6am and 10pm.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/image-1.png" class="kg-image" alt="Avatto TRV6 Home Assistant Setup" loading="lazy" width="2000" height="670" srcset="https://maciejfil.com/content/images/size/w600/2024/10/image-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/image-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/image-1.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/10/image-1.png 2400w" sizes="(min-width: 720px) 720px"></figure>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Avatto TRV6 Home Assistant Setup" style="height: 60px !important;width: 217px !important;"></a></div>
<!--kg-card-end: html-->
<h2 id="conclusion"><strong>Conclusion</strong></h2><p>In this article, I showed you how to install and configure the thermostat with Home Assistant. With just a few automations you can easily maintain desired temperature in your home and therefore decrease the cost of heating.</p>]]></content:encoded></item><item><title><![CDATA[Configure CloudFlare Tunnel for Home Assistant]]></title><description><![CDATA[<p>In this article, I will be exposing Home Assistant installed in my homelab to the internet. Currently, I can only check the state of sensors installed in my home via WiFi. With Cloudflare Tunnel service, you can access your Home Assistant from anywhere, even if your ISP doesn&#x2019;t</p>]]></description><link>https://maciejfil.com/configure-cloudflare-tunnel-for-home-assistant/</link><guid isPermaLink="false">670950a8e1d5590001ddd9fe</guid><category><![CDATA[home automation]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 11 Oct 2024 16:33:49 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/10/cloudflare_tunnel.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/10/cloudflare_tunnel.png" alt="Configure CloudFlare Tunnel for Home Assistant"><p>In this article, I will be exposing Home Assistant installed in my homelab to the internet. Currently, I can only check the state of sensors installed in my home via WiFi. With Cloudflare Tunnel service, you can access your Home Assistant from anywhere, even if your ISP doesn&#x2019;t provide a static IP address. And it&#x2019;s a completely no-cost solution! Well&#x2026; besides buying a domain.</p><h3 id="prerequisites"><strong>Prerequisites</strong></h3><ol><li>You need to have your own domain.</li><li>The domain should be added to Cloudflare (DNS pointing to CF).</li><li>A running Home Assistant instance (<a href="https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/">https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/</a>)</li></ol><h3 id="set-up-cloudflare-tunnel-for-home-assistant"><strong>Set up CloudFlare Tunnel for Home Assistant</strong></h3><p>Let&#x2019;s start by logging into <a href="https://www.cloudflare.com/?ref=maciejfil.com" rel="noreferrer">Cloudflare</a>. On your homepage, navigate to <strong>Zero Trust</strong>, and then <strong>Networks</strong>/<strong>Tunnels</strong>. Click <strong>Add a tunnel</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Zero-Trust.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="538" height="504"></figure><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-101.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="951" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-101.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-101.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-101.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-101.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>On next page, choose <strong>Cloudflared</strong> and hit <strong>Next.</strong></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-100.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="1115" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-100.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-100.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-100.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-100.png 2397w" sizes="(min-width: 720px) 720px"></figure><p>Choose a name for your tunnel. I&#x2019;ve chosen <strong>HomeAssistant</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Create-a-tunnel.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="815" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Create-a-tunnel.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Create-a-tunnel.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Create-a-tunnel.png 1600w, https://maciejfil.com/content/images/2024/10/Create-a-tunnel.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>On the next page, you will have a chance to select your preferred way to install the Cloudflared connector. To make things easy, I&#x2019;ve chosen Docker. Copy the entire command line. We will use the token value later in this tutorial (the value after &#x2014;token).</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Configure.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="1011" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Configure.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Configure.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Configure.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/10/Configure.png 2400w" sizes="(min-width: 720px) 720px"></figure><p>On the next page, we need to configure the actual address that we want to use. For my setup, I will use <strong>ha.maciejfil.com</strong>. Under <strong>Service Type</strong>, choose <strong>HTTP</strong>, and set the <strong>URL</strong> to <code>homeassistant.local:8123</code>. Don&#x2019;t worry about HTTP. That only means communication inside the HA virtual machine will not be encrypted, but from client to the machine itself, it will be fully encrypted. <strong>You are safe.</strong></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Aid-public-hostname-for-Haz.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="850" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Aid-public-hostname-for-Haz.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Aid-public-hostname-for-Haz.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Aid-public-hostname-for-Haz.png 1600w, https://maciejfil.com/content/images/2024/10/Aid-public-hostname-for-Haz.png 2159w" sizes="(min-width: 720px) 720px"></figure><p>Now, let&#x2019;s jump to Home Assistant. Go to <strong>Settings -&gt; Add-ons -&gt; Add-on Store</strong>.</p><p>Here, we need to add a new repository (three-dot menu). Paste the following link, click <strong>Add</strong>, and refresh the page: <code>https://github.com/brenner-tobias/ha-addons</code>.</p><p>Now, you should see <strong>Cloudflared</strong>. Click on it and <strong>Install</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Manage-add-on-repositories.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="1050" height="832" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Manage-add-on-repositories.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Manage-add-on-repositories.png 1000w, https://maciejfil.com/content/images/2024/10/Manage-add-on-repositories.png 1050w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-95.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="722" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-95.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-95.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-95.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-95.png 2245w" sizes="(min-width: 720px) 720px"></figure><p>Now, in the upper menu, go to <strong>Configuration</strong>. Click on the little <strong>Advanced</strong> switch and find <strong>Cloudflare Tunnel Token</strong>. Paste the token that we saved a few steps earlier.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-89.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="1273" height="229" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-89.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-89.png 1000w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-89.png 1273w" sizes="(min-width: 720px) 720px"></figure><p>Click <strong>Save</strong>. You will be prompted to restart the service, so agree to it.</p><p>The last step is to add additional configuration to the <strong>configuration.yaml</strong> file. If you haven&#x2019;t installed <strong>File Editor</strong>, you can do that from the Add-On Store. It&#x2019;s available by default.</p><p>Go to <strong>File Editor</strong> and from the <strong>Directory</strong> icon, find and open the <strong>configuration.yaml</strong> file.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Home-Assistant.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="1284" height="797" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Home-Assistant.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Home-Assistant.png 1000w, https://maciejfil.com/content/images/2024/10/Home-Assistant.png 1284w" sizes="(min-width: 720px) 720px"></figure><p>In the file, copy and paste the following lines:</p><pre><code class="language-yaml"># Cloudflared conf
http:
&#xA0; use_x_forwarded_for: true
&#xA0; trusted_proxies: 172.30.33.0/24</code></pre><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Select-trigger-platform.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="1559" height="816" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Select-trigger-platform.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Select-trigger-platform.png 1000w, https://maciejfil.com/content/images/2024/10/Select-trigger-platform.png 1559w" sizes="(min-width: 720px) 720px"></figure><p>Click the <strong>Save</strong> icon in the top right corner. That&#x2019;s all. Now, we need to restart Home Assistant so that the new configuration can be applied.</p><p>Head over to <strong>Developer Tools</strong> and click <strong>Check Configuration</strong>. You should see a green message indicating that everything is okay. Hit the <strong>Restart</strong> button and confirm. After a few seconds, Home Assistant should be up and running again.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-94.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="619" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-94.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-94.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-94.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/10/Pasted-Graphic-94.png 2400w" sizes="(min-width: 720px) 720px"></figure><p>It&#x2019;s time to test our solution. Type the address into your browser. In my case, it was <strong>ha.maciejfil.com</strong>. As you can see, I was able to access my Home Assistant instance through a custom address and from outside my local WiFi network!</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-87.png" class="kg-image" alt="Configure CloudFlare Tunnel for Home Assistant" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-87.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-87.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-87.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-87.png 2000w" sizes="(min-width: 720px) 720px"></figure><h3 id="conclusion"><strong>Conclusion</strong></h3><p>In this tutorial, I&#x2019;ve shown you how easily you can securely expose your Home Assistant to the internet. Now, you will be able to access your home data from anywhere in the world. Please remember to use strong passwords and enable 2FA!</p>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Configure CloudFlare Tunnel for Home Assistant" style="height: 60px !important;width: 217px !important;"></a></div>
<!--kg-card-end: html-->
<p>References:<br>
<a href="https://github.com/brenner-tobias/addon-cloudflared/wiki/How-tos?ref=maciejfil.com">https://github.com/brenner-tobias/addon-cloudflared/wiki/How-tos</a></p>
]]></content:encoded></item><item><title><![CDATA[How to set up Zigbee2MQTT for Home Assistant]]></title><description><![CDATA[<p>Finally, my Home Assistant is up and running. Now it&#x2019;s time to connect my very first home sensor. Today, I will take you through the process of setting up Zigbee2MQTT and connecting Aqara temperature sensor.</p><h3 id="prerequisites"><strong>Prerequisites</strong></h3><ol><li><strong>Running Home Assistant instance ( </strong><a href="https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/"><strong>https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/</strong></a><strong> )</strong></li></ol><h3 id="how-to-install-zigbee2mqtt-in-home-assistant"><strong>How to Install Zigbee2MQTT</strong></h3>]]></description><link>https://maciejfil.com/how-to-set-up-zigbee2mqtt-for-home-assistant/</link><guid isPermaLink="false">66ffdb43e1d5590001ddd9cb</guid><category><![CDATA[home automation]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 04 Oct 2024 14:33:40 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/10/connecting_aqara_sensors_ha.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/10/connecting_aqara_sensors_ha.png" alt="How to set up Zigbee2MQTT for Home Assistant"><p>Finally, my Home Assistant is up and running. Now it&#x2019;s time to connect my very first home sensor. Today, I will take you through the process of setting up Zigbee2MQTT and connecting Aqara temperature sensor.</p><h3 id="prerequisites"><strong>Prerequisites</strong></h3><ol><li><strong>Running Home Assistant instance ( </strong><a href="https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/"><strong>https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/</strong></a><strong> )</strong></li></ol><h3 id="how-to-install-zigbee2mqtt-in-home-assistant"><strong>How to Install Zigbee2MQTT in Home Assistant?</strong></h3><p>To start with,, we need to install message broker - MQTT.&#xA0; Go to your Home Assistant home page and open <strong>Add-on Store</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-60.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1080" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-60.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-60.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-60.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-60.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Next up, click <strong>Mosquito Broker </strong>and<strong> </strong>then<strong> Install.</strong></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Mosquitto-broker.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="808" height="700" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Mosquitto-broker.png 600w, https://maciejfil.com/content/images/2024/10/Mosquitto-broker.png 808w" sizes="(min-width: 720px) 720px"></figure><p>Once we have installed it, a good practice is to have separate HA user that can access message queue (we don&#x2019;t want to expose our secrets, right?). Go to <strong>People</strong> and add a new user.&#xA0; Remember to tick <strong>Local access only.</strong></p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-62.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="1214" height="1718" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-62.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-62.png 1000w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-62.png 1214w" sizes="(min-width: 720px) 720px"></figure><h3 id="add-sonoff-zigbee-bridge-to-ha"><strong>Add Sonoff Zigbee Bridge to HA</strong></h3><p>Now we need to pair our bridge with Zigbee2MQTT. I will use Sonoff ZBDongle-E. Since my Home Assistant is a VM I need to add new device to it. Go to <strong>Proxmox</strong> and find the HA virtual machine. In <strong>Hardware</strong> tab, choose <strong>Add device</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Add-USB-Device.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="1326" height="619" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Add-USB-Device.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Add-USB-Device.png 1000w, https://maciejfil.com/content/images/2024/10/Add-USB-Device.png 1326w" sizes="(min-width: 720px) 720px"></figure><p>To apply that change in the VM we need to restart the machine. You can do it either from Proxmox, or from HA terminal. I choose HA terminal method. Enter the VM and type <code>host restart</code>. After a few seconds, your HA instance should be up again.</p><h3 id="install-aqara-temperature-sensor"><strong>Install Aqara&#xA0;temperature sensor.</strong></h3><p>The device should be visible now. Go to <strong>System</strong> -&gt; <strong>Hardware </strong>and click<strong> All Hardware.</strong></p><p><strong>In most</strong> cases USB dongles are visible under <code>ttyUSB0</code>. Expand that and search for <code>devlinks</code>. Copy that value and save it somewhere.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Hardware.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1744" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Hardware.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Hardware.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Hardware.png 1600w, https://maciejfil.com/content/images/2024/10/Hardware.png 2019w" sizes="(min-width: 720px) 720px"></figure><h3 id="install-zigbee2mqtt-add-on"><strong>Install </strong>Zigbee2MQTT<strong> add-on</strong></h3><p>Head over to <strong>Add-ons store</strong> menu. To be able to install Zigbee2MQTT we need to first add a custom repository. Click the three dot menu in top right corner then <strong>Repositories</strong>. Paste the following link <a href="https://github.com/zigbee2mqtt/hassio-zigbee2mqtt%60?ref=maciejfil.com"><code>https://github.com/zigbee2mqtt/hassio-zigbee2mqtt</code></a>. Click Add.&#xA0;</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-65.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-65.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-65.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-65.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-65.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Now you should be able to see new apps in the store.</p><p>Click and install Zigbee2MQTT add-on. Make sure to enable all the options.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Zigbee2MQTT.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1506" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Zigbee2MQTT.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Zigbee2MQTT.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Zigbee2MQTT.png 1600w, https://maciejfil.com/content/images/2024/10/Zigbee2MQTT.png 2079w" sizes="(min-width: 720px) 720px"></figure><h3 id="configure-zigbee2mqtt"><strong>Configure </strong>Zigbee2MQTT</h3><p>We need to perform some basic configuration to make our solution work. You will need the user credentials and devlink of the USB Bridge from previous steps.</p><p>Still being in the add-on menu, click <strong>Configuration </strong>tab. I prefer to edit entire YAML file and so I recommend to you as well. Click the three dot button and choose <strong>Edit in YAML.</strong>&#xA0;</p><p>You can paste the configuration from here, but please change user credential and serial port.</p><pre><code class="language-YAML">data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: &quot;-d -d&quot;
  log: false
mqtt:
  server: mqtt://core-mosquitto:1883
  user: mqtt-service
  password: password
serial:
  port: &gt;-
    /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_421c3f29cc12ef1185d16db8bf9df066-if00-port0
  adapter: ezsp</code></pre><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-67.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1257" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-67.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-67.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-67.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-67.png 2000w" sizes="(min-width: 720px) 720px"></figure><p><strong>Leave the rest </strong>as default, and save the changes.&#xA0; We can now start the add-on. In the log tab you should see that Zigbee2MQTT is up and running.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-68.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="1269" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-68.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-68.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-68.png 1600w, https://maciejfil.com/content/images/size/w2400/2024/10/Pasted-Graphic-68.png 2400w" sizes="(min-width: 720px) 720px"></figure><h3 id="pair-aqara-device-with-home-assistant"><strong>Pair Aqara device with Home Assistant</strong></h3><p>Only one last step is ahead of us! Go to Zigbee2MQTT in the sidebar. You should see a page containing connected devices. Obviously now it&#x2019;s empty.</p><p>To start the pairing, click Permit join (ALL) option in the top bar. This is a state in which any device can connect to our zigbee network for limited time. At the same time, on your device press the pairing button. In my case - Aqara Temperature Sensor pairing button is on the top and I had to press it for 5 seconds until blue LED appeared. Once paired, your device should be visible in the list.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Pasted-Graphic-69.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="2000" height="423" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Pasted-Graphic-69.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Pasted-Graphic-69.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/10/Pasted-Graphic-69.png 1600w, https://maciejfil.com/content/images/2024/10/Pasted-Graphic-69.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Now you can proceed with adding new devices, or just disable join. The very last step that I recommend you doing is to name your device with something more friendly. Just click the blue button on the right and rename it accordingly. In my case it is Bedroom.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/Rename-device.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="1215" height="693" srcset="https://maciejfil.com/content/images/size/w600/2024/10/Rename-device.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/Rename-device.png 1000w, https://maciejfil.com/content/images/2024/10/Rename-device.png 1215w" sizes="(min-width: 720px) 720px"></figure><p>And that&#x2019;s it! You should now see the temperature values in your room.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/10/X-Aqara-Temp---Bedroom-Temperature.png" class="kg-image" alt="How to set up Zigbee2MQTT for Home Assistant" loading="lazy" width="1174" height="982" srcset="https://maciejfil.com/content/images/size/w600/2024/10/X-Aqara-Temp---Bedroom-Temperature.png 600w, https://maciejfil.com/content/images/size/w1000/2024/10/X-Aqara-Temp---Bedroom-Temperature.png 1000w, https://maciejfil.com/content/images/2024/10/X-Aqara-Temp---Bedroom-Temperature.png 1174w" sizes="(min-width: 720px) 720px"></figure><h3 id="conclusion"><strong>Conclusion</strong></h3><p>In this tutorial I described the entire process of connecting new Aqara sensor to Home Assistant. Try it now yourself!</p>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="How to set up Zigbee2MQTT for Home Assistant" style="height: 60px !important;width: 217px !important;"></a></div>
<!--kg-card-end: html-->
<p>References:<br>
<a href="https://github.com/zigbee2mqtt/hassio-zigbee2mqtt?ref=maciejfil.com#installation">https://github.com/zigbee2mqtt/hassio-zigbee2mqtt#installation</a></p>
]]></content:encoded></item><item><title><![CDATA[How to install Home Assistant OS in Proxmox]]></title><description><![CDATA[<p>I have always wanted to have some kind of home automation at my place. Now that I have my homelab, it is the perfect time to build one.</p><p>In this article, I will show you how to install Home Assistant OS using a nifty little shell script that I came</p>]]></description><link>https://maciejfil.com/how-to-install-home-assistant-os-in-proxmox/</link><guid isPermaLink="false">66f64aeae1d5590001ddd997</guid><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 27 Sep 2024 13:41:54 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/09/home_assistant_installation_guide.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/09/home_assistant_installation_guide.png" alt="How to install Home Assistant OS in Proxmox"><p>I have always wanted to have some kind of home automation at my place. Now that I have my homelab, it is the perfect time to build one.</p><p>In this article, I will show you how to install Home Assistant OS using a nifty little shell script that I came across some time ago. It&apos;s incredibly easy and fun!</p><p><strong>Prerequisites</strong>:</p><ol><li><strong>Proxmox installed </strong>on your machine.</li><li>At least 40GiB of free HDD storage.</li></ol><h3 id="haos-installation-process"><strong>HAOS Installation process</strong></h3><p>Grab the command below and paste it into the Proxmox terminal.</p><p><code>bash -c &quot;$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)&quot;</code></p><p>It can&apos;t get much easier than this. You will be guided in this step-by-step installation process, but there will be some places that we have to make some input.</p><p>The first screen that will appear:</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/This-will-create-a-New-Home-Assistant-OS-VM.-Proceed.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1140" height="470" srcset="https://maciejfil.com/content/images/size/w600/2024/09/This-will-create-a-New-Home-Assistant-OS-VM.-Proceed.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/This-will-create-a-New-Home-Assistant-OS-VM.-Proceed.png 1000w, https://maciejfil.com/content/images/2024/09/This-will-create-a-New-Home-Assistant-OS-VM.-Proceed.png 1140w" sizes="(min-width: 720px) 720px"></figure><p>Hit enter.</p><p>On the next screen, select Yes, and on the following screen, choose <strong>Advanced</strong>.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-50.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1117" height="444" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-50.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-50.png 1000w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-50.png 1117w" sizes="(min-width: 720px) 720px"></figure><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Use-Default-Settings.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1100" height="452" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Use-Default-Settings.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Use-Default-Settings.png 1000w, https://maciejfil.com/content/images/2024/09/Use-Default-Settings.png 1100w" sizes="(min-width: 720px) 720px"></figure><p>On the version screen, please select the stable version - it is the most reliable.</p><p>HINT: to exit selection mode, press `TAB`.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-52.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1113" height="453" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-52.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-52.png 1000w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-52.png 1113w" sizes="(min-width: 720px) 720px"></figure><p>Leave the default Machine Type.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Choose-Type.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1109" height="442" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Choose-Type.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Choose-Type.png 1000w, https://maciejfil.com/content/images/2024/09/Choose-Type.png 1109w" sizes="(min-width: 720px) 720px"></figure><p>On the next screen, you can choose your hostname. I chose `home-assistant`, but feel free to provide any name.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/HOSTNAME.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1099" height="370" srcset="https://maciejfil.com/content/images/size/w600/2024/09/HOSTNAME.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/HOSTNAME.png 1000w, https://maciejfil.com/content/images/2024/09/HOSTNAME.png 1099w" sizes="(min-width: 720px) 720px"></figure><p>For CPU cores, my recommendation is 2. Two cores will be sufficient for most use cases.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-55.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1096" height="360" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-55.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-55.png 1000w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-55.png 1096w" sizes="(min-width: 720px) 720px"></figure><p>RAM can be left default. I set mine at 4096MiB.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Allocate-RAM-in-MiB.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1085" height="356" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Allocate-RAM-in-MiB.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Allocate-RAM-in-MiB.png 1000w, https://maciejfil.com/content/images/2024/09/Allocate-RAM-in-MiB.png 1085w" sizes="(min-width: 720px) 720px"></figure><p>Agree to the last prompts, and we are done with the configuration.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Ready-to-create-HAOS-13.1-VM.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1098" height="427" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Ready-to-create-HAOS-13.1-VM.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Ready-to-create-HAOS-13.1-VM.png 1000w, https://maciejfil.com/content/images/2024/09/Ready-to-create-HAOS-13.1-VM.png 1098w" sizes="(min-width: 720px) 720px"></figure><p>And this is how the installation process looks like:</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-58.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="1813" height="1156" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-58.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-58.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-58.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-58.png 1813w" sizes="(min-width: 720px) 720px"></figure><h3 id="home-assistant-initial-setup"><strong>Home Assistant Initial Setup</strong></h3><p>Now that we have our new VM installed, let&#x2019;s connect to our HA instance. Head to your newly created VM shell, and you should see a screen similar to this:</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Waiting-for-the-Home-Assistant-CLI-to-be-ready....png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="791" height="660" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Waiting-for-the-Home-Assistant-CLI-to-be-ready....png 600w, https://maciejfil.com/content/images/2024/09/Waiting-for-the-Home-Assistant-CLI-to-be-ready....png 791w" sizes="(min-width: 720px) 720px"></figure><p>Take note of the IP address of the VM, then head to your browser and paste that address. Don&#x2019;t forget to add port. In my case the address would be: `192.168.1.34:8123`.&#xA0;</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Preparing-Home-Assistant.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Preparing-Home-Assistant.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Preparing-Home-Assistant.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Preparing-Home-Assistant.png 1600w, https://maciejfil.com/content/images/2024/09/Preparing-Home-Assistant.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Once you open the website, Home Assistant will take a few moments to configure itself, and then you will see the welcome screen. Two options there - either complete new setup, or recreate instance from backup. Since this is a new installation, I&apos;m choosing &apos;Create My Smart Home`</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-20.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-20.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-20.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-20.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-20.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>You will be asked to enter your credentials. Remember to <strong>use strong password</strong>!</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-21.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-21.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-21.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-21.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-21.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>Also, in order to present to you the latest weather forecast and also enable some features that use geolocation, select your home address.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-22.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-22.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-22.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-22.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-22.png 2000w" sizes="(min-width: 720px) 720px"></figure><p>And that&#x2019;s it. Your Home Assistant is ready!</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-23.png" class="kg-image" alt="How to install Home Assistant OS in Proxmox" loading="lazy" width="2000" height="1261" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-23.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-23.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-23.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-23.png 2000w" sizes="(min-width: 720px) 720px"></figure><h3 id="conclusion"><strong>Conclusion</strong></h3><p>In this tutorial, I guided you through the entire process of installing Home Assistant OS. Now you are ready to create your own home automation.</p>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="How to install Home Assistant OS in Proxmox" style="height: 60px !important;width: 217px !important;"></a></div>
<!--kg-card-end: html-->
<p>References:<br>
<a href="https://www.derekseaman.com/2023/10/home-assistant-proxmox-ve-8-0-quick-start-guide-2.html?ref=maciejfil.com">https://www.derekseaman.com/2023/10/home-assistant-proxmox-ve-8-0-quick-start-guide-2.html</a></p>
<p></p>]]></content:encoded></item><item><title><![CDATA[How to update Sonoff ZBDongle-E firmware]]></title><description><![CDATA[<p>When setting up your home automation system, one of the most popular devices to connect all your sensors is the Sonoff ZBDongle-E. It is commonly used with Zigbee2MQTT and Home Assistant.</p><p>The first step you should take after purchasing one is to <strong>update the firmware</strong>, or in other words, <strong>flash</strong></p>]]></description><link>https://maciejfil.com/how-to-update-sonoff-zbdongle-e-firmware/</link><guid isPermaLink="false">66ec1164e1d5590001ddd96e</guid><category><![CDATA[home automation]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 20 Sep 2024 13:00:19 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/09/Update_sonoff_dongle-e.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/09/Update_sonoff_dongle-e.png" alt="How to update Sonoff ZBDongle-E firmware"><p>When setting up your home automation system, one of the most popular devices to connect all your sensors is the Sonoff ZBDongle-E. It is commonly used with Zigbee2MQTT and Home Assistant.</p><p>The first step you should take after purchasing one is to <strong>update the firmware</strong>, or in other words, <strong>flash it</strong>. This ensures you have the latest security and stability updates installed.</p><p>In this short tutorial I will show you how to update the firmware.</p><h3 id="updating-sonoff-zbdongle-e"><strong>Updating Sonoff ZBDongle-E</strong></h3><p>In my case, I used a MacBook Air, but you perform the update on any operating system.&#xA0;</p><p>You should use browsers like <strong>Chrome</strong> or <strong>Microsoft Edge</strong>.</p><ol><li>Head over to this Github page <a href="https://darkxst.github.io/silabs-firmware-builder/?ref=maciejfil.com">https://darkxst.github.io/silabs-firmware-builder/</a> . You will notice several options.&#xA0;</li><li>Scroll down a bit, and you will see <code>Connect</code><strong> </strong>button.&#xA0;</li><li>After a few seconds, you will need to choose which firmware to install. I suggest selecting the default one - the latest. At the time of writing this article, the latest stable version is <code>EZSP 7.3.1.0</code>.&#xA0;</li><li>Proceed with the update process. After a few minutes, you should see a result similar to the screen below:</li></ol><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/09/Pasted-Graphic-5.png" class="kg-image" alt="How to update Sonoff ZBDongle-E firmware" loading="lazy" width="2000" height="1631" srcset="https://maciejfil.com/content/images/size/w600/2024/09/Pasted-Graphic-5.png 600w, https://maciejfil.com/content/images/size/w1000/2024/09/Pasted-Graphic-5.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/09/Pasted-Graphic-5.png 1600w, https://maciejfil.com/content/images/2024/09/Pasted-Graphic-5.png 2394w" sizes="(min-width: 720px) 720px"></figure><h3 id="for-windows-users"><strong>For Windows users</strong></h3><p>You may be prompted to manually update device drivers. If so, follow the link provided there and download the latest drivers. Then, go to Device Manager, locate the Dongle, and Update the driver by right clicking on the Dongle. You will have to provide directory where you saved downloaded drivers. After successful update, remove and replug in the dongle. It should now be visible in Chrome/Edge.</p><h3 id="troubleshooting"><strong>Troubleshooting</strong></h3><p>During my research, quite a lot of users had problems connecting to the Sonoff Dongle-E. Each time they clicked <code>Connect</code> button, they had an error.</p><p>To avoid this:</p><ol><li>Make sure that you are using the <strong>latest versions </strong>of Chrome or MS Edge.</li><li><strong>Disable</strong> any kind of <strong>ad-blockers</strong>.</li><li>Have device <strong>drivers</strong> always <strong>up to date</strong>.</li></ol><p>There is also another way of flashing the dongle, but I will cover that in later tutorial.</p><h3 id="conclusion"><strong>Conclusion</strong></h3><p>In this tutorial I shown you how to update your Sonoff ZBDongle-E device to the latest version. Now you should be ready to connect it to your home automation solution.</p>
<!--kg-card-begin: html-->
<p>If you found this article helpful, consider buying me a coffee. This helps me continue writing these articles for you!</p>
<div style="text-align: center"><a href="https://www.buymeacoffee.com/maciejfil?ref=maciejfil.com" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="How to update Sonoff ZBDongle-E firmware" style="height: 60px !important;width: 217px !important;"></a></div>
<!--kg-card-end: html-->
<p>References:<br>
<a href="https://darkxst.github.io/silabs-firmware-builder/?ref=maciejfil.com">https://darkxst.github.io/silabs-firmware-builder/</a></p>
]]></content:encoded></item><item><title><![CDATA[Diagram as code - introduction]]></title><description><![CDATA[<p>Since my homelab is expanding, I came up with the idea that maybe it is time to start documenting the solutions I am building so that I do not have to keep everything in my head. I&#x2019;m terrible at drawing, so discovering Diagram as Code was a the</p>]]></description><link>https://maciejfil.com/diagram-as-code-introduction/</link><guid isPermaLink="false">66e12d5ae1d5590001ddd947</guid><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 13 Sep 2024 13:00:03 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/09/diagram_As_code.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/09/diagram_As_code.png" alt="Diagram as code - introduction"><p>Since my homelab is expanding, I came up with the idea that maybe it is time to start documenting the solutions I am building so that I do not have to keep everything in my head. I&#x2019;m terrible at drawing, so discovering Diagram as Code was a the perfect match.</p><h3 id="what-is-diagram-as-code"><strong>What is Diagram as Code?</strong></h3><p>It&#x2019;s a tool written in Python, that lets you easily create neat looking diagrams, especially good for prototyping architecture or any other IT-related work.</p><h3 id="why-you-need-it"><strong>Why you need it?</strong></h3><p>The main advantage of that solution is that it allows you to track every little change - as everything is written with simple Python script. Then you just push it to your Git repository, and from that point on, you have the entire history. Besides, it has a large number of icons, so you do not have to look around for a specific SVG file on the internet.</p><h3 id="how-to-install-dac"><strong>How to install DaC?</strong></h3><p>Below instructions are made for macOs users, but I&#x2019;m linking resources below for other operating systems, so that you could still benefit from this article.</p><p>First step is to install Python libraries. I&#x2019;m using <code>homebrew</code> to manage installed packages.</p><p><code>brew install python3</code></p><p>Then we need to install Graphviz, which is a visualization software. What that package does is to produce a final diagram image as a png file.</p><p><code>brew install graphviz</code></p><p>We need to also install diagrams module.</p><p>First, create a folder where you will store your diagrams.</p><p>Then we need to set up a virtual environment so that we can install the diagrams module.</p><pre><code class="language-shell">python3 -m venv ./env
source ./env/bin/activate</code></pre><p>then run <code>pip3 install diagrams</code></p><p>I would also suggest initiating a Git repository here to track changes using a simple <code>git init</code>.</p><p>You should be now ready to go!</p><h3 id="diagram-as-code-example"><strong>Diagram as Code example</strong></h3><p>As I mentioned in the beginning, I wanted to document my local network architecture. This is a sample of the code I created.</p><p>You can copy and paste it to your file and see the outcome.&#xA0;</p><p>Don&#x2019;t forget to save your file and execute the script with `python3 diagram.py`.</p><pre><code class="language-python">from diagrams import Diagram, Cluster
from diagrams.generic.network import Router, Switch
from diagrams.onprem.proxmox import ProxmoxVE
from diagrams.onprem.compute import Server
from diagrams.onprem.database import Postgresql
from diagrams.onprem.groupware import Nextcloud
from diagrams.onprem.client import Client
from diagrams.generic.os import Ubuntu

with Diagram(&quot;Home network&quot;, show=True, direction=&quot;TB&quot;):
&#xA0; &#xA0; router = Router(&quot;router&quot;)
&#xA0; &#xA0; switch = Switch(&quot;switch&quot;)
&#xA0; &#xA0; tv = Client(&quot;tv&quot;)
&#xA0; &#xA0; xbox = Client(&quot;xbox&quot;)
&#xA0;&#xA0; &#xA0;
&#xA0; &#xA0; with Cluster(&quot;Proxmox&quot;):
&#xA0; &#xA0; &#xA0; &#xA0; proxmox = ProxmoxVE(&quot;pve-1&quot;)
&#xA0; &#xA0; &#xA0; &#xA0; proxmox - [Server(&quot;home-assistant&quot;),
&#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; Postgresql(&quot;postgresql&quot;),
&#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; Nextcloud(&quot;next-cloud&quot;),
&#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; Ubuntu(&quot;ws-2&quot;)]

&#xA0; &#xA0; router &lt;&lt; proxmox
&#xA0; &#xA0; router &lt;&lt; switch
&#xA0; &#xA0; switch &lt;&lt; tv
&#xA0; &#xA0; switch &lt;&lt; xbox
</code></pre><p>After running in terminal <code>python3 diagram.py</code> a png file will be created in your directory. Mine diagram looks like that:</p><h3 id="conclusion"><strong>Conclusion</strong></h3><p>In this article, I briefly described how you can create any sort of architectural diagram, that is easy to maintain and track history. That was just an introduction. Feel free to explore the topic and adjust the options to your needs. You can find detailed documentation below.</p><p>References:</p><p>References:<br>
<a href="https://diagrams.mingrammer.com/?ref=maciejfil.com">https://diagrams.mingrammer.com/</a></p>
]]></content:encoded></item><item><title><![CDATA[How to create Linux Containers in Proxmox]]></title><description><![CDATA[<p>In today&apos;s article, I will guide you through setting up a Linux container.</p><p><strong>What Is a Linux Container (LXC)?&#xA0;</strong></p><p>In simple terms, each Linux container is an extremely lightweight virtualization solution. Each container acts as a full-fledged operating system - just like in a VM - but</p>]]></description><link>https://maciejfil.com/how-to-create-linux-containers-in-proxmox/</link><guid isPermaLink="false">66d08d1ee1d5590001ddd91c</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 30 Aug 2024 13:00:28 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/08/lxc_proxmox.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/08/lxc_proxmox.png" alt="How to create Linux Containers in Proxmox"><p>In today&apos;s article, I will guide you through setting up a Linux container.</p><p><strong>What Is a Linux Container (LXC)?&#xA0;</strong></p><p>In simple terms, each Linux container is an extremely lightweight virtualization solution. Each container acts as a full-fledged operating system - just like in a VM - but with one difference: it is shares the host&#x2019;s kernel.&#xA0;</p><p>You can run LXCs on every linux distribution. In its early stages, Docker (which I&#x2019;m sure you are familiar with) utilized Linux containers.</p><p><strong>#1 Download the Template</strong></p><p>As the first step, let&#x2019;s jump into Proxmox and head over to local storage. Then click <code>CT Templates</code>. In the upper part click <code>Templates</code> and a list of available templates will appear. Select desired template. For the purpose of this tutorial, I will be using <strong>Ubuntu 24.04</strong>. Hit <code>Download</code> and wait until it finishes.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-7.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1359" height="642" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-7.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-7.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-7.png 1359w" sizes="(min-width: 720px) 720px"></figure><p><strong>#2 Create LXC</strong></p><p>Let me now guide you through the process of creating Linux container. In Proxmox, the process is quite simple and can be done entirely through the GUI. In top right corner find Create CT, and click it. Window should pop up.</p><p>There, fill in required data:&#xA0;</p><ul><li>CT ID - I recommend leaving as is, but you can change it,</li><li>hostname - of your choice,</li><li>password, confirm password,</li><li>SSH public key - if you have, paste here contents of the .pub file</li></ul><p>Leave <code>Unprivileged container</code> (has limited access to host resources, thus a bit more secure) and <code>Nesting</code> checkbox as is and hit Next.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1448" height="1078" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic.png 1448w" sizes="(min-width: 720px) 720px"></figure><p>In the next window choose the template you want to use. As mentioned earlier, I will be using Ubuntu.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-1.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1452" height="1092" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-1.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-1.png 1452w" sizes="(min-width: 720px) 720px"></figure><p>Next up, we will set up Disk space. I suggest leaving it as is - 8GB, but feel free to extend as you like. Other parameters can be left as default.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-2.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1450" height="1086" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-2.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-2.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-2.png 1450w" sizes="(min-width: 720px) 720px"></figure><p>In the next tab, we will be configuring CPU. Number of cores available depends on the machine that you are running. In my case I have 4 cores available, but I don&#x2019;t want to use them all. Since this LXC is just for the purposes of this article, I&#x2019;m choosing 1 core, and setting the <code>CPU Limit</code> to 1 as well. <code>CPU limit</code> is important to set, as trust me - you don&#x2019;t want to let the container to adjust number of cores used by itself.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Create-LXC-Container.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1444" height="1080" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Create-LXC-Container.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Create-LXC-Container.png 1000w, https://maciejfil.com/content/images/2024/08/Create-LXC-Container.png 1444w" sizes="(min-width: 720px) 720px"></figure><p><code>Memory</code> tab is quite straight forward. I&#x2019;m not planning to use that LXC heavily, I will set both <code>Memory</code> and <code>Swap</code> to 512MiB.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-4-1.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1454" height="1088" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-4-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-4-1.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-4-1.png 1454w" sizes="(min-width: 720px) 720px"></figure><p>Next, the Networking tab. Here I&#x2019;m using DHCP to acquire IPv4 address, but if you can setup it manually if you want so. Other than that, I leave all other parameters as default.&#xA0;</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-5.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="1454" height="1090" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-5.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-5.png 1000w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-5.png 1454w" sizes="(min-width: 720px) 720px"></figure><p>In `DNS` section I also leave it default as I&#x2019;m not running any local DNS server.</p><p>At the last tab there will be a summary of all our setup. Hit Finish, and wait a bit.</p><p>You should notice on the left side that the LXC has been created, but it is not running yet.</p><p>Click on the new container and press `Start` to run it.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-6.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="2000" height="608" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-6.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-6.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/Pasted-Graphic-6.png 1600w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-6.png 2000w" sizes="(min-width: 720px) 720px"></figure><p><strong>#3 Verify the solution</strong></p><p>While still in your container, navigate to <code>Console</code>.&#xA0; Login as <code>root</code>. You should be welcomed with a standard message, just like in the screen below.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-7-1.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="2000" height="745" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-7-1.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-7-1.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/Pasted-Graphic-7-1.png 1600w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-7-1.png 2164w" sizes="(min-width: 720px) 720px"></figure><p>To learn, what IP your machine has, you can type <code>ip a</code> command.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/Pasted-Graphic-8.png" class="kg-image" alt="How to create Linux Containers in Proxmox" loading="lazy" width="2000" height="795" srcset="https://maciejfil.com/content/images/size/w600/2024/08/Pasted-Graphic-8.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/Pasted-Graphic-8.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/Pasted-Graphic-8.png 1600w, https://maciejfil.com/content/images/2024/08/Pasted-Graphic-8.png 2234w" sizes="(min-width: 720px) 720px"></figure><p>Now you can easily SSH as root to your new Linux Container.</p><h3 id="conclusion">Conclusion</h3><p>In this article I showed you how to create Linux Containers in Proxmox GUI. You can see that the process takes only a few minutes. Try it out in your own Proxmox instance!</p><p>References:</p><p><a href="https://www.redhat.com/en/topics/containers/whats-a-linux-container?ref=maciejfil.com">https://www.redhat.com/en/topics/containers/whats-a-linux-container</a><br>
<a href="https://www.baeldung.com/linux/privileged-container-capabilities?ref=maciejfil.com">https://www.baeldung.com/linux/privileged-container-capabilities</a><br>
<a href="https://www.cyberciti.biz/tips/linux-swap-space.html?ref=maciejfil.com">https://www.cyberciti.biz/tips/linux-swap-space.html</a></p>
]]></content:encoded></item><item><title><![CDATA[How to backup MySQL database]]></title><description><![CDATA[<p>I was looking for a solution to back up my MySQL database in a automatic manner. I found that the easiest solution would be to utilize <code>mysqldump</code> which would be run by a <code>cron</code> job. I had a few struggles making that work, so today in this short article, I</p>]]></description><link>https://maciejfil.com/how-to-backup-mysql-database/</link><guid isPermaLink="false">66c63fdae1d5590001ddd87e</guid><category><![CDATA[backup]]></category><category><![CDATA[linux]]></category><category><![CDATA[databases]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 23 Aug 2024 13:00:07 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/08/MYSQL_BACKUP.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/08/MYSQL_BACKUP.png" alt="How to backup MySQL database"><p>I was looking for a solution to back up my MySQL database in a automatic manner. I found that the easiest solution would be to utilize <code>mysqldump</code> which would be run by a <code>cron</code> job. I had a few struggles making that work, so today in this short article, I will guide you on how to set it up in an Ubuntu environment.</p><h3 id="1-install-mysqldump">#1 install mysqldump</h3><p>You should install the latest version of <code>mysqldump</code>. To check if you have one, paste into terminal <code>mysqldump --version</code> . If not, install it using the following: <code>apt-get install mysqlclient</code> . That command will install all the necessary packages. Confirm the installation with <code>mysqldump --version</code> command.</p><h3 id="2-perform-a-trial-backup">#2 perform a trial backup</h3><p>Before we continue, prepare connection data to your database. We will need database user, password, host (the address) and database name, that you would like to backup.</p><p>Copy and paste the command. Make sure to fill in your connection details:</p><pre><code class="language-shell">mysqldump -u DB_USERNAME -h DB_HOST -p DB_NAME &gt; db_dump.sql </code></pre><p>When you hit enter, you will be asked to provide password. Enter it, and then backup will start. Depending on how big is your database, the process may take a while.</p><p>If succeeded (I bet it went okay!) you should be able to see an sql file in your directory. But now, <strong>how can we automate database backup</strong>? </p><h3 id="3-create-a-shell-script">#3 create a shell script</h3><p>You probably noticed, that in previous step we had to manually fill in database password. That complicate things, but there is an easy solution. Create a file called <code>.my.cnf</code> in your home directory, and then open it in your text editor of choice. I&apos;m using <code>nano</code> .</p><pre><code class="language-shell">touch .my.cnf
nano .my.cnf</code></pre><p>Paste in the following:</p><pre><code class="language-shell">[mysqldump]
password=DB_PASSWORD</code></pre><p>Save and close the file. </p><p>Next up, change the CHMOD of that file to 600 <code>chmod 600 .my.cnf</code> </p><p>You can now test if the solution works with the command:</p><pre><code class="language-shell">mysqldump -u DB_USERNAME -h DB_HOST DB_NAME &gt; db_dump.sql </code></pre><p>Notice that I&apos;ve removed the <code>-p</code> parameter. </p><p>Okay, now lets create a shell script. Create a file for example <code>touch /usr/local/bin/backup_database.sh</code> . Straight away, make the file executable, so <code>chmod +x /usr/local/bin/backup_database.sh</code> . Open it and paste the following bash commands.</p><pre><code class="language-shell">#!/bin/bash

DB_USER=&quot;db_user&quot;
DB_HOST=&quot;db_host&quot;
DB_NAME=&quot;db_name&quot;
# Backup dir - full path e.g
BACKUP_DIR=&quot;home/ubuntu/backups/database&quot;
DATE=$(date +%Y%m%d%H%M)

# Creates backup dir if not exists
mkdir -p ${BACKUP_DIR}

# specify output file names with dir
DUMP_FILE=&quot;${BACKUP_DIR}/${DB_NAME}_backup_${DATE}.sql&quot;
TAR_FILE=&quot;${BACKUP_DIR}/${DB_NAME}_backup_${DATE}.tar.gz&quot;

# execute backup
mysqldump -h ${DB_HOST} -u ${DB_USER} ${DB_NAME} &gt; ${DUMP_FILE}

# checking if success
if [ $? -eq 0 ]; then
  echo &quot;Database backup successful, compressing the file...&quot;

  tar -czf ${TAR_FILE} -C ${BACKUP_DIR} $(basename ${DUMP_FILE})

  # delete non-compressed file
  rm ${DUMP_FILE}

  echo &quot;Backup completed: ${TAR_FILE}&quot;
else
  echo &quot;Backup failed!&quot;
fi</code></pre><p>I briefly explained each line in the comments. Now let&apos;s execute the script! </p><p><code>. /usr/local/bin/backup-database.sh</code> and you should see that backup was successful.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-10.png" class="kg-image" alt="How to backup MySQL database" loading="lazy" width="2000" height="1279" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-10.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-10.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-10.png 1600w, https://maciejfil.com/content/images/2024/08/image-10.png 2180w" sizes="(min-width: 720px) 720px"></figure><h3 id="4-schedule-a-cron-job">#4 schedule a cron job</h3><p>Of course, we don&apos;t want to run that script manually. We would prefer to schedule it somewhere for the middle of the night &#x1F604;. Here is a quick <code>cron</code> tutorial for you.</p><p>Type <code>crontab -e</code> and hit enter - your text editor will open. Add to the very end of file the following:</p><p><code>10 0 * * * /usr/local/bin/backup-database.sh</code></p><p>Save and close the text editor. And that&apos;s it! You&apos;ve just scheduled an automatic job to backup your MySQL database everyday at 0.10am!</p>
<!--kg-card-begin: html-->
<div class="ml-embedded" data-form="S2SpGW"></div>
<!--kg-card-end: html-->
<h3 id="conclusion">Conclusion</h3><p>In this article, I showed you how to set up a fully automatic MySQL database backup in a Linux environment in four steps. Try it now, and remember to backup your precious data!</p>]]></content:encoded></item><item><title><![CDATA[How to resize Ubuntu disk hosted on Proxmox]]></title><description><![CDATA[<p>It turned out, that while creating a VM template in Proxmox 10G of storage is not enough if you want Ubuntu server and some apps running on Docker. I learned this the hard way &#x1F604;.</p><p>I found extending disk space in the VM quite challenging, here&apos;s how to</p>]]></description><link>https://maciejfil.com/how-to-resize-disk-drive-in-proxmox-vm/</link><guid isPermaLink="false">66bcef2b8f15780001eb6d7d</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[Maciej Filutowski]]></dc:creator><pubDate>Fri, 16 Aug 2024 11:19:42 GMT</pubDate><media:content url="https://maciejfil.com/content/images/2024/08/RESIZE_DISK_UBUNTU_PROXMOX.png" medium="image"/><content:encoded><![CDATA[<img src="https://maciejfil.com/content/images/2024/08/RESIZE_DISK_UBUNTU_PROXMOX.png" alt="How to resize Ubuntu disk hosted on Proxmox"><p>It turned out, that while creating a VM template in Proxmox 10G of storage is not enough if you want Ubuntu server and some apps running on Docker. I learned this the hard way &#x1F604;.</p><p>I found extending disk space in the VM quite challenging, here&apos;s how to do it.</p><h3 id="1-extend-vm-disk-space-in-proxmox">#1 extend VM disk space in Proxmox</h3><p>It can be easily done in Proxmox GUI. Go to your <strong>VM -&gt; Options -&gt; Hardware</strong> and click on <strong>Hard Disk</strong>. Now select Disk Action and choose <strong>Resize.</strong></p><p>A modal will pop up. Here enter a value that you want your disk to be resized with. In my case I want to add 20G of space.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-3.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="518" height="314"></figure><p>Once applied - we&apos;re not done yet. Start your VM and log in to terminal.</p><h3 id="2-extending-root-space">#2 extending root space</h3><p>Log into your Ubuntu VM. When you enter <code>df -h</code> you will notice that nothing really changed.</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-4.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="2000" height="1196" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-4.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-4.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-4.png 1600w, https://maciejfil.com/content/images/2024/08/image-4.png 2254w" sizes="(min-width: 720px) 720px"></figure><p>We need to run couple of commands. Follow along.</p><p>Firstly, we need to know which partition we need to extend.<br>
Run <code>lsblk</code>. You will see that <code>ubuntu--vg-ubuntu--lv</code> is attached to <code>sda3</code>, so that is the place that we should extend.</p>
<figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-5.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="2000" height="1196" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-5.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-5.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-5.png 1600w, https://maciejfil.com/content/images/2024/08/image-5.png 2254w" sizes="(min-width: 720px) 720px"></figure><p>Next up, type in <code>sudo cfdisk</code>. Navigate down to <code>/dev/sda3/</code> and choose <code>Resize</code> option. You will be asked to provide the new size. By default it will be set to max avaiable size. Then, choose <code>Write</code> option, and <code>Quit</code>.</p>
<figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-6.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="2000" height="1196" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-6.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-6.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-6.png 1600w, https://maciejfil.com/content/images/2024/08/image-6.png 2254w" sizes="(min-width: 720px) 720px"></figure><p>Okay, change are still not visible. Let&apos;s continue with<br>
<code>sudo pvresize /dev/sda3</code>.<br>
Now before we go to the next step, we need to find out what the Logical Volume Name is (LV name). To do that enter <code>sudo lvdisplay</code> and copy the LV name parameter. In my case it is <code>/dev/ubuntu-vg/ubuntu-lv</code>.<br>
Next up enter the follwing command:<br>
<code>lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv</code><br>
We are nearly there. When we check <code>sudo lvdisplay</code> we can see that LV size is now what we expected. But still, we need to resize the root file system. To do that we need to know which filesystem to resize. Hit <code>df -h</code> and find <code>/dev/mapper/ubuntu--vg-ubuntu--lv</code>.</p>
<figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-7.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="2000" height="1196" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-7.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-7.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-7.png 1600w, https://maciejfil.com/content/images/2024/08/image-7.png 2254w" sizes="(min-width: 720px) 720px"></figure><p>I promise it&apos;s the last step. To resize the filesystem, just run the command:  <code>resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv</code></p><p>And that&apos;s it! Verify the changes with <code>df -h</code> .</p><figure class="kg-card kg-image-card"><img src="https://maciejfil.com/content/images/2024/08/image-9.png" class="kg-image" alt="How to resize Ubuntu disk hosted on Proxmox" loading="lazy" width="2000" height="1196" srcset="https://maciejfil.com/content/images/size/w600/2024/08/image-9.png 600w, https://maciejfil.com/content/images/size/w1000/2024/08/image-9.png 1000w, https://maciejfil.com/content/images/size/w1600/2024/08/image-9.png 1600w, https://maciejfil.com/content/images/2024/08/image-9.png 2254w" sizes="(min-width: 720px) 720px"></figure><h3 id="conclusion">Conclusion</h3><p>I&apos;ve showed you how to extend disk space in your Ubuntu hosted on Proxmox with just a few Linux commands. Now when your VM approaches disk limit, you can easily extend the volume.</p><p>References:<br>
<a href="https://pve.proxmox.com/wiki/Resize_disks?ref=maciejfil.com">https://pve.proxmox.com/wiki/Resize_disks</a><br>
<a href="https://www.youtube.com/watch?v=58m0hnt0ij8&amp;ref=maciejfil.com">https://www.youtube.com/watch?v=58m0hnt0ij8</a></p>
]]></content:encoded></item></channel></rss>