in Other

Server Cabinet Update

Article Image

A new (physical) home for this website.

Since moving into my new apartment, I've slowly assembled a server cabinet to house a lot of my electronics in a neater fashion. The cabinet itself is actually just an IKEA BESTÅ with a set of cheap rails screwed into the unit. It is a 2-post rack, with only about 15 inches of depth, meaning it can only handle smaller telecom-style units.

Inside the Cabinet:

Inside the cabinet is the following:

  1. A drawer, for holding patch cables and screws
  2. A bracket from MyElectronics.nl, which houses a Mac Mini, and a Raspberry Pi 4
  3. An Unmanaged Ethernet Switch from Netgear I bought used off eBay
  4. A patch pannel
  5. The router my ISP gave me on a shelf
  6. A Synology Unit and expansion I bought off eBay
  7. A blanking pannel
  8. A surge protector
  9. A UPS from CyberPower I got on sale from Amazon

I'm happy with the cabinet, it ended up being 13U tall -- more than enough for my needs with room to grow.

The unit with everything inside is extremely quiet, which is important as it's inside the living room (thanks for putting the fibre drop there, Bell). Most of the components consume little power, with only the Synology and its expansion unit having fans. My hearing isn't the best, but even sitting only a few feet away I can't hear a peep.

Not drawing a lot of power has the added benefit of not needing a large UPS. The UPS estimates it can last around an hour on battery, enough to get through some of the annoyingly frequent power outages we get in Halifax, or at least give my computers a chance to safely shut down.

As for what the computers are used for? The NAS is fairly self explanatory -- I use it to back up my MacBook, the Mac Mini also inside the server, and my Desktop PC. I also use it as effectively a massive hard drive where I put Blu-Ray backups and archives of projects.

The Raspberry Pi is primarily used for pi-hole, a DNS server that blocks adds, an NTP server for my rackmount clock project, ddclient for updating Cloudflare whenever my public IP changes, and a Tailscale client, so I (and my family) can VPN to my home network when I am away.

Realistically, these disparate services are begging to be containerized, but setting up Docker is a project for another day.

The Mac Mini is running a few things, namely a Plex server for watching the aforementioned Blu-Ray collection on my TV, a MAMP instance that is running this very web server, and a few other smaller tasks.

Self Hosting

As of today, this website is being hosted in my cabinet, rather than a server somewhere in Toronto. I previously used Linode, and had no issues with them -- I just thought it was a bit silly to have a Mac Mini on 100% of the time and not use it as my web server.

VPSs obviously provide a load of benefit -- I've never had to worry about power/internet outages in Toronto, nor have I had to worry about my server's IP changing out from under me. Put simply, I can't match that level of reliability. Earlier this week we had a power outage here in Halifax on a beautiful sunny day, and my public IP is subject to change whenever Bell feels like it.

To get around this problem, I decided to use ddclient with Cloudflare's API to update my public IP every 300 seconds. My IP has yet to change since I implemented this, but I hope this solution suffices en leu of a static IP from my ISP (or IPV4 finally being deprecated). As for power outages -- I do have the UPS in the bottom of the rack, but honestly in the case of a long power outage, I am alright with my website going down for that duration.

Aside from that, changing the host was as simple as copying the website's contents from Linode to my Mac, and updating my GitHub action to rsync with my Mac Mini, not my Linode server. I had to expose the ports for HTTPS / SSH in my router settings. I disabled SSH login via password, so I (or more accurately GitHub) can only SSH with a key. This probably isn't necessary from a security standpoint, but I figure it wouldn't hurt.

I'm using MAMP PRO to run Apache, MySQL, etc. I bought a copy back in university. Again, this should probably be a Docker container, but I like the GUI, and Docker scares me it hasn't failed me yet.

I'm not sure if I will self-host this site forever. I may end this experiment and go back to a VPS soon enough if things break more often than I like, but it has been a fun exercise either way.