<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Barren, Frozen Wasteland</title>
    <description>Mark Johnson&amp;#039;s Blog of Tech, Ubuntu and Stuff</description>
    <link>https://barrenfrozenwasteland.com/</link>
    <atom:link href="https://barrenfrozenwasteland.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 10 Apr 2026 02:28:26 +0000</pubDate>
    <lastBuildDate>Fri, 10 Apr 2026 02:28:26 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>Updating Autohandbrake</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://barrenfrozenwasteland.com/2017/08/autohandbrake-dvd-ripping-wizard/&quot;&gt;A few years ago&lt;/a&gt;, I was ripping a large collection of DVDs, but I found the
standard open source tool, Handbrake, to be very fiddly especially when ripping multiple episodes from the same disc or set of discs. To make my life a bit
easier, I wrote &lt;a href=&quot;https://github.com/marxjohnson/autohandbrake&quot;&gt;AutoHandbrake&lt;/a&gt;, a script which attempts to identify whether a disk contains a single long title (likely a movie) or several similar-length
titles (likely a set of episodes), then assists with naming and numbering the resulting files. The heavy lifting is done by 
&lt;a href=&quot;https://handbrake.fr/docs/en/latest/cli/cli-options.html&quot;&gt;HandBrakeCLI&lt;/a&gt;, which reads, rips and encodes the videos.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/wp-content/uploads/2017/08/autohb2.png&quot; alt=&quot;Auto Handbrake displaying a list of DVD titles to rip&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Since I wrote the tool, things have moved on a bit. DVD manufacturers often employ various tricks to bamboozle rippers: adding dozens of tiny titles,
duplicate titles, putting titles in strange orders, or other tricks to make it hard to tell which titles you want to rip. At the same time, the rising
populatity of Blu-Ray means that the HD version of a movie or show is often only a few quid more than the DVD, and even less when buying second-hand.&lt;/p&gt;

&lt;p&gt;Both of these have led me to change my workflow when ripping disks. &lt;a href=&quot;https://www.makemkv.com/&quot;&gt;MakeMKV&lt;/a&gt; is not only capable of ripping Blu-Ray disks as
well as DVDs, but has much smarter algoithms than mine for working out which titles on a disk are the ones you actually want. MakeMKV doesn’t do
encoding, so I still rely on Handbrake to encode the ripped files and save on disk space.&lt;/p&gt;

&lt;p&gt;This has required some changes to AutoHandbrake. I have added a new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--directory&lt;/code&gt; option which allows it to by pointed at a directory of titles that have
already been ripped by MakeMKV, rather than pointing it at a disk itself. In this case, it will list the files and treat them as a movie (if a single file)
or a set of episodes (if multiple files), and use HandBrakeCLI to encode them as before.&lt;/p&gt;

&lt;p&gt;As well as fixing a few bugs on the way, I discovered that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gdialog&lt;/code&gt; which I use to provide GUI dialogs has been replaced with a wrapper for 
&lt;a href=&quot;https://help.gnome.org/users/zenity/3.32/&quot;&gt;Zenity&lt;/a&gt;, a similar tool that doesn’t interface with the rdialog gem quite so nicely. I hope to find 
time to improve this, probably by detecting if we’re in a graphical environment and using a Ruby Zenity gem instead.&lt;/p&gt;

&lt;p&gt;I also found that HandBrake is now using Flatpak as its primary means of distribution on Linux. This meant modifying the commands use to rip and encode titles. While it will still support using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HandBrakeCLI&lt;/code&gt; command however it is installed, it will prefer to use the flatpak using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;flatpak run --command=HandBrakeCLI fr.handbrake.ghb&lt;/code&gt;, unless you specifically tell it not to with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--no-flatpak&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can find AutoHandbrake on my &lt;a href=&quot;https://github.com/marxjohnson&quot;&gt;GitHub page&lt;/a&gt;, and I will mention future developments on 
&lt;a href=&quot;https://octodon.social/@marxjohnson&quot;&gt;Mastodon&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Mon, 14 Nov 2022 14:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2022/11/updating-autohandbrake</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2022/11/updating-autohandbrake</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/wp-content/uploads/2017/08/autohb2.png" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Missing Linux save games on Steam Deck</title>
        <description>&lt;p&gt;I recently recieved my Steam Deck, and I have realised an odd quirk when installing some of my games. I’ve doing all my PC gaming on Linux for a long time,
so when I installed Pillars of Eternity to carry on my current playthrough, I was a bit surprised to find that none of my save games were showing up.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/pillars.jpg&quot; alt=&quot;Pillars of Eternity in Steam Deck library&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I checked that Steam Cloud was working, and it told me that it was in-sync. I checked on the filesystem at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.local/share/PillarsOfEnernity&lt;/code&gt;, and there
were my savegame files, as they should be, but the game wasn’t seeing them.&lt;/p&gt;

&lt;p&gt;I tried creating a new save game, quit and reloaded, and the game found it fine. What was going on?&lt;/p&gt;

&lt;p&gt;The answer came when I tried searching for .savegame files in my home folder:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(deck@steamdeck ~)$ find . -type f -name &quot;*.savegame&quot;
...
./.local/share/PillarsOfEternity/SavedGames/cbd27084-3c24-4566-a371-ab09b4c175f2 quicksave.savegame
./.local/share/PillarsOfEternity/SavedGames/e21b6851-61ce-478a-8a0c-6392aa40cdf5 autosave_2.savegame
./.local/share/PillarsOfEternity/SavedGames/e21b6851-61ce-478a-8a0c-6392aa40cdf5 autosave_0.savegame
./.local/share/Steam/steamapps/compatdata/291650/pfx/drive_c/users/steamuser/Saved Games/Pillars of Eternity/cceab8afef9c4e4cbc58904c0f8d9667 7656277 Encampment.savegame
./.local/share/Steam/steamapps/compatdata/291650/pfx/drive_c/users/steamuser/Saved Games/Pillars of Eternity/cceab8af-ef9c-4e4c-bc58-904c0f8d9667 autosave_0.savegame

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There were all my old save games in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./local/share/PillarsOfEternity&lt;/code&gt;, but my new ones were under a a completely different path. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;drive_c&lt;/code&gt; is the clue here,
it’s under a WINE prefix! Checking the game’s files confirms that I’ve got the Windows build of the game installed, running under Proton.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(deck@steamdeck ~)$ ls -l .steam/steam/steamapps/common/Pillars\ of\ Eternity/
total 15624
drwxr-xr-x  2 deck deck     4096 May  8 14:47 Docs
drwxr-xr-x  2 deck deck     4096 May  8 14:47 EmptySteamDepot
-rwxr-xr-x  1 deck deck   188416 May  8 14:46 GalaxyCSharpGlue.dll
-rwxr-xr-x  1 deck deck  3824640 May  8 14:47 Galaxy.dll
drwxr-xr-x  2 deck deck     4096 May  8 14:47 Links
drwxr-xr-x 10 deck deck    20480 May  8 14:48 PillarsOfEternity_Data
-rwxr-xr-x  1 deck deck 11632128 May  8 14:39 PillarsOfEternity.exe
-rwxr-xr-x  1 deck deck   187584 May  8 14:47 steam_api.dll
-rwxr-xr-x  1 deck deck        6 May  8 14:47 steam_appid.txt
-rwxr-xr-x  1 deck deck   126976 May  8 14:47 SteamworksNative.dll
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;One solution would be to copy the old saves into the WINE prefix, meaning the Windows build should see them. This assumes that the Linux save files are 
compatible with the Windows version of the game, so your mileage may vary.&lt;/p&gt;

&lt;h2 id=&quot;forcing-steam-deck-to-install-the-linux-build&quot;&gt;Forcing Steam Deck to install the Linux build&lt;/h2&gt;

&lt;p&gt;The other solution which I have found works well for the games I’ve tried, is to force Steam to install the Linux build, rather than using Proton.&lt;/p&gt;

&lt;p&gt;To do this:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Find the game in your Steam library, go to the “cog” icon on the right, then select “Manage &amp;gt; Uninstall”.&lt;/li&gt;
  &lt;li&gt;Click the “cog” icon again. Go to “Properties &amp;gt; Compatibility”.&lt;/li&gt;
  &lt;li&gt;Check “Force the use of a specific Steam Play compatibility tool”.&lt;/li&gt;
  &lt;li&gt;Select “Steam linux runtime” from the list.&lt;/li&gt;
  &lt;li&gt;Go back and install the game again. You will now have the Linux version installed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;why-is-this-happening&quot;&gt;Why is this happening?&lt;/h2&gt;

&lt;p&gt;It came to me as a surprise that games with a native Linux build would have the Windows build installed by default. Especially as this isn’t true for
all games. In my brief experimentation, I found that Pillars of Eternity and Nuclear Throne both behave this way, but Wildermyth does not, and
installs the Linux build by default.&lt;/p&gt;

&lt;p&gt;One possibility is that the former 2 games have a Steam Deck Compatilbity rating, where Wildermyth does not yet. Valve have undertaken a big
task in testing the Steam catalogue for Deck compatibility. As many games they are testing require Proton, they may have decided to do all
their testing via Proton, and once they have verified a game it will default to the version of Proton it was verified on.&lt;/p&gt;

&lt;p&gt;This does make me curious about Valve’s strategy for Linux compatibility. I has assumed that Proton was intended as a gateway to show developers
that Linux was a viable platform, to encourage them to produce native builds. But, if “Steam linux runtime” is just one on a list of compatibility
tools, and Proton is the default, maybe the strategy is instead to make Proton the preferred option for running games on Linux?&lt;/p&gt;
</description>
        <pubDate>Sun, 08 May 2022 14:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2022/05/missing-linux-saves-on-steam-deck</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2022/05/missing-linux-saves-on-steam-deck</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/pillars.jpg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Software RAID on Ubuntu 20.04</title>
        <description>&lt;p&gt;I recently decided to rebuild my HP Microserver, replacing the NAS appliance I use with extra disks in the microserver configured as a RAID 5. There are various guides online for the commands to set this up manually with mdadm, but as part of the rebuild I upgraded the Ubuntu OS to version 20.04, which presented a much nicer option. Following the upgrade, the login prompt included a message directing me to a web console at https://hostname:9090, which is using &lt;a href=&quot;https://cockpit-project.org/&quot;&gt;Cockpit&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;setting-up-raid-with-cockpit&quot;&gt;Setting up RAID with Cockpit&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/raid2.jpg&quot; alt=&quot;Cockpit login screen on Ubuntu 20;04 LTS&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Cockpit provides a modern web interface for a number of common but complex server administration tasks, including setting up networking and storage devices. Logging in an navigating to Host &amp;gt; Storage will provide a comprehensive overview of disk I/O, mounted filesystems, available devices, and more.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/raid3.png&quot; alt=&quot;Cockpit storage overview&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Creating a RAID with Cockpit is very straightforward. From this screen, click the hamburger menu by the “Devices” heading, and select “Create RAID device”. You’ll be prompted for a name, the RAID level, and a chunk size, then you simply check the boxes next to the drives you want to use, and click “Create”. Drives that are already in use won’t be listed, so no need to worry about accidentally formatting the wrong drive.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/raid4.jpg&quot; alt=&quot;Cockpit create RAID button&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the RAID is created, you will see the progress of its set-up job. This may take several hours depending on the size and set-up you are creating, so you can check back on this page to see how it is going. While this is going on, you can also use cockpit to create your filesystems.&lt;/p&gt;

&lt;p&gt;Click on the newly created RAID device and you’ll see a page  listing the configuration, disks, state and content. The new device will be empty, so clicking “Create Partition Table” will let you define your new partitions in a similar manner to a graphical partitioner like GNOME Disks or gparted. In my case I followed the defaults and created a single XFS partition, but you may want to set up multiple partitions, LVM, or LUKS-encrypted partitions, which are all supported. You can also mount the new filesystem right from the web console.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/raid1.jpg&quot; alt=&quot;Cockpit RAID device overview page&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Under the hood, this is all using mdadm, for which the &lt;a href=&quot;https://wiki.archlinux.org/title/RAID&quot;&gt;Arch Wiki RAID page&lt;/a&gt; provides lots of in-depth information on configuration and maintenance, but for basic set-up and monitoring, this web console is all you need.&lt;/p&gt;

&lt;p&gt;Cockpit has set a new bar for me in linux server administration. It’s a massive step up in terms of discoverability, and making those complex operations a lot less scary. I look forward to using it more in the future.&lt;/p&gt;
</description>
        <pubDate>Sun, 03 Apr 2022 19:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2022/03/software-raid-on-ubuntu-2004</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2022/03/software-raid-on-ubuntu-2004</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/raid1.jpg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Having fun isn&apos;t hard, when you&apos;ve got a library card</title>
        <description>&lt;p&gt;I’ve recently found myself guilty of &lt;a href=&quot;https://www.urbandictionary.com/define.php?term=doomscrolling&quot;&gt;doomscrolling&lt;/a&gt;. 
When I have a spare moment, I’ll pick up my phone and mindlessly
scroll through Twitter, or a news website, and read or re-read about the most horrible things that are happening in
world today. I caught myself doing it, and I wondered how much of my time I’m wasting on things other people want me
to read, rather than choosing to read things I’m actually interested in.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/library.jpg&quot; alt=&quot;Library&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When I was a kid, I used to subscribe to magazines. One in particular was &lt;a href=&quot;https://en.wikipedia.org/wiki/NGC_Magazine&quot;&gt;NGC&lt;/a&gt;, an unofficial Nintendo magazine from
the Gamecube era. Remembering their website, &lt;a href=&quot;https://www.gamesradar.com/uk/&quot;&gt;gamesradar.com&lt;/a&gt;, I went to see what’s there now and found &lt;a href=&quot;https://www.gamesradar.com/uk/the-history-of-timesplitters/&quot;&gt;an article from
Retro Gamer magazine about the making of TimeSplitters&lt;/a&gt;, a series of games I owned and loved. The experience of finding
and reading something because I wanted to was a joyful and calming feeling.&lt;/p&gt;

&lt;p&gt;I recently discovered an app called &lt;a href=&quot;https://www.overdrive.com/apps/libby/&quot;&gt;Libby&lt;/a&gt;, made by a company called &lt;a href=&quot;https://www.overdrive.com/&quot;&gt;Overdrive&lt;/a&gt;. Libby is a digital library catalogue,
which offers you eBooks, audiobooks and magazines for free through your local library. You just sign up with your library card.
After reading their article, I searched for Retro Gamer in Libby and subscribed. I also found some other magazines in the technical, gaming and music
categories that I’d bought before, and subscribed to them, all for free. I decided that instead of opening Twitter in my moments of downtime,
I’d open a magazine.&lt;/p&gt;

&lt;p&gt;Using Libby is an excellent experience. Magazines can be viewed as a digital version of the print layout, scrolled and zoomed,
but you can also select the articles on each page to have them presented in a re-flowed “reader” view, like you see on most modern
web browsers. As I’m mainly using Libby on my phone, this works very nicely.&lt;/p&gt;

&lt;p&gt;Libby can be installed on your mobile device, but it’s also a web app. Going to &lt;a href=&quot;https://libbyapp.com/&quot;&gt;libbyapp.com&lt;/a&gt; gives you 90% of the same experience,
and it syncs between devices. I can’t recommend it highly enough.&lt;/p&gt;

&lt;p&gt;Reading a publication designed for A4 sheets of paper on my phone, I of course started mulling over the possibility of
a tablet or e-reader for this purpose. But the reason this works so well for me is that my phone is pocketable, so its always
there in those moments of downtime.&lt;/p&gt;

&lt;p&gt;The app aside, reading magazines again is a breath of fresh air. In the 15 years since I last had a subscription, the web
has become an appalling place to consume content (the irony is not lost on me, dear reader). A million things are trying to
take your attention, get your consent, harvest your email address, get you to go to &lt;em&gt;this&lt;/em&gt; page instead of &lt;em&gt;this&lt;/em&gt; one… with
a magazine, it’s just you and an article.&lt;/p&gt;
</description>
        <pubDate>Tue, 24 Aug 2021 21:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2021/08/having-fun-isnt-hard-when-youve-got-a-library-card</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2021/08/having-fun-isnt-hard-when-youve-got-a-library-card</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/library.jpg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Migrating password store to self hosted Bitwarden</title>
        <description>&lt;p&gt;I’ve been using &lt;a href=&quot;https://www.passwordstore.org/&quot;&gt;password store&lt;/a&gt; to manage my passwords for several years.
I really like its simplicity, it’s just a shell script that relies on gpg and git
to handle the encryption and synchronisation. However, the apps and browser extensions
are all third-party, so are of varying quality. Also, using it across devices requires
you to manage your gpg keys across those devices, something I’ve never managed with 100%
success.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/safe.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I’ve been hearing a lot about &lt;a href=&quot;https://bitwarden.com&quot;&gt;Bitwarden&lt;/a&gt; recently. It’s another open-source password manager
with free, premium, hosted or self-hosted options, it doesn’t rely on gpg and the apps are developed
by the same project, so are far more consistent. I thought I’d give it a go!&lt;/p&gt;

&lt;p&gt;Self-hosting Bitwarden is fairly involved, it’s not just “snap install bitwarden”.
However, it’s &lt;a href=&quot;https://bitwarden.com/help/article/install-on-premise/&quot;&gt;a very well documented process&lt;/a&gt; 
and I didn’t have any issue getting it running after an evening’s tinkering. The result is a cluster 
of about a dozen docker containers, which provide a web UI and the API for any apps.&lt;/p&gt;

&lt;p&gt;As with &lt;a href=&quot;https://barrenfrozenwasteland.com/2019/07/hosting-your-own-cloud-2019&quot;&gt;my other self-hosted services&lt;/a&gt;, 
I have this running behind an nginx reverse proxy to have everything running over HTTPS on standard ports.&lt;/p&gt;

&lt;p&gt;This all worked well, but I am running it on my HP Microserver and it was feeling the strain a bit.
Running 12 containers including an mssql database might make sense if you’re running a service that 
needs to scale up to serve a company’s users, but for a single user or a few family members it’s a 
bit excessive.&lt;/p&gt;

&lt;p&gt;Luckily there is an alternative. &lt;a href=&quot;https://github.com/dani-garcia/bitwarden_rs&quot;&gt;Bitwarden_rs&lt;/a&gt; 
is a third-party implementation of the Bitwarden API, so its compatible with the apps, 
but it runs as a single, much lighter container and uses SQLite by default. 
Also &lt;a href=&quot;https://github.com/dani-garcia/bitwarden_rs/wiki&quot;&gt;very well documented&lt;/a&gt;, I set it up to 
&lt;a href=&quot;https://github.com/dani-garcia/bitwarden_rs/wiki/Running-with-systemd-docker&quot;&gt;run on boot using systemd-docker&lt;/a&gt;. 
I mapped the container to the same port as I had the original Bitwarden, so my nginx config pointed at the new service with no changes.&lt;/p&gt;

&lt;p&gt;To migrate from pass, I used pass2csv to output all of my passwords to a CSV flatfile. I then used 
&lt;a href=&quot;https://gist.github.com/Yukaii/baa8b6fda3a25b043a109fcdbe460395&quot;&gt;this script&lt;/a&gt; from github to convert
the file to be bitwarden-compatible, and imported through the web interface. The script is written in
javascript so runs with nodejs, and requires the fast-csv package to be installed through npm.&lt;/p&gt;

&lt;p&gt;When switching from Bitwarden to bitwarden_rs, the new service doesn’t know about users and password stores
imported to the original service. To handle this migration, I used the web interface to export an import in 
Bitwarden’s own JSON format.&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://www.flickr.com/photos/15131913@N00/288491653&quot;&gt;Safe&lt;/a&gt; 
by &lt;a href=&quot;https://www.flickr.com/photos/pong/&quot;&gt;Rob Pongsajapan&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 04 Apr 2021 21:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2021/04/migrating-password-store-to-self-hosted-bitwarden</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2021/04/migrating-password-store-to-self-hosted-bitwarden</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/safe.jpg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Syncing Rocketbook to Nextcloud notes</title>
        <description>&lt;p&gt;In an effort to write more often and more legibly,
I recently bought myself a &lt;a href=&quot;http://
getrocketbook.com&quot;&gt;Rocketbook&lt;/a&gt; Core, an erasable pen-and-
not quite-paper notebook with a companion
app. The app will scan your notes and send
a cloud service of your choice. For
work, &lt;a href=&quot;https://www.onenote.com/&quot;&gt;OneNote&lt;/a&gt; is supported which suits me
fine. However, at home I use the &lt;a href=&quot;https://nextcloud.com/&quot;&gt;Nextcloud&lt;/a&gt;
&lt;a href=&quot;https://apps.nextcloud.com/apps/notes&quot;&gt;Notes app&lt;/a&gt; to keep my notes on my own
server, which stores notes in .txt files and gives you a markdown-aware editor on web and mobile.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/rocketbook.jpeg&quot; alt=&quot;Rocketbook Core notepad and pen&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There is a &lt;a href=&quot;https://play.google.com/apps/testing/com.rb.rocketbook&quot;&gt;beta Rocketbook app&lt;/a&gt; with Nextcloud
Support, but it relies on WebDAV and I couldn’t
get it working, so I decided to roll my own.
The first step is to share my notes via
email. I set it to a dedicated address with
OCR transcription enabled.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/rb_settings.jpeg&quot; alt=&quot;Rocketbook settings screen&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On my Nextcloud server, I run the following script :&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;/bin/bash
&lt;span class=&quot;nv&quot;&gt;MAILDIR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;DESTINATION&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt;
offlineimap
&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; /tmp/rocketbook
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; /tmp/rocketbook
&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$MAILDIR&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;do
    &lt;/span&gt;munpack &lt;span class=&quot;nv&quot;&gt;$MAILDIR&lt;/span&gt;/&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$MAILDIR&lt;/span&gt;/&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;done
&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; ./&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.desc
&lt;span class=&quot;nb&quot;&gt;mv&lt;/span&gt; ./&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$DESTINATION&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-rf&lt;/span&gt; /tmp/rocketbook
offlineimap&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The heavy lifting is done by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;offlineimap&lt;/code&gt; and
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;munpack&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;offlineimap&lt;/code&gt; will syncronise your email
account to a local directory in my case
I configure it to sync a single folder.
My offlineimap config looks like this:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ini&quot; data-lang=&quot;ini&quot;&gt;&lt;span class=&quot;nn&quot;&gt;[general]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;accounts&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Rocketbook&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Account Rocketbook]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;localrepository&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Local&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;remoterepository&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Remote&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Repository Local]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Maildir&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;localfolders&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;~/Rocketbook&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Repository Remote]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;IMAP&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;remotehost&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;mail.xxx.net&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;remoteuser&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;xxx@barrenfrozenwasteland.com&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;remotepassfile&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;~/.imappassword&lt;/span&gt;

&lt;span class=&quot;py&quot;&gt;sslcacertfile&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;/etc/ssl/certs/ca-certificates.crt&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;munpack will extract the parts of an email
(such as attachments) into separate files
This gives me a .pdf containing the image,
a .txt file containing the transcribed text,
and and the email body in a .desc file
which I discard.
At this point, you could use the txt and pdf files however you like.
I move these files to
Nextcloud’s Notes folder, delete the email
and re-run offlineimap to sync the deletion.
The script runs on a cron job to check for new notes every 5 minutes.&lt;/p&gt;

&lt;p&gt;How well does it work? I hand-wrote this
blog post, so if you’re reading it, it
worked pretty well!&lt;/p&gt;
</description>
        <pubDate>Fri, 22 Jan 2021 21:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2021/01/syncing-rocketbook-to-nextcloud</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2021/01/syncing-rocketbook-to-nextcloud</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/rocketbook.jpeg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Using a Steam controller with the Nintendo switch</title>
        <description>&lt;p&gt;I have been playing &lt;a href=&quot;https://www.supergiantgames.com/games/hades/&quot;&gt;Hades&lt;/a&gt; a lot recently on my Switch. I’ve had the switch for a couple of years ago, but the long sessions of Hades are the first time I have been dissatisfied with the Joy-cons. The Pro Controller is highly reccommended by Switch fans, but I don’t have £55 to spend on a new controller right now, so I started wondering if I can use my current favourite controller, the Steam controller on the Nintendo Switch.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/steam-switch.jpeg&quot; alt=&quot;Steam controller, with a Switch logo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The answer came from the &lt;a href=&quot;https://github.com/greggersaurus/OpenSteamController&quot;&gt;OpenSteamController&lt;/a&gt; project on GitHub. The project contains several different threads and lots of documentation, so I’ve pulled together just the bits you need to make make this possible.&lt;/p&gt;

&lt;h2 id=&quot;you-will-need&quot;&gt;You will need:&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;A steam controller.&lt;/li&gt;
  &lt;li&gt;A USB-A to micro-B cable, long enough to reach your Switch from your chair.&lt;/li&gt;
  &lt;li&gt;A computer.&lt;/li&gt;
  &lt;li&gt;The OpenSteamController firmware, configured for the Switch: &lt;a href=&quot;https://github.com/greggersaurus/OpenSteamController/blob/master/Firmware/bin/OpenSteamControllerNinSwitch.bin&quot;&gt;OpenSteamControllerNinSwitch.bin&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;steps&quot;&gt;Steps:&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Hold the right trigger of your Steam controller, and connect it to your computer with the USB controller. This will put it in USB programming mode, and show up as a USB storage device called “CRP DISABLD”&lt;/li&gt;
  &lt;li&gt;Back up the default firmware.bin file. On Ubuntu, run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd &quot;if=/media/$USER/CRP DISABLD/firmware.bin&quot; of=~/backup.bin&lt;/code&gt;. On other platforms, consult the &lt;a href=&quot;https://github.com/greggersaurus/OpenSteamController/blob/master/LoadingFirmware.md&quot;&gt;Loading Firmware&lt;/a&gt; documentation.&lt;/li&gt;
  &lt;li&gt;Load the custom firmware. On Ubuntu, run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd conv=nocreat,notrunc oflag=direct bs=512 if=OpenSteamControllerNinSwitch.bin &quot;of=/media/$USER/CRP DISABLD/firmware.bin&quot;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Unplug the USB cable from your computer, and plug it in to the Switch’s dock. Press L+R to connect, it will show up as a generic “USB” controller. You’re ready to play!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few things to be aware of about this solution:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;This process isn’t supported by Valve, Nintendo, me, or anyone else. Proceed at your own risk.&lt;/li&gt;
  &lt;li&gt;The current firmware doesn’t support connecting to the Switch via Bluetooth, you must use a USB cable.&lt;/li&gt;
  &lt;li&gt;The controller won’t work with Steam while using the custom firmware. You can restore the original firmware by running step 3 above with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;backup.bin&lt;/code&gt; as the input file.&lt;/li&gt;
  &lt;li&gt;The A and B buttons on the Switch and Steam controllers are the other way around, so the Steam controller button labelled “B” will function as “A” on the Switch, and vice-versa.&lt;/li&gt;
  &lt;li&gt;The right hand touch pad (which operates as the right stick) is quite sensitive, it will sometimes detect your thumb when you press a button next to it if you aren’t careful.&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sun, 01 Nov 2020 21:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2020/11/using-a-stream-controller-with-the-nintendo-switch</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2020/11/using-a-stream-controller-with-the-nintendo-switch</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/steam-switch.jpeg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>How (not) to calculate student grades</title>
        <description>&lt;p&gt;In my first job out of university, I had the task of developing a tool to calculate “minimum target grades” for FE students based on GCSE scores and regression
statistics. These grades would be used by teachers as a basis for setting target grades for their students.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/exams.jpeg&quot; alt=&quot;Students taking an exam&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I’m no statistican. When I did my maths A-level I chose Decisions for my applied units. However, looking at the regression statistics, began to notice that some
some of these statistics looks suspect. Some of the sample sizes were tiny. Some of the standard deviations were larger than a whole grade boundary.&lt;/p&gt;

&lt;p&gt;After realising this, I felt like it would be irresponsible for me to use these datasets to calculate target grades. I built safeguards in to the system so that it
wouldn’t calculate grades if the data was of insuffient quality, and target grades would have to be determined by other means.&lt;/p&gt;

&lt;p&gt;I hope that anyone designing algorithms to determine students’ final grades would take a similar level of care.&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;http://www.flickr.com/photos/23046603@N00/4721011635&quot;&gt;“Exams 10”&lt;/a&gt;&lt;span&gt; by &lt;a href=&quot;http://www.flickr.com/photos/23046603@N00&quot;&gt;charbeck10&lt;/a&gt;&lt;/span&gt; is licensed under &lt;a href=&quot;https://creativecommons.org/licenses/by-nc-sa/2.0/?ref=ccsearch&amp;amp;atype=html&quot; style=&quot;margin-right: 5px;&quot;&gt;CC BY-NC-SA 2.0&lt;/a&gt;&lt;a href=&quot;https://creativecommons.org/licenses/by-nc-sa/2.0/?ref=ccsearch&amp;amp;atype=html&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; style=&quot;display: inline-block;white-space: none;margin-top: 2px;margin-left: 3px;height: 22px !important;&quot;&gt;&lt;img style=&quot;height: inherit;margin-right: 3px;display: inline-block;&quot; src=&quot;https://search.creativecommons.org/static/img/cc_icon.svg&quot; /&gt;&lt;img style=&quot;height: inherit;margin-right: 3px;display: inline-block;&quot; src=&quot;https://search.creativecommons.org/static/img/cc-by_icon.svg&quot; /&gt;&lt;img style=&quot;height: inherit;margin-right: 3px;display: inline-block;&quot; src=&quot;https://search.creativecommons.org/static/img/cc-nc_icon.svg&quot; /&gt;&lt;img style=&quot;height: inherit;margin-right: 3px;display: inline-block;&quot; src=&quot;https://search.creativecommons.org/static/img/cc-sa_icon.svg&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Fri, 14 Aug 2020 21:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2020/08/how-not-to-calculate-student-grades</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2020/08/how-not-to-calculate-student-grades</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/exams.jpeg" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>Hosting your own cloud, 2019 edition</title>
        <description>&lt;p&gt;It’s been a long time since &lt;a href=&quot;/2011/07/self-hosted-cloud/&quot;&gt;I first wrote about self hosting “cloud” services&lt;/a&gt; to avoid reliance on third party companies that harvest your data. Things have moved on a lot since then, so I thought it was about time to write about my current set-up.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/hosting-your-own-cloud.png&quot; alt=&quot;A photo of my presenting my &amp;quot;Hosting your own cloud&amp;quot; talk at Oggcamp 2011&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;hardware&quot;&gt;Hardware&lt;/h2&gt;
&lt;p&gt;I’m still running the same &lt;a href=&quot;https://barrenfrozenwasteland.com/2011/07/hp-proliant-microserver-review/&quot;&gt;HP Proliant Microserver&lt;/a&gt; that I have for years. I’ve upgraded the RAM and added an extra gigabit ethernet interface.  The big change is how I handle my storage.&lt;/p&gt;

&lt;p&gt;Rather than using software RAID on the microserver, I now have a separate RAID appliance. I’m using a &lt;a href=&quot;https://www.netgear.com/support/product/RNDU4000%20(ReadyNAS%20Ultra%204).aspx&quot;&gt;Neatgear ReadyNAS Ultra 4&lt;/a&gt; with 4 2TB disks. This gives me total usable storage of around 5TB.&lt;/p&gt;

&lt;p&gt;Since the server and NAS each have 2 gigabit network interfaces, as well as having them both connected to my LAN, I also have them directly connected together. I then mount the NAS volume on the Microserver using this dedicated connection, to avoid any contention from other network traffic when accessing the storage.&lt;/p&gt;

&lt;h2 id=&quot;server-software&quot;&gt;Server software&lt;/h2&gt;
&lt;p&gt;The Microserver is running &lt;a href=&quot;https://ubuntu.com&quot;&gt;Ubuntu 18.04 LTS&lt;/a&gt;, which will come as no surprise to anyone who knows me. I have &lt;a href=&quot;https://nextcloud.org/&quot;&gt;Nextcloud&lt;/a&gt; installed using the &lt;a href=&quot;https://github.com/nextcloud/nextcloud-snap&quot;&gt;snap package&lt;/a&gt;, which keeps it contained an updated. Since I am using the NAS for my storage, I had to allow the Nextcloud snap to access removable media using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ sudo snap connect nextcloud:removable-media&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With my NAS mounted at /media/nas, I can then use Nextcloud’s external storage plugin to make folders on my NAS available to Nextcloud, using the “local” option.&lt;/p&gt;

&lt;p&gt;The Nextcloud snap has its own instance of the apache web server, running on port 80 by default. Since I might have other web apps running on the server, I changed this to port 8080 (instructions in the snap readme linked above), and set up &lt;a href=&quot;http://nginx.org/&quot;&gt;nginx&lt;/a&gt; as a reverse proxy. This allows me to access nextcloud at http://myserver/nextcloud/.  The nginx configuration to make this possible goes in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-available/default.conf&lt;/code&gt; and looks like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;location /nextcloud/ {
    proxy_pass http://localhost:8080/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I am also using the Nextcloud Contact and Calendar apps, to provide me with a CalDAV and CardDAV server.&lt;/p&gt;

&lt;p&gt;Alongside Nextcloud, I want a way of serving my media so that I can stream music and video from my server to whereever I am without having to sync it. I have tried various solutions for this in the past including the Owncloud music app, Ampache, and Emby, but I am currently using &lt;a href=&quot;https://www.plex.tv/&quot;&gt;Plex&lt;/a&gt;. Sadly Plex is not open source. I was using Emby for a long time because it was open source, but when they changed their licensing this advantage went away. Testing Plex as an alternative, I found it to be slightly better in every conceivable way, which makes it much better overall. They key is that I can still run it on my own server, and keep my data on my own hardware rather than having to upload it to someone else’s service or rely on a subscription to another company’s library.&lt;/p&gt;

&lt;h2 id=&quot;client-software&quot;&gt;Client software&lt;/h2&gt;
&lt;p&gt;On my laptop, I am using the offical &lt;a href=&quot;https://nextcloud.com/install/#install-clients&quot;&gt;Nextcloud client&lt;/a&gt; to synchronise my files. In the past, the official OwnCloud and Nextcloud clients weren’t up to the task when it came to syncing large volumes of data, so I used alternative solutions such as &lt;a href=&quot;https://www.resilio.com/&quot;&gt;Bittorrent Sync&lt;/a&gt; and &lt;a href=&quot;https://syncthing.net/&quot;&gt;Syncthing&lt;/a&gt;. However, these days the modern Nextcloud client works like a charm.  It gives the option to choose which folders are synced to which device, so I exclude some folders such as my video collection from syncing to my laptop.  I could still access these files via WebDAV if I needed to.&lt;/p&gt;

&lt;p&gt;On Ubuntu 19.04, you can add your Nextcloud server in the “Online accounts” settings, which will provide integration with the desktop calendar and add a shortcut in the file manager to view and access your files via WebDAV.&lt;/p&gt;

&lt;p&gt;On on mobile, I again use the offical &lt;a href=&quot;https://f-droid.org/en/packages/com.nextcloud.client/&quot;&gt;Nextcloud app&lt;/a&gt;, which doesn’t sync your files automatically but does download them on demand. It also has an “instanct upload” feature which will watch configured directories for new images, and automatically upload them to the server. To synchronise the calendar and contacts, I use &lt;a href=&quot;https://f-droid.org/en/packages/at.bitfire.davdroid/&quot;&gt;DAVx⁵&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Plex allows you to play media through its web interface using any browser, and also has native apps for many platforms, some of which require payment. The option I’ve found most effective is to run Kodi with the &lt;a href=&quot;https://kodi.tv/plex-add-on-for-kodi&quot;&gt;Plex plugin&lt;/a&gt;, which is free and gives you full access to stream your media. I am currently running this on my steam box/HTPC for video, a Joggler for music, and laptop (with Kodi in windowed mode) for music. It’s worth noting that the client is just for consuming your media. If you want to manage your library or edit playlists, you need to use the web interface.&lt;/p&gt;

&lt;h2 id=&quot;configuration&quot;&gt;Configuration&lt;/h2&gt;
&lt;p&gt;A key part of this solution for me was being able to point my devices at my server a to access my data from anywhere, while avoiding a round-trip via the Internet when I’m at home with my server.
In order to do this, I need my server to be accessible to the Internet, on a domain name that I control. However, have a regular domestic ISP without a fixed IP address.&lt;/p&gt;

&lt;p&gt;The first part of this solution is to make my web server available to the Internet. Since I’ve got nginx running on port 80, this is a simple case of configuring my router to allow inbound traffic on port 80, and forward it to my server’s internal IP address. I did this through the web interface on my ISP’s router.&lt;/p&gt;

&lt;p&gt;The next thing to do was set up dynamic DNS, which provides me with a domain name that will always point to my current public IP address. There are several providers for this type of service, but I went with &lt;a href=&quot;http://freedns.afraid.org/&quot;&gt;afraid.org&lt;/a&gt;.  This gives me an address like mydomain.afraid.org which will always point to my home. Putting http://mydomain.afraid.org/nextcloud/ into a web browser now gives me the Nextcloud login page.&lt;/p&gt;

&lt;p&gt;With my data available over the Internet, I needed to set up HTTPS so that it’s all encrypted in transit. &lt;a href=&quot;https://letsencrypt.org/&quot;&gt;LetsEncrypt&lt;/a&gt; is a free service that will issue you a certificate and configure your web service to use it, with its certbot tool. You can even set up a cron job so that it will auto-renew your certificate when needed. However, since mydomain.afraid.org isn’t owned by me, I can’t (or at least, should’t) get an SSL certificate for that domain.&lt;/p&gt;

&lt;p&gt;I already own a domain name that is registered with &lt;a href=&quot;https://gandi.net&quot;&gt;Gandi&lt;/a&gt; who I’d definitely recommend for good value and features. In my DNS settings, I have set up a CNAME record, which allows me to point myserver.mydomain.com to mydomain.afraid.org. This means that myserver.mydomain.com will now always resolve to my home IP address, and going to http://myserver.mydomain.com/nextcloud/ gives me access to Nextcloud.&lt;/p&gt;

&lt;p&gt;Now I’ve got my own domain name pointing at my server, I was able to use certbot to issue a certificate for that domain and configure nginx, allowing me securely access to Nextcloud over the Internet.&lt;/p&gt;

&lt;p&gt;This is fine when I’m not at home, but if I connect to myserver.mydomain.com, all the traffic will be routed via my Internet connection, rather than just over my LAN, which will slow things down.  When I’m connected to my LAN, I want myserver.mydomain.com to go straight to my Microserver’s LAN address.&lt;/p&gt;

&lt;p&gt;To do this, I have dnsmasq installed on my Microserver, which provides local DHCP and DNS services. I have turned off DHCP on my router, so whenever a device connects to my LAN, it will get its IP address from dnsmasq. The DCHP configuration will also tell the device to use the Microserver as its default DNS server. In dnsmasq’s DNS records, I then point myserver.mydomain.com to the Microserver’s LAN IP address. With all this configured, when I am connected the LAN, requests to myserver.mydomain.com stay within the LAN, but if I’m somewhere else they find their way over the Internet. The dnsmasq configuration to achieve this looks something like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;interface=lo
bind-interfaces
listen-address=127.0.0.1
listen-address=192.168.0.10
server=1.1.1.1 # Upstream DNS servers for other domain names
server=1.0.0.1
address=/myserver.mydomain.com/192.168.0.10
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-option=option:router,192.168.0.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Plex is a bit awkward. The supported way to access your Plex server over the Internet is to enable the “Remote access” feature, then access your server via the plex.tv web client. It can’t be configured to use an address like myserver.mydomain.com/plex, since it expects to be running at the root of the server, and it doesn’t like it if it’s in a subdirectory. To get around this, I set up a second CNAME record, plex.mydomain.com, a second SSL certificate with certbot, and &lt;a href=&quot;https://github.com/toomuchio/plex-nginx-reverseproxy/blob/master/nginx.conf&quot;&gt;a second “site” in nginx&lt;/a&gt;. This now makes plex.mydomain.com the universal address for my Plex server.&lt;/p&gt;

</description>
        <pubDate>Sat, 13 Jul 2019 13:00:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2019/07/hosting-your-own-cloud-2019</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2019/07/hosting-your-own-cloud-2019</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/hosting-your-own-cloud.png" />]]></content:encoded>
             
      </item>
    
      <item>
        <title>New year, new website</title>
        <description>&lt;p&gt;For about 10 years, I’ve had my website hosted by &lt;a href=&quot;https://www.surpasshosting.com&quot;&gt;Surpass Hosting&lt;/a&gt;, and served my blog variously with &lt;a href=&quot;https://drupal.org&quot;&gt;Drupal&lt;/a&gt;, &lt;a href=&quot;https://wordpress.org&quot;&gt;Wordpress&lt;/a&gt; and manually crafted static pages.
Unfortunately, Surpass no longer offer the package that I originally signed up with, and the cheapest package the offered me was double the cost I have been paying.  On top of that, they were charging me over $20 to renew my domain name.  Given that I only host a simple blog and an old &lt;a href=&quot;/sacktrick&quot;&gt;fansite&lt;/a&gt;, it was time to move to something simpler and cheaper.&lt;/p&gt;

&lt;p&gt;I’ve already had experience building &lt;a href=&quot;https://oss-watch.ac.uk&quot;&gt;a website&lt;/a&gt; with &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, and using this removed the need for me to find a host that provided a database and scripting language like PHP. Jekyll builds your site as plain old HTML.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/wp-to-jekyll.png&quot; alt=&quot;Wordpress to Jekyll exporter logo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Since my old website was using Wordpress, I needed to extract it to something Jekyll-friendly. Of course, someone’s already done the work for me. I installed the &lt;a href=&quot;https://wordpress.org/plugins/jekyll-exporter/&quot;&gt;Jekyll exporter&lt;/a&gt; plugin for Wordpress, and was able to download my whole site as static HTML files, that I could add to a fresh Jekyll site. As the site had been previously converted from Drupal, I needed to do a bit of find-and-replace across the site to standardise all the metadata.&lt;/p&gt;

&lt;p&gt;I had heard that &lt;a href=&quot;https://aws.amazon.com/s3/&quot;&gt;AWS S3&lt;/a&gt; was a good choice for hosting static websites. While it’s primarily intended for file storage for cloud applications, it also supports serving files over HTTP using a simple webserver. However, it seems that S3 is only really designed to be accessed programmatically.  While command line tools exist and its possible to mount an S3 filesystem locally, building a Jekyll locally site and syncing it to an S3 bucket is not a simple process.  Furthermore, the limited nature of the webserver it provides made it difficult to achieve what I wanted.&lt;/p&gt;

&lt;p&gt;After looking at some other hosts, I decided that &lt;a href=&quot;https://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt; was the simplest solution. You can enable Pages on any public repository, and Jekyll will automatically compute your site when you push a new commit. This does limit you to the basic Jekyll software without plugins, but you can use it with your own domain name, it supports HTTPS, and its free.&lt;/p&gt;

&lt;p&gt;Finally, I needed a new domain registrar and email host. After asking friends for some recommendations, I settled on &lt;a href=&quot;https://gandi.net&quot;&gt;Gandi&lt;/a&gt;. Along with your domain, you get a straightforward DNS interface and subdomain redirects (so you can point www.yourdomain.com to yourdomain.com, for example). You also get email with Sieve support, and alias that support wildcards, so you can make unique addresses for each service you sign up to, and filter them as required.&lt;/p&gt;

&lt;p&gt;This whole solution costs me about £10 a year, where my previous solution cost me around £40, and was going up to something closer to £100.&lt;/p&gt;
</description>
        <pubDate>Sun, 27 Jan 2019 13:30:00 +0000</pubDate>
        <link>https://barrenfrozenwasteland.com/2019/01/new-year-new-website</link>
        <guid isPermaLink="true">https://barrenfrozenwasteland.com/2019/01/new-year-new-website</guid>
        
        
        
        <content:encoded><![CDATA[<img src="https://barrenfrozenwasteland.com/images/wp-to-jekyll.png" />]]></content:encoded>
             
      </item>
    
  </channel>
</rss>
