Max Glenister

#server

6 posts across 2 categories

2026

  • PHP2Shell and the case for building boring sites

    From Wednesday 21 October to the end of the weekend, I was patching an old VPS and moving a handful of sites onto a new one. PHP2Shell finally made the decision for me. This blog carried on regardless, because it’s just files. The sites I’d built with a CMS were another story.

    • 4 min read • 2 interactions
  • Running a Tailscale exit node in a local VM

    I run Tailscale on my laptops, phone and NAS, and wanted to add an exit node so I could route traffic through my own connection when I’m out and about. The obvious place to put it was the NAS, since it’s already always on, but the NAS also holds everything I’d least like exposed if something went wrong. Making it double up as an exit node, with every device’s outbound traffic flowing through it, didn’t sit right. What I wanted instead was a disposable, isolated VM living on the same machine doing that job, leaving the NAS untouched.

    • 5 min read • 1 interaction
  • Pulling Google Takeout straight to a NAS

    I’ve been having a bit of a think about data I’ve left entirely in someone else’s hands. Specifically Google Photos, which has photos going back to 2011 and no local copy anywhere. I’m not going anywhere dramatic with it, but having a backup I actually control felt overdue.

    • 6 min read
  • Building a Home NAS from Mostly Spare Parts

    I’ve had a SNUNMU GK3 mini-PC kicking about since early-2023, barely used. An impulse buy that ended up on a shelf, alongside a drawer full of old drives from various machines and NAS attempts that never quite came together. Picking up a 5-bay USB enclosure finally gave me a reason to use all of it. It’s not polished and it’s not redundant, but it’s simple, flexible, and entirely under my control.

    • 6 min read • 1 interaction

2022

  • Using a Raspberry Pi to Host a local Visual Studio Code Server

    I tend to work on this blog from multiple machines in my home. These include a desktop PC running Windows, a MacBook Pro running macOS, and a Chromebook with the Linux environment enabled. Across all of these machines I primarily use Visual Studio Code.

    • 7 min read • 7 interactions

2017

  • Useful bash aliases for VPS

    Some useful bash aliases that I use on my VPS’: www=/srv/www conf=/etc/apache2/sites-enabled alias ra='/etc/init.d/apache2 restart' alias ownit='chown -R www-data:www-data .' Create an Apache conf and directory for a new domain: function makeconf { primary=${1} conffile="${conf}/${primary}.conf" site_path="/srv/www/${primary}" mkdir -p ${site_path} echo "<VirtualHost *:80>" >> "${conffile}" echo " ServerName ${primary}" >> "${conffile}" echo " ServerAlias www.${primary}" >> "${conffile}" shift for i; do cat >> "${conffile}" <<EOL ServerAlias ${i} ServerAlias www.${i} EOL done echo " DocumentRoot ${site_path}" >> "${conffile}" echo "</VirtualHost>" >> "${conffile}" } Grab the latest Wordpress tar and extract it to the current directory: function wordpressitup { wget --no-check-certificate https://wordpress.org/latest.tar.gz tar xfz latest.tar.gz cd wordpress cp -R * .. cd .. rm -r wordpress echo "Wordpress installed" } Some shortcuts to go to common directories: function dwww { cd /srv/www } function dcache { cd /var/cache/mod_pagespeed/v2 } function dconf { cd /etc/apache2/sites-enabled/ } See which directories and files are using up all of the space: function fsizes { du -h --max-depth=1 | sort -hr df -BG }

    • 1 min read