I've been making some changes to my current website setup. Before, this site was hosted on the same server that currently hosts my Mastodon instance and Funkwhale pod, as well as my git server. But with gitea's poor performance and the general overcrowding, mixed in with my recent winding down of my Streama server, I decided to make a completely new server for my website.
I've been doing a lot of playing around with FreeBSD lately as part of my never-ending quest to find the ideal operating system. There are some things I absolutely love about the system, and its minimalist setup and hardy security defaults made it the ideal candidate to set my website up on.
The initial install was incredibly easy, although I made some mistakes initially with the
installation of my SSH key. DO's FreeBSD offering is considerably more hardened than their
Debian/Ubuntu ones as they require an SSH key be set up and do not allow the management
of root passwords. This suits me just fine as I never use a root password if I can possibly
avoid it. A fully featured
wheel account is good enough for me.
After getting everything set up nice, my next adventure came with Nginx. I'm so used now to setting up sites and web apps using nginx on Debian-based systems that I can do it in my sleep, but the difference in layout/defaults for Nginx on FreeBSD gave me pause for thought. Once I got into the swing of it, it made a lot of sense and felt a lot more suited to smaller setups, but the initial confusion was somewhat annoying. Not the system's fault in any way (RTFM and all that), but still a puzzler.
Then I decided to be an idiot. See, DO supplies a default
FreeBSD account which is
installed with your keys. This account has full root access using
sudo and is meant to
be used for access and maintenance of the server. But I'm an odd fellow, so I really wanted
to set my account up to better match my other machines. I installed
zsh and decided to
chsh my account to change my username and shell. All went well, I moved my home folder
and then left the shell to load my new shell. Everything loaded fine, but suddently my
site stopped working. Ah, I realised too late that of course the site is just a symlink from
a folder in my home folder, which has now moved. Whoops. I'll just move that b-
sporiff is not in the sudoers file
If you change your username, make sure you also change your sudoers file. Fool.
Anyway, it was easy enough to get everything torn down and built back up. I've now got the server all up-to-date and automated and I must say I'm pretty happy with its performance so far. It hasn't got a big job, but it's a job I'm glad I chose FreeBSD to do.