Skip to main content

TCFJR

Blackrock Server Updates

Before we came to Ireland for extended stays, I setup an old Dell laptop to be the media server while we travel. This system runs Ubuntu 24.04 Server with a GUI, and makes it possible for us to watch our ripped movies and related media. I use Tailscale to securely access my remote systems, and in the Tailnet this server has the uninspired hostname of dell4800.

I made a couple of updates today to make my day-to-day maintenance work more efficient.

First, I set up SSH on dell4800 with key-based authentication, and disabled password authentication. On my Windows 11 laptop, I generated a fresh set of SSH keys, and used ssh-copy-id to copy the .pub file to dell4800. I can now open a terminal session on dell4800 from my Windows laptop without a password. (The Tailnet provides ample security.)

Next, I installed and configured Samba, the Linux/Unix app that provides SMB/CIFS file sharing services. I added the dell4800 media directory as a share, and can now mount the directory on my Windows laptop.

dell4800 runs Syncthing in a Docker container managed by Portainer, and automatically syncs various folders from my main Synology DS220+ NAS system currently based in Texas over the Tailnet.

Nothing earth-shattering, but these tools make it easier and more efficient for me to do routine maintenance on the Syncthing target directories.

Vim Note

I use the vim editor to write these posts, and prefer not to use vim’s automatic line-wrapping. There are times when longer lines are necessary, so I like to manually wrap lines when needed.

In blog posts like this, paragraphs are separated by a blank line. To wrap the lines in a single paragraph, use this key sequence:

:gq}

: opens command mode, gq is the wrap command which must be followed by a movement command. } moves to the next empty line. Put them altogether and the current paragraph is wrapped to the defined line width, which defaults to 80.

Blog Tech

Over the last week or so, I’ve enjoyed updating the tools I use for this site, which is built using Hugo. Hugo creates static HTML from Markdown source, and is perfect for low volume sites that are updated on an occassional basis, and that hasn’t changed. The tooling I use to host the site has changed, along with the method i use to upload the new HTML to the web host.

In the past, I used GitHub Pages to host this site. When I added or changed a page, I’d run Hugo to convert the Markdown into HTML, and then use git commands to push the updated HTML to GitHub. The repository it was posted to was configured to use GitHub Pages to server the actual website. This process worked reasonably well, but some underlying tech issues made it necessary to change course.

Here are the tools I use on my Windows 11 laptop:

  1. GIT bash - a Linux terminal running the bash shell

  2. VIM for editing - I learned vi back in the late 1980’s and used it almost exclusively for 35 years - I’m very comfortable with it.

  3. Syncthing - this tool runs on the laptop and on the VPS, and automatically uploads modified directories from the laptop to the VPS.

These tools run on a Digital Ocean VPS running Ubuntu 24.04:

  1. Apache Web Server

  2. Syncthing, running in a Docker container using Portainer

And here’s a brief overview of the workflow for adding a new post to the web site:

  1. A new page is added using Hugo’s Markdown format (no change here)

  2. The hugo tool is run to convert the Markdown into HTML (again, no change)

  3. Hugo writes the updated site files to a local folder on the laptop.

  4. Syncthing automatically uploads the site files to the VPS. The files go to the directory configured in Apache as the DocumentRoot.

Once the sync is complete, the site update automatically goes live.

There’s a couple of minor issues that I’m looking into, but nothing urgent.

  1. Syncthing uploads files in a pseudo-random sequence, and if you load the web url in your browser before the sync completes you may get some wonky behavior. I have some ideas on how to fix this, but it’s not a big deal at this time.

  2. Once I removed the git commit/push steps, I no longer have active source control. In practice, this isn’t a big deal, but there are times where it would be nice to monitor each individual change made to the site files. I played with a Windows install of Gitea, but was temporarily defeated by the SSH/HTTPS configuration, so that’s on hold for now.

The new tooling gave me a chance to reconnect with my tech knowledge, which was fun.