If you’ve been following along in the previous posts, I recently underwent a major upgrade for my home server system. One big part of that was updating the operating system from Ubuntu 20 to Ubuntu 24.
Before starting this entire process, I had, of course backed up my entire previous server. Actually, while most of this was in progress, my old T620 server continued running everything while I worked on these two servers, the main and the fall back. I tried writing the backup of the T620 to the R520, and that worked fine, then I tried performing a distribution upgrade. However, that failed catastrophically. The system wouldn’t boot, had gazillions of errors, and I wasted several days slogging through attempting the usual upgrade process only to conclude it wasn’t worth doing that way.
Instead, I started fresh on the R520’s. It was much quicker in the long run, and I wished I had gone that way to start with, but such is life. After downloading the Ubuntu 24 media, and burning it to a thumb drive, I was able to quickly install the latest long term service version of Ubuntu for use. Some people use the Ubuntu server version, and that’s great for them, but I find the regular version of Ubuntu works perfect for me and my use case.
Of course, if you remember from my previous post, there are 2 raid arrays on the R520, the first being the 8 TB mirrored array for the OS, and the second being the 32 TB raid 5 array for data. I installed Ubuntu to the OS drive, and then had the data drive mount as /var2 in the fstab during startup.
While I have installed LAMP stacks numerous times, I always follow a guide to make sure I don’t miss anything. Typically, I just follow the current one from Digital Ocean. [1] LAMP, by the way, stands for Linux, Apache, MySQL, and PHP, the four principle parts of a good web server. I had considered moving over to nginx, but I have a lot of knowledge and a good comfort level working with Apache2 web servers, so I stuck with what I know. I’ve covered installing a LAMP stack twice on this blog already, so I’ll spare you the details, but it is pretty quick to set up.
I will note that after installing the LAMP stack, I copied over my data from the T620 to /var2 of my new server. I also copied over my apache2 configs for sites and set up certificates with let’s encrypt, as well as installing my noip-duc (No IP dynamic update client) and that was different than it used to be. Now you have a group in your noip account, and you have the duc specify which group instead of individual dynamic addresses. The new syntax looks like this:
$ sudo noip-duc --daemonize -g all.MYKEYNAMEGROUP.com -u USERNAME -p PASSWORD
I also created the gemini user for my gemini server, and copied over my entire gemini user home directory from the old server to the new one. Since I had already moved the old gemini user home directory, that included the Agate binaries that I installed previously and wrote about in my past blog posts. [2] This also included my gemini certificates, so I didn’t need to generate new certs, either. All I had to do to get it running was create a service for it in /etc/systemd/system/ called agate.service and enable it. It looks like this, since I just copy and pasted it from my old server:
[Unit]
Description=agate
After=network.target
[Service]
User=gemini
Type=simple
ExecStart=/home/gemini/bin/agate.x86_64-unknown-linux-gnu --content /home/gemini/gemini/ --certs /home/gemini/certs/ --hostname alaskalinuxuser.ddns.net --lang en-GB
[Install]
WantedBy=default.target
Fortunately, my gemini space blog worked without a hitch. If you want to check it out, I’ve mentioned it on here before, but you need a gemini browser like Castor, Deedum, Buran, or the like and go to gemini://alaskalinuxuser.ddns.net to find it. Essentially, it is a mirror of this blog, in text form.
Since I had copied over my apache2 website configurations, I enabled them, but unfortunately, none of them worked. Next post I plan to cover the PHP issues I ran into with Nextcloud, apache2, WordPress, and Piwigo. The final answer was simple, but the process of figuring that out was pretty brutal!
Linux – keep it simple.
[1] https://www.digitalocean.com/community/tutorials/how-to-install-lamp-stack-on-ubuntu
[2] https://alaskalinuxuser3.ddns.net/2021/09/02/setting-up-a-gemini-server/