Adam E.

I like messing with stuff. This is where I ramble about them. No warranty included!

Automate shutdowns with a dumb UPS

My homelab isn’t much – it consists only a server and a NAS. I back-up my notes, movies, photos and documents on the NAS, and serve various services on the server such as my home internet, note app, media server, game servers, and this very site, and, well, among many others. I sync my photos to OneDrive just in case anything physical happens to the setup. However, I worry about corruption – especially one induced by a power loss....

June 19, 2024

Proxying TCP from LAN to WSL2

I am developing this blog with Hugo in a Docker container which is running in WSL (not Docker Desktop – I barely use the GUI anyway). Hugo has a web server which allows me to see how the website looks like as I make changes. With host networking mode under Docker, in WSL, Hugo’s port 1313 is published on localhost. I can test it in Firefox and in Chromium Edge. However, to test it on my phone, in Safari, I first need to push changes to my Github repo before pulling to my Nginx LXC container, because ports on WSL only listens to localhost....

August 20, 2023

Importing Docker images into WSL2

I like WSL2. It’s lightweight, and integrates well with Windows as files are easily transferrable into and out of containers. I’ve recently glanced at Microsoft’s docs regarding importing Linux distros in WSL which includes an example of exporting CentOS from Docker and importing it into WSL. It’s quite simple to do. However, you do need to have Docker installed. For this example, I will be importing a Docker image of Hugo, a static site generator, into WSL....

August 20, 2023