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

<channel>
	<title>Server &#8211; Tollius Labs</title>
	<atom:link href="https://jessendelft.org/category/diy/server/feed/" rel="self" type="application/rss+xml" />
	<link>https://jessendelft.org</link>
	<description>By Jessendelft</description>
	<lastBuildDate>Wed, 29 Oct 2025 13:09:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://jessendelft.org/wp-content/uploads/2025/10/cropped-TolliusLabs-1-32x32.png</url>
	<title>Server &#8211; Tollius Labs</title>
	<link>https://jessendelft.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>From TrueNAS CORE to TrueNAS SCALE</title>
		<link>https://jessendelft.org/from-truenas-core-to-truenas-scale/</link>
					<comments>https://jessendelft.org/from-truenas-core-to-truenas-scale/#respond</comments>
		
		<dc:creator><![CDATA[Jessendelft]]></dc:creator>
		<pubDate>Tue, 28 Oct 2025 18:43:38 +0000</pubDate>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://blog.jessendelft.org/?p=779</guid>

					<description><![CDATA[I finally bit the bullet. After years of running my trusty TrueNAS CORE server, I decided it was time to make the jump to TrueNAS SCALE — the newer, Linux-based version that’s now iXsystems’ main focus. When CORE officially moved into “sustaining engineering” in early 2024 — meaning no more new features, just maintenance and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p data-start="197" data-end="401">I finally bit the bullet. After years of running my trusty TrueNAS CORE server, I decided it was time to make the jump to TrueNAS SCALE — the newer, Linux-based version that’s now iXsystems’ main focus.</p>
<p data-start="403" data-end="719">When CORE officially moved into “sustaining engineering” in early 2024 — meaning no more new features, just maintenance and security updates — I knew I had to migrate sooner rather than later. By April 2025, with the release of SCALE 25.04 and the final CORE update (13.3-U1.2), the priority of this task became even greater. However, I knew upgrading would take me quite some effort, so I kept postponing it. Until last week, when the wife was out of town and I could work undisturbed deep into the night for a couple of days while the kids were in bed.</p>
<h2>TrueNAS? Core? Scale?</h2>
<p>Hold on, not so fast I hear you think. What even <em>are</em> these programs I&#8217;m talking about, and why are they relevant?</p>
<p>All right, in September 2021 I bought myself a <a href="https://www.truenas.com/blog/truenas-mini-x-and-mini-x-plus/">TrueNAS Mini X+</a> as my new private NAS server. After previously running <a href="https://blog.jessendelft.org/home-nas-server-setup/">my website on an Intel NUC</a>, I quietly upgraded to a proper NAS. I kept the NUC solely for Home Assistant, and moved the rest of my smart home stack to the new Mini X+. TrueNAS CORE was the Operating System (OS) I used for my NUC as a home server, so it made sense to continue using it on my new hardware.</p>
<p data-start="1567" data-end="1748">TrueNAS CORE is an open-source OS specifically designed for servers and network-attached storage (NAS). It’s built upon FreeBSD and is widely praised for its rock-solid stability.</p>
<style>.eic-frame-796 { width: 500px; height:500px; background-color: #444444; border: 4px solid #444444; }.eic-frame-796 .eic-image { border: 4px solid #444444; }</style><div class="eic-container"><div class="eic-frame eic-frame-796 eic-frame-square" data-layout-name="square" data-orig-width="500" data-orig-border="4" data-ratio="1"><div class="eic-image eic-image-0" data-size-x="648" data-size-y="484" data-pos-x="-76" data-pos-y="0"><img decoding="async" src="https://jessendelft.org/wp-content/uploads/2025/10/PXL_20251027_203454912-scaled.jpg" style="width: 648px !important;height: 484px !important;max-width: none !important;max-height: none !important;position: absolute !important;left: -76px !important;top: 0px !important;padding: 0 !important;margin: 0 !important;border: none !important;" title="PXL_20251027_203454912" alt="PXL_20251027_203454912" /></div></div></div>
<blockquote>
<p style="text-align: center;">TrueNAS Mini X+</p>
</blockquote>
<p>Also around this time, iXsystems — the company behind TrueNAS — released the first public beta of TrueNAS SCALE, a new OS built upon Linux. In their early announcements, they explicitly <a href="https://www.ixsystems.com/blog/truenas-scale-high-level-plans/">wrote</a>: <em>“Production users with standard NAS (NFS, SMB, iSCSI, S3) requirements are still advised to use TrueNAS CORE … SCALE has inherited some of that maturity … but has not completed its software quality lifecycle.”</em></p>
<p data-start="2189" data-end="2596">That was fine by me. I already knew my way around CORE and had a good, stable NAS system running, which I simply migrated to my new hardware.<br />
FreeBSD offers a way to run isolated extra applications through a feature called <em data-start="2415" data-end="2422">jails</em>. Programs in jails operate independently from the host system — like mini-sandboxes &#8211; but share the same kernel as the host system making them far more efficient than full virtual machines.</p>
<p data-start="2598" data-end="2708">Over the last four years, I’d built up a stack of nine jails hosting a total of fourteen different programs:</p>
<ul>
<li><em>Adguard</em> &#8211; blocking ads on my home network.</li>
<li><em>Grafana </em>&#8211; fancy graphs for showing smart-home data.</li>
<li><em>WordPress</em> &#8211; this website.</li>
<li><em>Mosquitto</em> &#8211; MQTT server for collecting smart-home data.</li>
<li><em>Nextcloud</em> &#8211; a private alternative to Dropbox or Google Drive.</li>
<li><em>Plex</em> &#8211; a private alternative to Netflix.</li>
<li><em>Handbrake</em> &#8211; ripping DVD&#8217;s for my Plex library</li>
<li><em>Radarr/Servar/Readarr/Prowlarr/Transmission</em> &#8211; automated torrent indexing and downloading.</li>
<li><em>Nginx Reverse Proxy</em> &#8211; allowing access from the internet to my internal programs.</li>
</ul>
<p>However, as time went on, TrueNAS SCALE matured and began to outpace CORE in terms of features, app support, and active development. By early 2024, iXsystems had officially confirmed that CORE would only receive critical fixes going forward, while SCALE would be the focus for all new functionality. Then, in April 2025, they released SCALE 25.04 alongside what was announced as the <em data-start="3673" data-end="3680">final</em> CORE 13.3 update — version 13.3-U1.2 — effectively marking the end of the CORE development line.</p>
<p>And that gave me a bit of a problem.</p>
<p>See, migrating from CORE to SCALE is usually pretty painless — the official tools can migrate nearly all system settings and file shares automatically. However, one of the major exceptions is <em data-start="2386" data-end="2393">jails</em> (the other being virtual machines, which I didn’t use). Since SCALE is built on Linux, it relies on Docker containers to run extra applications. Docker containers are inherently different from FreeBSD jails, so they can’t be transferred automatically. That meant I had to rebuild all fourteen of my programs manually, which I expected would be… well, a bit of a pain and pretty time consuming.</p>
<p>I’d actually been keeping an eye on SCALE for quite a while and had considered migrating since version 24.10 (released in October 2024). After a year of postponing — and finally having a few quiet days at home in October 2025 — I decided to go for it: time to future-proof my NAS and take advantage of the new features that SCALE offers.</p>
<figure id="attachment_811" aria-describedby="caption-attachment-811" style="width: 719px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="size-full wp-image-811" src="https://blog.jessendelft.org/wp-content/uploads/2025/10/Electric-Eel-Emerges.png" alt="" width="719" height="411" srcset="https://jessendelft.org/wp-content/uploads/2025/10/Electric-Eel-Emerges.png 719w, https://jessendelft.org/wp-content/uploads/2025/10/Electric-Eel-Emerges-300x171.png 300w" sizes="(max-width: 719px) 100vw, 719px" /><figcaption id="caption-attachment-811" class="wp-caption-text">TrueNAS SCALE 24.10 artwork</figcaption></figure>
<h2>Migrating to SCALE</h2>
<p>The entire migration process ended up taking a week. As in, I started on a Friday… and wasn’t done until the Thursday after.</p>
<h3>Friday evening &#8211; Backup &amp; migration</h3>
<p data-start="5059" data-end="5273">I started by taking backups of all my programs. The migration from CORE to SCALE is a one-way process, so I wanted to be absolutely sure nothing important got lost. Luckily, most backups were straightforward.</p>
<p data-start="5275" data-end="5506"><em>WordPress</em>? Used a plugin.<br data-start="5300" data-end="5303" /><em>Reverse proxy</em>? Just copied the <code data-start="5334" data-end="5346">proxy.conf</code> file.<br data-start="5352" data-end="5355" /><em>Radarr</em> and <em>Sonarr</em>? Clicked the handy “Backup” button.<br data-start="5408" data-end="5411" /><em>Nextcloud</em> was the only one that needed a bit of command-line work to dump the MySQL database.</p>
<p data-start="5508" data-end="5850">All in all, after about two hours, everything important was backed up. Since my files would still be accessible after the migration — and I also have an off-site backup — I didn’t bother backing up large media files like my <em>Nextcloud</em> data or <em>Plex</em> library. I just focused on configuration, databases, and anything I couldn’t easily recreate.</p>
<p>For completeness, I also backed up all my NAS settings, certificates, and took screenshots of important automation schedules. That turned out to be unnecessary, because the OS migration itself was incredibly smooth. In CORE, go to Settings -&gt; Update, choose SCALE 24.04 and press <a href="https://www.truenas.com/docs/scale/24.10/gettingstarted/migrate/migratingfromcore/"><em>Download &amp; Apply</em></a>. One coffee later, my Mini X+ rebooted and greeted me with the shiny new SCALE login screen.</p>
<p>To my surprise, all my system settings — users, permissions, certificates, shares — had migrated perfectly. By that time it was getting late, so I decided to quit on a high note and leave the app setup for the next day.</p>
<figure id="attachment_824" aria-describedby="caption-attachment-824" style="width: 1387px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-824 size-full" src="https://jessendelft.org/wp-content/uploads/2025/10/Truenas-Scale-Dashboard.png" alt="" width="1387" height="787" srcset="https://jessendelft.org/wp-content/uploads/2025/10/Truenas-Scale-Dashboard.png 1387w, https://jessendelft.org/wp-content/uploads/2025/10/Truenas-Scale-Dashboard-300x170.png 300w, https://jessendelft.org/wp-content/uploads/2025/10/Truenas-Scale-Dashboard-1024x581.png 1024w, https://jessendelft.org/wp-content/uploads/2025/10/Truenas-Scale-Dashboard-768x436.png 768w" sizes="(max-width: 1387px) 100vw, 1387px" /><figcaption id="caption-attachment-824" class="wp-caption-text">My new TrueNAS SCALE dashboard.</figcaption></figure>
<h3>Saturday evening &#8211; Reverse proxy &amp; Docker containers</h3>
<p data-start="249" data-end="652">After some initial poking around (okay, I admit it — I tried to install all my apps simultaneously because I’m impatient, which naturally failed spectacularly with a flood of error messages I didn’t understand), I figured it was best to start by getting the reverse proxy back up and running. After all, most of my other apps rely on it, and it didn’t seem like the most complicated one to start with.</p>
<p data-start="654" data-end="1152">The thing with Docker containers is that their filesystem is normally hidden from the user. Depending on the app, SCALE allows you to mount certain directories as easily accessible folders on the host system. This was new to me, and it forced me to think about a good way to organize everything. It also took me a while to realize that, for this to work, both the folder and all parent folders you’re mounting into need the correct permissions — otherwise the mount fails and the app won’t start.</p>
<p data-start="1154" data-end="1504">To keep things simple, I ended up creating a new dataset in the root of my filesystem called Apps. Inside that dataset, I created a child dataset for each app I wanted to mount. The main Apps dataset has broad access permissions, while each app dataset is tailored to its specific needs. I figured that should be secure enough for my setup.</p>
<figure id="attachment_786" aria-describedby="caption-attachment-786" style="width: 1058px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-786 size-full" src="https://jessendelft.org/wp-content/uploads/2025/10/Datasets.png" alt="" width="1058" height="562" srcset="https://jessendelft.org/wp-content/uploads/2025/10/Datasets.png 1058w, https://jessendelft.org/wp-content/uploads/2025/10/Datasets-300x159.png 300w, https://jessendelft.org/wp-content/uploads/2025/10/Datasets-1024x544.png 1024w, https://jessendelft.org/wp-content/uploads/2025/10/Datasets-768x408.png 768w" sizes="(max-width: 1058px) 100vw, 1058px" /><figcaption id="caption-attachment-786" class="wp-caption-text">My dataset structure after the migration.</figcaption></figure>
<p>That evening, I managed to get the reverse proxy up and running. As a bonus, I now had a fancy web interface to configure it &#8211; something I didn&#8217;t have before. I also got <em>AdGuard</em> up and running. While researching how to set up the reverse proxy, I stumbled across something called <em><a href="https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/">Cloudflare Tunnel</a></em>, which might allow me to get rid of the reverse proxy. Hmm&#8230; well not now &#8211; let&#8217;s try and reach parity with the old system first.</p>
<h3>Sunday evening &#8211; Formula 1</h3>
<p>Sunday was race day, so priorities were clear.</p>
<p>Though before the race I looked some more at <em>Cloudflare<strong>d</strong></em> (Cloudflare’s tunnel client). It&#8217;s a small program that creates a secure, outbound tunnel between my home server and Cloudflare&#8217;s network. This lets you access services like <em>Nextcloud</em> or <em>WordPress</em> remotely — no open ports, no self-signed certificates, no dynamic DNS updates. Everything runs &#8220;securely&#8221; through the tunnel. I say &#8220;securely&#8221;, because the downside is that Cloudflare is in charge of security, and because of that in theory can see all my network traffic.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-805 size-full" src="https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared.png" alt="" width="1600" height="866" srcset="https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared.png 1600w, https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared-300x162.png 300w, https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared-1024x554.png 1024w, https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared-768x416.png 768w, https://jessendelft.org/wp-content/uploads/2025/10/Cloudflared-1536x831.png 1536w" sizes="auto, (max-width: 1600px) 100vw, 1600px" /></p>
<h3>Monday &#8211; Nextcloud</h3>
<p>Monday was dedicated entirely to <em>Nextcloud</em>.</p>
<p>The official <em>Nextcloud</em> app in Truenas SCALE uses a <span style="font-size: 1rem;"><em>PostgreSQL</em> </span>database, opposed to the <em>MySQL</em> database I was using previously &#8211; and had a backup for. My inexperience using docker, lack of a computer running Linux and general inexperience with databases meant that it took me a good part of the day to figure out how to convert my <em>MySQL</em> database into a <span style="font-size: 1rem;"><em>PostgreSQL</em> </span>database. For those interested, what worked in the end for me was to:</p>
<ol>
<li>Set up 4 docker containers:<br />
&#8211; <em>Nextcloud </em>&#8211; This is where we eventually want the database to go.<br />
<span style="font-size: 1rem;">&#8211; </span><span style="font-size: 1rem;"><em>Pgloader</em> &#8211; A tool to convert between <em>MySQL</em> and <em>PostgreSQL</em>.</span><br />
<span style="font-size: 1rem;">&#8211; <em>MySQL:8.0</em> &#8211; Important this is version 8.0 or lower, otherwise <em>PgLoader</em> doesn&#8217;t work.</span><span style="font-size: 1rem;"><br />
&#8211; </span><span style="font-size: 1rem;"><em>PostgreSQL</em> &#8211; a separate container to load the database into.</span></li>
<li><span style="font-size: 1rem;">Load the <em>MySQL</em> backup into the <em>MySQL</em> container.</span></li>
<li>Use <em>PgLoader</em> to migrate the database from <em>MySQL</em> to <span style="font-size: 1rem;"><em>PostgreSQL</em>.</span></li>
<li>Dump the <span style="font-size: 1rem;"><em>PostgreSQL</em> </span>database and restore it into the <em>Nextcloud</em> container.</li>
</ol>
<p>Apart from the database, I also had troubles mounting my files correctly to the docker container, and getting the permissions of the datasets to match. So in addition I used a lot of time making sure <em>Nextcloud</em> could actually find my files. I left out a lot of troubleshooting here, the entire process took me almost 14 hours to get right.</p>
<style>.eic-frame-799 { width: 500px; height:500px; background-color: #444444; border: 4px solid #444444; }.eic-frame-799 .eic-image { border: 4px solid #444444; }</style><div class="eic-container"><div class="eic-frame eic-frame-799 eic-frame-square" data-layout-name="square" data-orig-width="500" data-orig-border="4" data-ratio="1"><div class="eic-image eic-image-0" data-size-x="695" data-size-y="484" data-pos-x="-90" data-pos-y="0"><img decoding="async" src="https://jessendelft.org/wp-content/uploads/2025/10/Nextcloud-Loginpage.png" style="width: 695px !important;height: 484px !important;max-width: none !important;max-height: none !important;position: absolute !important;left: -90px !important;top: 0px !important;padding: 0 !important;margin: 0 !important;border: none !important;" title="Nextcloud Loginpage" alt="Nextcloud Loginpage" /></div></div></div>
<blockquote>
<p style="text-align: center;">My Nextcloud login page. I was very happy when I saw this again.</p>
</blockquote>
<h3>Tuesday &#8211; Cloudflared, Radarr/Sonarr, Plex</h3>
<p>On Tuesday, I gave Cloudflare Tunnel a proper test. I disabled my reverse proxy, set up <em>Cloudflared</em>, and configured it to expose my <em>Nextcloud</em> instance to the internet. So far, performance looks great — and it’s far easier to maintain than my previous <em>Nginx</em> setup. I&#8217;ll be testing this out to make sure it performs well in the upcoming weeks/months, but it is looking promising and an easier to use alternative than my reverse proxy setup. And I trust that one of the largest online security providers in the world is able to handle my data securely and discretely &#8211; their entire business model is based around that.</p>
<p>On Tuesday I also re-installed my <em>Radarr</em>/<em>Servarr</em> and <em>Transmission</em> setup. <em>Radarr</em> (for finding movies) and <em>Servarr</em> (for finding series) luckily had easy to use restore functions, so setting them up was very easy, especially after all my troubles from the day before. <em>Transmission</em> is just a downloading tool, so no need to do any restoring there.</p>
<p>I also re-installed <em>Plex</em>. The <em>Plex</em> backup itself worked flawlessly, so all my settings were still there. It however turned out that I had messed up the access permissions to my movie files &#8211; I suspect it was an issue with the dataset they were in &#8211; but instead of trying to find out how to fix it I decided to start from scratch, delete everything and re-download/re-rip movies when I see the need for them. No big deal, after my wins with the other apps (getting <em>Nextcloud</em> back was much more critical) I was comfortable taking this loss. And it freed up a good chunk of hard disk space.</p>
<style>.eic-frame-807 { width: 500px; height:500px; background-color: #444444; border: 4px solid #444444; }.eic-frame-807 .eic-image { border: 4px solid #444444; }</style><div class="eic-container"><div class="eic-frame eic-frame-807 eic-frame-square" data-layout-name="square" data-orig-width="500" data-orig-border="4" data-ratio="1"><div class="eic-image eic-image-0" data-size-x="826" data-size-y="484" data-pos-x="0" data-pos-y="0"><img decoding="async" src="https://jessendelft.org/wp-content/uploads/2025/10/Plex.png" style="width: 826px !important;height: 484px !important;max-width: none !important;max-height: none !important;position: absolute !important;left: 0px !important;top: 0px !important;padding: 0 !important;margin: 0 !important;border: none !important;" title="Plex" alt="Plex" /></div></div></div>
<blockquote>
<p style="text-align: center;">Plex (my personal Netflix) back up and running.</p>
</blockquote>
<h3>Wednesday evening &#8211; Grafana &amp; InfluxDB</h3>
<p data-start="10272" data-end="10339">Wednesday was for the smart-home dashboard <em>Grafana</em> (and <em>InfluxDB</em>).</p>
<p data-start="10341" data-end="10521">On CORE, I had used the official <em>Grafana</em> plugin, which came bundled with <em>InfluxDB</em> <em>v1</em>. On SCALE, the <em>Grafana</em> app no longer includes <em>InfluxDB</em>, so I had to install both separately.</p>
<p>The difficulty here was the age of my <em>influxDB</em> database. When I set up the original <em>Grafana</em> plugin in 2020 <em>InfluxDB v2</em> had just come out, but &#8216;everything&#8217; still ran on the older v1, including the plugin. This had never been updated, so getting up to speed on the &#8216;new&#8217; v2 nomenclature and updating Home Assistant &#8211; which pushes data to the database &#8211; to use the new api took a bit of research. But after an hour or 2 I also had this up and running again.</p>
<figure id="attachment_500" aria-describedby="caption-attachment-500" style="width: 1279px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-500 size-full" src="https://jessendelft.org/wp-content/uploads/2020/08/Grafana_MagicMirror_display.png" alt="" width="1279" height="744" srcset="https://jessendelft.org/wp-content/uploads/2020/08/Grafana_MagicMirror_display.png 1279w, https://jessendelft.org/wp-content/uploads/2020/08/Grafana_MagicMirror_display-300x175.png 300w, https://jessendelft.org/wp-content/uploads/2020/08/Grafana_MagicMirror_display-1024x596.png 1024w, https://jessendelft.org/wp-content/uploads/2020/08/Grafana_MagicMirror_display-768x447.png 768w" sizes="auto, (max-width: 1279px) 100vw, 1279px" /><figcaption id="caption-attachment-500" class="wp-caption-text">Grafana dashboard.</figcaption></figure>
<h3>Thursday evening &#8211; WordPress</h3>
<p>Lastly, I turned my attention to <em>WordPress</em> and getting the website you&#8217;re looking at now back online. I’d actually tried to get a <em>WordPress</em> app running earlier in the week, but for some reason it kept failing on me. In the end, I discovered that one of the storage mounts in the app settings was causing the issue — specifically the <em data-start="479" data-end="511">WordPress MariaDB Data Storage</em>. Since I didn’t need external access to that anyway, I left it internal to the Docker container. With a fresh <em>WordPress</em> site I used a migration tool to restore my website and all its settings.</p>
<p>That was the last piece of the puzzle. For those paying attention I did not migrate the <em>Mosquitto</em> app, as that had actually become obsolete a few months earlier due to changes in my smart home setup. After a week of work I had successfully migrated from CORE to SCALE.</p>
<h2>So what now?</h2>
<p>SCALE makes it easy to pass through a GPU to your apps. My <em>Plex</em> setup will benefit a lot from that — it enables <a href="https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/">GPU Transcoding</a>, which should let it stream high-definition video across the network more smoothly and (hopefully) get rid of the occasional stuttering we’ve been seeing. I have already ordered a new GPU for exactly this purpose.</p>
<p>On top of that, the app library in SCALE is much larger than the old plugin library in CORE, so I’ll have plenty more apps to experiment with in the future. And since everything runs as Docker containers, I can even spin up my own if something isn’t available as a pre-built app.</p>
<p>I do enjoy tinkering with new tools and software, so I’m sure it won’t take long before I find some new, creative ways to expand what my NAS can do.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessendelft.org/from-truenas-core-to-truenas-scale/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>OpenVPN on a Raspberry Pi</title>
		<link>https://jessendelft.org/openvpn-on-a-raspberry-pi/</link>
					<comments>https://jessendelft.org/openvpn-on-a-raspberry-pi/#comments</comments>
		
		<dc:creator><![CDATA[Jessendelft]]></dc:creator>
		<pubDate>Mon, 28 Sep 2020 20:39:19 +0000</pubDate>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://cloud.jessendelft.org/?p=511</guid>

					<description><![CDATA[My parents and I, who come from the Netherlands, have recently bought a cabin in Norway. We have a lot of wishes and ideas for this cabin, but one of the first projects I started on right after we signed the contract was the setup of a VPN server on a Raspberry Pi. The goal [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>My parents and I, who come from the Netherlands, have recently bought a cabin in Norway. We have a lot of wishes and ideas for this cabin, but one of the first projects I started on right after we signed the contract was the setup of a VPN server on a Raspberry Pi. The goal is to have any device connecting to the WiFi in the cabin appearing to be in the Netherlands, so that my parents can &#8216;work from home&#8217; from the cabin and can stream Dutch TV and Dutch Netflix. For this to work, we need a router that can act as a VPN Client and a VPN Server to connect to.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-517 size-full" src="https://cloud.jessendelft.org/wp-content/uploads/2020/09/VPN-Tunnel-Hytte.png" alt="" width="901" height="222" srcset="https://jessendelft.org/wp-content/uploads/2020/09/VPN-Tunnel-Hytte.png 901w, https://jessendelft.org/wp-content/uploads/2020/09/VPN-Tunnel-Hytte-300x74.png 300w, https://jessendelft.org/wp-content/uploads/2020/09/VPN-Tunnel-Hytte-768x189.png 768w" sizes="auto, (max-width: 901px) 100vw, 901px" /></p>
<p>By having the router connecting to the VPN Server, any device that connects to the router will also be connected via the same tunnel to the internet. By installing the VPN server on a Raspberry Pi, I can just ship a readily installed unit to the Netherlands with minimal setup steps for my parents while they remain 100% in control of their VPN endpoint. This is important to ensure that for example Netflix will not block their stream, as any data appears to come from their own home instead of a (known) VPN provider.</p>
<p>For this project we use the following components:</p>
<ul>
<li>Raspberry Pi model 3B</li>
<li><a href="https://www.thingiverse.com/thing:3240926">3D printed case</a></li>
<li><a href="https://www.asus.com/Networking/4G-AC68U/">Asus 4G-AC68U</a> 4G modem/router</li>
</ul>
<p>I recently bought an <a href="https://cloud.jessendelft.org/installed-a-mesh-wifi-network/">Asus RT-AC66U B1</a> router, which I know can act as a VPN Client. The Asus 4G-AC68U is a model from the same product line, which also includes a 4G simcard slot.</p>
<p>Software-wise, we only need only a handful of services/programs:</p>
<ul>
<li>The latest <a href="https://www.raspberrypi.org/downloads/raspberry-pi-os/">Raspbian Lite</a></li>
<li>PiVPN</li>
<li>A Dynamic DNS provider, I&#8217;m using Google Domains</li>
<li>ddclient</li>
</ul>
<h2>Setup</h2>
<p>The first step is obviously to flash Raspbian on an SD-card and shuf it into the Raspberry. I&#8217;m using Raspbian Lite since we know exactly which software packages we are going to use, and any dependencies will be installed with them. This will keep the overall system performance as high as possible.</p>
<p>After setting up Raspbian, we use SSH to log in as root and install <a href="https://www.seeedstudio.com/blog/2020/07/02/set-up-a-raspberry-pi-vpn-server-using-pivpn-and-browse-securely-on-public-networks-m/">PiVPN</a>. PiVPN will install either OpenVPN or WireGuard, in our case OpenVPN as this is also supported in the Asus router. I have set up the IP configuration to be dynamic, so it can adapt to the setup in my parent&#8217;s house once it arrives in the post. Other than that I&#8217;ve used the standard settings, obviously choosing the right DNS Provider (Google Domains). I had also set up a Dynamic DNS entry in Google Domains prior to the Raspberry Pi installation, which will be used for this VPN setup.</p>
<h3>Dynamic IP lookup</h3>
<p>Since I don&#8217;t know the public IP address of my parents house (and they might have a dynamic IP address that changes every once in a while), one can use Dynamic DNS. Basically, Dynamic DNS checks the current public IP address of the host and sends this to a pre-configured DNS provider. The provider matches the IP address, for example <em>185<wbr />.176<wbr />.244<wbr />.205,</em> to a subdomain name, for example <em>cloud.jessendelft.org</em>. This way, anytime a device tries to find <em>cloud.jessendelft.org</em> they only have to ask the DNS provider, which will then provide them with the correct public IP address. To achieve this on the Raspberry Pi we can use <a href="https://samhobbs.co.uk/2015/01/dynamic-dns-ddclient-raspberry-pi-and-ubuntu">ddclient</a>. ddclient only needs to know a few basic parameters such as the login credentials of the DNS provider and does the rest by itself. It runs as a deamon in the background, automatically checking and updating the current public IP address in the DNS register.</p>
<p>I generated two OpenVPN configuration files which can be uploaded to VPN Clients and allows them to connect to the server, one for the Asus router and one for my private PC so I can test &amp; debug the entire setup. These configuration files include instructions to use one of my subdomains to find the current public IP address of the OpenVPN Server in the Netherlands. This keeps the setup easy and flexible.</p>
<p>Lastly, I entered the Wi-Fi credentials of my parents house in a file called &#8216;wpa-supplicant.conf&#8217; and placed this in the /boot/ folder of the Raspberry Pi, so they can use it both in wired and wireless mode. After running a few tests it was then ready to send it in the post, and hope that all works! I also included a guide for my father to set up the required port forwarding in his router in the Netherlands, so the VPN Server can be found from the internet.</p>
<h2>Testing the setup</h2>
<p>When the Raspberry Pi had arrived in the Netherlands it was time to put it to the test. We forwarded the required port in the router, gave it a static local IP address and attempted to connect from Norway.</p>
<p><strong>Connecting was successful!</strong><br />
However, the test-pc did not have internet access.</p>
<figure id="attachment_524" aria-describedby="caption-attachment-524" style="width: 955px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-524" src="https://cloud.jessendelft.org/wp-content/uploads/2020/09/WhatsApp-Image-2020-10-03-at-14.15.44-e1601888495633.jpeg" alt="" width="955" height="612" srcset="https://jessendelft.org/wp-content/uploads/2020/09/WhatsApp-Image-2020-10-03-at-14.15.44-e1601888495633.jpeg 955w, https://jessendelft.org/wp-content/uploads/2020/09/WhatsApp-Image-2020-10-03-at-14.15.44-e1601888495633-300x192.jpeg 300w, https://jessendelft.org/wp-content/uploads/2020/09/WhatsApp-Image-2020-10-03-at-14.15.44-e1601888495633-768x492.jpeg 768w" sizes="auto, (max-width: 955px) 100vw, 955px" /><figcaption id="caption-attachment-524" class="wp-caption-text">The VPN Server in its natural habitat.</figcaption></figure>
<p>Some debugging later revealed that the ethernet port did not have the default <em>eth0</em> name, but something more tropical. Changing the name of the ethernet port in the configuration (<a href="https://openvpn.net/community-resources/how-to/#redirect">iptables</a>) fixed the problem and allowed internet access through the VPN tunnel. Hooray!</p>
<p>Lastly we installed <a href="https://mcuoneclipse.com/2019/04/01/log2ram-extending-sd-card-lifetime-for-raspberry-pi-lorawan-gateway/">Log2Ram</a>, which limits the logging done to the SD-card to extend the lifetime of the system. SD-cards can get corrupted when written too often to, so in order to limit the amount of write cycles Log2Ram will save all logs in RAM memory and only once a day write the entire logfiles to the SD-card.</p>
<p>A reboot to make sure everything works and it was finally time to check the speed of the connection!</p>
<figure id="attachment_525" aria-describedby="caption-attachment-525" style="width: 350px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-525 size-full" src="https://cloud.jessendelft.org/wp-content/uploads/2020/09/Speedtest.png" alt="" width="350" height="200" srcset="https://jessendelft.org/wp-content/uploads/2020/09/Speedtest.png 350w, https://jessendelft.org/wp-content/uploads/2020/09/Speedtest-300x171.png 300w" sizes="auto, (max-width: 350px) 100vw, 350px" /><figcaption id="caption-attachment-525" class="wp-caption-text">Speedtest over 4G</figcaption></figure>
<p>Honestly, this is 10x as high as expected when we started on this project so we&#8217;re certainly very happy about this! This will allow my parents to comfortably travel to their cabin and use the internet, while they appear to be in the Netherlands.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessendelft.org/openvpn-on-a-raspberry-pi/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Playing with Grafana &#038; InfluxDB</title>
		<link>https://jessendelft.org/playing-with-grafana-influxdb/</link>
					<comments>https://jessendelft.org/playing-with-grafana-influxdb/#respond</comments>
		
		<dc:creator><![CDATA[Jessendelft]]></dc:creator>
		<pubDate>Mon, 17 Aug 2020 16:00:39 +0000</pubDate>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://cloud.jessendelft.org/?p=496</guid>

					<description><![CDATA[In my search for a way to display the data being collected by Homey I often have seen Grafana as an option. Grafana is a tool to visualize data in graphs, gauges, tables, etc. It reads data from a database, is very responsive and easy to work with. As a bonus, FreeNAS offers a community [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In my search for a way to display the data being collected by Homey I often have seen <a href="https://grafana.com/">Grafana</a> as an option. Grafana is a tool to visualize data in graphs, gauges, tables, etc. It reads data from a database, is very responsive and easy to work with. As a bonus, <a href="https://cloud.jessendelft.org/home-nas-server-setup/#freenas">FreeNAS </a>offers a community plug-in which has both Grafana and InfluxDB installed and ready to go, so I could easily set up a <a href="https://cloud.jessendelft.org/home-nas-server-setup/#jails">jail</a> to try it out.</p>
<p>Homey by itself does not log any data. To have it upload its variables to the InfluxDB database I just had to install the <a href="https://homey.app/no-no/app/homey.influxdb/InfluxDb/">InfluxDB App</a>, fill in the IP address of the Grafana jail &amp; credentials of the database, et voila! From the Grafana interface I started seeing the potential Query fields being populated with all the data that Homey had to offer. Not much time after that, I had my first Dashboard populated with energy measurements, real-time power consumption and temperature data from different rooms in the house. With a little more playing around this Dasboard was shown as an iframe on my <a href="https://cloud.jessendelft.org/magic-mirror-build-3-upgrades/">Magic Mirror</a>.</p>
<figure id="attachment_502" aria-describedby="caption-attachment-502" style="width: 1920px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-502" src="https://cloud.jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893.jpg" alt="" width="1920" height="1696" srcset="https://jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893.jpg 1920w, https://jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893-300x265.jpg 300w, https://jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893-1024x905.jpg 1024w, https://jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893-768x678.jpg 768w, https://jessendelft.org/wp-content/uploads/2020/08/IMG_20200813_172724-scaled-e1597671102893-1536x1357.jpg 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /><figcaption id="caption-attachment-502" class="wp-caption-text">Grafana dashboard shown as an iframe on the Magic Mirror</figcaption></figure>
<p>After doing this I realized that FreeNAS is also a great source of data (CPU usage, network &amp; HDD speeds, RAM usage etc.) and a place where I&#8217;d like to get some more overview of what&#8217;s happening. Naturally, a quick Google-search yielded tons of people who had done this before, and I followed <a href="https://www.homelabrat.com/freenas-homelab-dashboard/">this guide</a> to get FreeNAS to upload its data to a separate InfluxDB database and create a Dashboard in Grafana. I then used this dashboard as an inspiration to create a similar one for Homey and by the end of the day I had 3 different dashboards which give me a neat insight in how well my core-components from my smart home are working.</p>
<p>An additional line in the <a href="https://cloud.jessendelft.org/home-nas-server-setup/#reverseproxy">reverse proxy</a> configuration and the Grafana jail was accessible through the internet. Curious on how it looks? You can find it here: <a href="http://cloud.jessendelft.org/grafana/">cloud.jessendelft.org/grafana/</a>.<br />
Username: viewer<br />
Password: viewer123</p>
<p>I am not sure yet if I want to keep using this system, as I ultimately want some form of 2D/3D interactive map of my house to show this information. As an interim solution though, this is quite nice and I was surprised by how easy it was to include this in my system. I like the fact that all the ground-work is up and running (FreeNAS, Reverse Proxy, Homey, etc.), and that it apparently is working so well that it is easy to build layers of complexity upon them with for example the Grafana dashboards. If you have comments/ideas on what I can do with my data, or how I can improve my system even more, please let me know in the comments!</p>
<p>Cheers!<br />
Jesper</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessendelft.org/playing-with-grafana-influxdb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Home NAS Server Setup</title>
		<link>https://jessendelft.org/home-nas-server-setup/</link>
					<comments>https://jessendelft.org/home-nas-server-setup/#respond</comments>
		
		<dc:creator><![CDATA[Jessendelft]]></dc:creator>
		<pubDate>Tue, 19 May 2020 21:13:55 +0000</pubDate>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Home Projects]]></category>
		<category><![CDATA[Server]]></category>
		<guid isPermaLink="false">https://cloud.jessendelft.org/?p=242</guid>

					<description><![CDATA[This website runs on an Intel NUC. Actually, a lot of things are now running on this little NUC. Before showing you exactly what processes/services are running, please allow me to explain why I have this NUC in the first place. Home Assistant and the NUC In our previous house I was running Home Assistant [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This website runs on an Intel NUC.</p>
<p>Actually, a lot of things are now running on this little NUC. Before showing you exactly what processes/services are running, please allow me to explain why I have this NUC in the first place.</p>
<h3>Home Assistant and the NUC</h3>
<p>In our previous house I was running <a href="https://www.home-assistant.io/">Home Assistant</a> on a Raspberry Pi. Home Assistant is a piece of software that can observe, control and automate nearly anything that can be part of a smart home. In my case, I had the following devices connected to it:</p>
<ul>
<li>Philips Hue lights</li>
<li>A Google Chromecast</li>
<li>Some Google Home speakers</li>
<li><a style="color: #000000;" href="https://www.aqara.com/en/temperature_humidity_sensor.html">Xiaomi Aqara Temperature sensors</a></li>
<li>An Anet A8 3D printer running <a href="https://octoprint.org/">Octoprint</a></li>
<li>My <a href="https://cloud.jessendelft.org/index.php/2020/04/22/magic-mirror-build-3/">Magic Mirror</a></li>
<li>A PlayStation 4</li>
<li>A Netgear router</li>
</ul>
<p>Linking all these devices together required something more robust than a Raspberry Pi, hence why in April 2019 I bought an <a href="https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc6cayh.html">Intel NUC NUC6CAYH</a>. This little fellah has an Intel Cerion CPU, place for a maximum of 2x 4GB of DDR3L RAM, can house a 2.5&#8243; hard drive and has a 1Gb ethernet port. I figured that this was a very good alternative for a Raspberry Pi, whilst also keeping my wallet in mind.</p>
<p>This NUC ran Home Assistant (or HA for short) very reliably, although the HA software itself needed quite some maintenance, up until we moved in December 2019. The NUC disappeared in a box, and at the new house I bought an <a href="https://homey.app/en-us/">Athom Homey</a> to take over the task of HA in an attempt to limit the amount of maintenance work. This is why I had a NUC laying around when I decided to start setting up a Home Server in January 2020.</p>
<h1>First step: Setting up a NAS file server</h1>
<p>When I started on this project I knew nothing about file- or NAS servers, but I imagined that there would be open source software out there that could help me out. I had decided that I did not want to buy new hardware, as things could be tested on the NUC first to see if it would be good enough.<a id="freenas"></a></p>
<p>Two names that kept popping up were <a href="http://freenas.org">FreeNAS</a> and <a href="http://unraid.net">Unraid</a>. They both looked equally good candidates for me, so I picked the one that felt like it had the best chance of succeeding -&gt; FreeNAS. Over the last couple of months I have been very happy with this choice. FreeNAS is running very stable and is in my opinion easy to use. The initial file server setup was a breeze, and in no-time I had a functioning NAS server which could be accessed through a PC with Windows Explorer (via a Samba share).<a id="jails"></a></p>
<p>FreeNAS has a functionality which are called &#8216;Jails&#8217;. Jails are, very shortly explained, little isolated operating systems that use the same kernel as the hosts operating system. This means that they are more lightweight to run than a Virtual Machine as they dynamically share available RAM, CPU &amp; HDD space between the host and other jails, but simultaneously are compartmentalized from the host. Processes run inside the jail can only access files inside the jail, and processes/files inside the jail are not aware of any file outside the jail. An additional (much better) introduction to jails can be found <a href="https://www.ixsystems.com/community/threads/a-quick-intro-to-jails.39220/">here</a>. All in all, they are a perfect place to run additional programs/services without the risk of breaking my entire NAS system.</p>
<h1>The current setup</h1>
<figure id="attachment_279" aria-describedby="caption-attachment-279" style="width: 2016px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-279" src="https://cloud.jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962.jpg" alt="" width="2016" height="1164" srcset="https://jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962.jpg 2016w, https://jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962-300x173.jpg 300w, https://jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962-1024x591.jpg 1024w, https://jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962-768x443.jpg 768w, https://jessendelft.org/wp-content/uploads/2020/05/IMG_20200507_215420-scaled-e1589961560962-1536x887.jpg 1536w" sizes="auto, (max-width: 2016px) 100vw, 2016px" /><figcaption id="caption-attachment-279" class="wp-caption-text">The current HW setup, including PS4 Pro and Philips Hue bridge</figcaption></figure>
<h3>Hardware</h3>
<p>The current hardware today is, as I mentioned, running on an Intel NUC. This includes:</p>
<ul>
<li>an <a href="https://www.intel.com/content/www/us/en/products/processors/celeron/j3455.html">Intel® Celeron® Processor J3455</a></li>
<li>2x 4GB RAM</li>
<li>1x 1Gb ethernet port</li>
<li>2x 2 TB of HDD, 1 internal and 1 external</li>
</ul>
<p>The HDD&#8217;s are set up in a mirrored configuration. That means that all data is copied on both drives, giving me an effective storage capacity of 2 TB whilst also protecting myself from a disk failure. This is also called a <a href="https://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_1">RAID 1</a> setup.</p>
<h3>FreeNAS Software setup</h3>
<p>The current setup is running 3 jails, 1 Virtual Machine, a samba share and some additional smaller services inside FreeNAS:</p>
<figure id="attachment_273" aria-describedby="caption-attachment-273" style="width: 760px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-273 size-full" src="https://cloud.jessendelft.org/wp-content/uploads/2020/05/FreeNAS-Jails.png" alt="" width="760" height="351" srcset="https://jessendelft.org/wp-content/uploads/2020/05/FreeNAS-Jails.png 760w, https://jessendelft.org/wp-content/uploads/2020/05/FreeNAS-Jails-300x139.png 300w" sizes="auto, (max-width: 760px) 100vw, 760px" /><figcaption id="caption-attachment-273" class="wp-caption-text">FreeNAS services setup</figcaption></figure>
<ul>
<li>The Samba share allows us to access files on the server when we&#8217;re on the home network.</li>
<li>The website that you see right now is running inside a Jail.</li>
<li>A second jail contains NextCloud. NextCloud mainly allows for automatic synchronization of pictures and videos from my phone to the server.</li>
<li>Since there are multiple websites that I want to access from this web-address there is a jail set up that acts as a Reverse Proxy server.</li>
<li>Lastly I have a virtual machine that runs <a href="https://pi-hole.net/">PiHole</a>. PiHole is software that blocks advertisements on my home network. Unfortunately it cannot run (yet) inside a FreeNAS jail as it does not support FreeBSD, the operating system FreeNAS runs on.</li>
<p><a id="reverseproxy"></a>
</ul>
<p>So how do all these services work together? Well, that&#8217;s a different view:</p>
<figure id="attachment_270" aria-describedby="caption-attachment-270" style="width: 593px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-270" src="https://cloud.jessendelft.org/wp-content/uploads/2020/05/Networking-flow-2.png" alt="" width="593" height="548" srcset="https://jessendelft.org/wp-content/uploads/2020/05/Networking-flow-2.png 593w, https://jessendelft.org/wp-content/uploads/2020/05/Networking-flow-2-300x277.png 300w" sizes="auto, (max-width: 593px) 100vw, 593px" /><figcaption id="caption-attachment-270" class="wp-caption-text">Networking flow</figcaption></figure>
<p>Starting from the bottom, there are the NextCloud storage, this blog and the <a href="https://cloud.jessendelft.org/magicmirror/">magic mirror</a> which are accessible through the internet via the reverse proxy. There is also the Samba share which is accessible only on the local network for privacy reasons.</p>
<p>In the middle of the picture is the <a style="font-size: 1rem;" href="https://cloud.jessendelft.org/installed-a-mesh-wifi-network/">router</a> which obviously has access to the internet. All DNS requests are however forwarded to PiHole. A DNS request is a request for a name server to translate the domain name of a website (for example <em>jessendelft.org</em>) to an address (for example <em>217.197.166.65</em>), in order to connect to that address. PiHole blocks any requests to known advertisement addresses so that these requests never get resolved, which means they will not load. This way there is network-wide ad-blocking for all devices connected to it.</p>
<p>I have some plans of integrating Octoprint into the Reverse Proxy once my 3D printer is back up&amp;running. I also want to move PiHole to a jail to free up some RAM and HDD space which are now reserved by the Virtual Machine.<br />
If you have any more ideas on what I can do to improve my setup, please let me know!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessendelft.org/home-nas-server-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
