Re-jigging my home server

I’ve written the below as a brief guide to my home server. It gives some high level information about how I’ve done it, but as with everything, if you want to do something similar you’re going to have to invest some time…

My home server has had a lot of iterations. You may question why anyone needs to leave a computer running all day? This was borne out of wanting something to allow me to access my files from outside the house, and to have a handy way to play music in the living room.

Thus Sally IV was born. It was made from two ikea picture frames with a hinge holding them together, an old laptop pulled apart to turn the screen around and some removable hard drives. This was before touch-screens were affordable so I was constantly opening it up to plug in a keyboard and mouse.

Sally IV

Then after moving to Australia I used my main desktop for a while, before realising just how horrendously expensive electricity was out there, and I needed that precious juice for running the air conditioning.

It was also a little too child accessible.

Then came a down-spec to a simple file server in the form of a newly released Raspberry Pi, which again was a little too child accessible.

Then for a while, a dedicated file server (HP N54l) seemed to be a good option. I still have this server kicking about the house through I should have sold it years ago.

Picture off Youtube as it’s camera shy.

Finally opting for something a little more robust – Dell Poweredge 620, ex corporate server.

I made a ‘Lack Rack’ however this server is too long to fit!!

Now the temptation here is to go for something even larger, more power hungry and will more drive bays for my ever increasing needs, however that’s not what’s needed anymore.

When I bought this, I had all my machines virtualised using ESXI. ESXI is a ‘bare metal’ hypervisor for running virtual machines. This (in practice to me) means it installs a really minimal operating system from which to run virtual machines. This operating system is so small it loads off a USB drive inside the server and runs in memory.

For every programme I had a copy of Ubuntu Server running for each separate programme. It was handy as I was able to take regular snapshots so that in the event of a machine going down I could restore it quickly. Of course running so many operating systems side by side took a lot of RAM so I installed 20GB. More than I need but I didn’t know that at the time.

The first problem is, this machine is noisy. This machine is also very power hungry. It simply wasn’t made for sitting in someones spare bedroom so it’s time to let it go to someone who could make better use of it. The second part to this is my transition to moving away from virtual machines and towards ‘Docker’. Docker is a containerised system, a little like virtual machines but a lot lighter. Instead of a whole operating system (like I was using with full virtual machines) it is a package which only contains the parts it needs to run. These containers can run in parallel with each other allowing you to create thousands of instances if needed. I only need one however, but it’s nice to know it’s available. The other advantage is that these containers can be run and destroyed after each session, or re-created on demand.

So what am I moving to? A Lenovo Thinkcentre I found on e-bay for £79. It has a Core i5 processor with a Passmark of around 8000. That’s about enough for transcoding 4 HD video streams to send over the network. More than enough for my house. Plus it has about 20W power consumption so a lot less than my existing server.

My plan is to run regular Ubuntu desktop with multiple docker instances. Why ‘desktop’, when I have been running ‘Server edition’ for so long. Well, some things are easier to do using a mouse. I know it’s not a purist approach but I’ve spent too much time scratching around trying to work out what to type to make it work. Sometimes it’s easier to click through a folder structure.

So I’ve backed everything up, so while I rip the hard drive out the old server and install it into the new one, what am I actually using this server for?

Using this tutorial I installed Docker and using this tutorial I installed ‘Docker Compose’

Docker compose is a super easy way to set up and use a container. If you head over to Docker Hub (which is where you will find docker images for almost any programme) you will usually find the correct compose file.

Using a docker compose file is easy – you make a text document called ‘docker-compose.yml’ with the contents as given on the docker hub page – this is an example for Grocy. You can change the ports and where the data is saved. I find it easier to change the data volumes to the same place so backing up the persistent configuration is easier.

version: "2"
services:
  grocy:
    image: linuxserver/grocy
    container_name: grocy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=your timezone, eg Europe/London
    volumes:
      - path to data:/config
    ports:
      - 9283:80
    restart: unless-stopped

Once saved, you enter the command ‘docker-compose up’ in the command line from the same directory as your compose file. This will then start it running until you press ‘Ctrl+C’ to stop.

If all worked ok, I usually start it by running ‘docker-compose up -d’. The ‘-d’ makes it run in the background.

It’s all working fine for the last 4 days so I’m claiming it a success.

And the system doesn’t appear to be too stressed either

And so, now that’s done, I guess I’ll have to go break something else so it needs fixing.