It feels like quite a long time since I blogged about PHP, and that’s because it is! Over 5 years, to be precise. Unsurprisingly, none of the supported versions of PHP I was running back then (7.2 and 7.3) are supported today. How about we start with a similar timeline from the PHP website:
As you can see, only 7.3 is still visible on their support roadmap, and support for that ended back in 2021! 7.4 is pretty much the minimum most web-based applications will work with now, but support for this ended just a year later, at the end of 2022.
Fortunately, most of my online services are running supported versions, but some are proving more problematic to update than others, and I’m not entirely sure how to upgrade them all.
The process for updating my TrueNAS/FreeBSD jails is still pretty much as described in the blog from five years ago. The PHP modules change occasionally, with some dropped as they’ve been included in the core and some new ones added, but they’re mostly pretty straightforward. Here’s a quick table of my services using PHP:
LimeSurvey
7.4.32
MediaWiki
8.2.24
Nextcloud
8.3.12
Pi-hole
8.1.2
WordPress (live)
8.3.12
WordPress (test)
7.3.12
APE Services PHP Versions
LimeSurvey is running in a FreeBSD jail, which I’ve updated to 13.4. This will undoubtedly cause me problems, as 7.4 is no longer supported, so a pkg update && pkg upgrade will break things by removing PHP. I have updated the database to 10.6, and LimeSurvey is running the latest version. Still, when I update PHP to anything other than 7.4, I get the error reported here on the LimeSurvey forum. When I get some free time, I’ll play around a bit more, but this one might need to be rebuilt, perhaps starting to move away from jails to docker containers.
I rebuilt MediaWiki as much as a test as anything when I had some database upgrade issues. This is running a supported version and could be upgraded further if required. The suggested version was 8.2, so that’s where I went.
I upgraded NextCloud to the latest version, and that seems to be running fine, although I have noticed a few issues in the TrueNAS console where PHP is exiting in this jail, so I will need to keep an eye on things:
Nov 4 13:21:48 freenas0 kernel: pid 29684 (php-fpm), jid 36, uid 80: exited on signal 10
Pi-hole is running in its own VM, following the instructions on the website and using the simple curl build script. Other than updating things when I noticed a new version, I’ve not tried to do anything with PHP. It’s still receiving security updates until the end of 2025, so I have about 12 months before I need to do anything.
My live WordPress jail, where this blog is hosted, runs 8.2 and could be updated to 8.3. I’m not really sure why I haven’t done that, so I will before the end of the year. UPDATE 10-Nov-24: It is now running 8.3.12!
My test WordPress jail is running in a VM as a docker container, and other than updating WordPress, I’ve not touched the docker container. This is still running 7.3, and I really need to consider updating this, but I’m unsure where to begin. I will need to understand Docker a little more than I currently do if I’m considering migrating from TrueNAS Core to Scale at some point in the future, so this might be a good place to start. It wouldn’t be the end of the world if I completely broke this and needed to create a new test environment.
Anyway, this is starting to sound like one of my annual ‘state of the server’ blogs, and given we’re not too far from the end of the year, I might be doing one of those again, very soon (sorry, Chris)
TrueNAS and FreeNAS (as it was named before that) have been one of, if not the, most blogged-about subjects in the last 250 blogs (yes, I made it to 250 and didn’t even notice) over the past 8 years (or at least it will be in November 2024).
I’ve just upgraded from TrueNAS 13.1-U6 to 13.3, which could be the last major release of TrueNAS Core, the FreeBSD-based version that was FreeNAS 9.2.8 when I started using it in 2013.
Upgrading TrueNAS is usually pretty uneventful, even though it causes me no end of worry for weeks before and sometimes weeks afterwards. This is one of these updates that I might still be fighting with in months to come!
I’ve already blogged about some of iXsystems focus changes here, with TrueNAS Scale based on Linux being the future direction of travel. What this means for TrueNAS Core is still a little unclear, but hopefully, there are still a few years before that becomes a major issue for me.
After updating TrueNAS (which is built on FreeBSD 13.3 rather than 13.1), the process of upgrading the jails begins. This updates them to the base version of FreeBSD. I successfully upgraded one jail from 13.1 to 13.3 and then updated and upgraded the packages (#pkg update & pkg upgrade), but it was only my Airsonic jail, which isn’t really used in anger anymore. I wouldn’t be upset if it broke and I had to destroy it.
Lots of my jails are web-based applications running on a FEMP stack, or FreeBSD (as the operating system), Nginx (a web server pronounced Engine-X), MySQL (a database server, in my case Mariadb), and PHP (a programming language to process dynamic PHP content). I’ve kept the jails running by upgrading the operating system between versions of TrueNAS using commands like #iocage upgrade -r 13.3-RELEASE <jailname> and then within the running jail #pkg update && pkg upgrade. I needed to update PHP separately, which I blogged about here, but the one thing I neglected was the MySQL element. My Nextcloud, WordPress, and LimeSurvey jails are all running Mariadb103, which, along with Mariadb104, are no longer supported. The latest version of MariaDB is 10.11, so I’m pretty far behind.
I asked for some help from the TrueNAS forum, and as ever, I wasn’t let down with some excellent advice. It turns out I can update the jail base to FreeBSD 13.4 on TrueNAS 13.3, so I’ll be doing that and then trying to update Mariadb103 to Mariadb105 as a first step. I’ve struggled with this in the past and simply rolled back and found a way to update without touching the database. In hindsight, that wasn’t a great idea, but at least now I have a problem that needs to be solved, and once I’ve solved it for one, it should be easy enough to apply to the others.
It turned out to be a little more problematic than I thought, although that’s more down to my lack of System Administration skills than the technology. The first rule of updating databases is to ensure the old database has been shut down correctly and not aborted by trying to jump a step ahead and simply install the new one! I’m sure this will be in System Administration 101, which I think I also skipped.
I also learned about something called tmux, which lets you keep a session running on TrueNAS even when your SSH session is lost. How have I made it 10 years without knowing this? To be fair, they have only just removed the built-in shell console, which I tended to use more than the SSH method.
Anyway, I’m going to list some commands I’ve used to upgrade, which is more for me than anyone reading this:
#tmux new -t iocage (starts a tmux session called iocage)
#tmux a (restart the previous tmux session – I’m guessing you have could several running, although I’ve only tried with one)
#iocage fetch -r 13.4-RELEASE (downloads the release)
#iocage upgrade -r 13.4-RELEASE <jailname> (update the jail to the specified release – note, there are various ‘y’ prompts to confirm the process here, which is where tmux comes in handy. There is also a step which appears to stop with a : prompt, and this is skipped by entering q several times)
#iocage restart <jailname> (restart jail after upgrading)
#iocage console <jailname> (console session into jail)
#pkg info (lists all installed packages and versions)
#service mysql-server stop (clean stop of database server)
#pkg install mariadb105-server (this will remove the old database server and then install the new one – 10.5 – along with any dependencies)
#service mysql-server start (this should start the new database server; check with #service mysql-server status)
#mysql_upgrade -u root -p (to upgrade the databases)
#pkg update && pkg upgrade (this will upgrade all of the other packages in the jail)
I’m not going to pretend I understand exactly what changed between mariadb103 and 105, but the main issue I encountered was the UNIX socket connection, which changed from /tmp/mysql.sock to /var/run/mysql/MySQL.sock. These changes were in the /usr/local/etc/mysql folder and ./conf.d folder.
So, while the database started and the upgrades worked, none of my web applications would start, as the configuration to the database was wrong. So far I’ve fixed Nextcloud (/usr/local/www/nextcloud/config/config.php where you set ‘dbhost’ => ‘127.0.0.1’,) and WordPress (/usr/local/www/wordpress/wp-config.php where you set define(‘DB_HOST’, ‘127.0.0.1’);)
This got everything back up and running but after a reasonably stressful afternoon and several snapshot rollbacks where I’d broken things and had no idea what to do. Thank goodness for TrueNAS snapshots and the incredibly helpful people who use their forum. It’s still one of the best online communities I’ve come across, even though I visit less frequently since the forum platform changed. I need to try and fix that!
Well, almost! It’s been a little while since I blogged about upgrading PHP here, and while I think I’ve done one update (from 7.4.4 to .13) I haven’t kept things all that up to date. I thought it was about time to change that, and overall they were pretty painless upgrades.
Although this is going to be similar to my New Year update at the beginning of 2020, this New Year TrueNAS update feels very different!
I’ve been working from home since March 2020 and for at least some of the year had a little more time to play around with things.
Similar to the beginning of 2020, I start 2021 with most things up to date. Midway through December, I upgraded my FreeNAS machines to the latest version of TrueNAS Core, which I blogged about here. Although there were a few bumps, everything has been running well since, and I’ve also upgraded all of the jails without too many issues.
FreeNAS0 has performed fantastically during 2020, and while I did have an issue with one of the HDD in the pool. it was replaced with the cold-spare and the RMA process with WD worked flawlessly, which I blogged about briefly here.
I also replaced my UPS during 2020, although this was a simple return process through Amazon and an identical replacement from eBuyer. The old one had been shutting down randomly, which kind of defeats the object, and Amazon’s solution was to return it for a full refund. They couldn’t provide a replacement, so I picked one up from eBuyer, saving about £30 and that’s run 24×7 since it was switched on, as you’d expect from a UPS.
From a VM perspective, very little has changed. I still have Ubuntu VMs running ONLYOFFICE, CrashPlan and Docker, although I have a new one configured with Docker just for running Pi-hole. I also had a VM running NGINX Proxy Manager although that’s been moved across to my Hass.io Raspberry Pi now.
I still have a couple of VMs for playing with Windows and TrueNAS, although they spend most of the time switched off. Other than a couple of sharing issues, which were easily resolved, the TrueNAS update for the VMs was excellent.
In terms of the iocage jails, here’s an update on those, in ‘jail-name’ alphabetical order:
Airsonic
This is a new one from last year which I built in June and blogged about here. Given I’ve spent most of 2020 at home, it’s not really been all that useful but I imagine I will use it a little more when things start to return back to the new normal.
emby
emby is still my media server and there’s no going back to Plex. It’s running 4.5.3.0, which is the latest stable release.
MediaWiki
Another new one, which I’ve blogged about a few times in 2020. I’m not really using it for anything, but hope to find something at some point.
Nextcloud
This is probably the jail I’d be most lost without, although the WordPress one might put up a strong case. I use this for syncing files across all of my devices (iMac, MacBook, iPhones, etc.) but also for accessing files remotely when I’m not on my own devices. The integration with ONLYOFFICE just adds the cherry on top! I’m up to date running the latest 20.0.4, PHP 7.4.13 and can only see my use of this continuing to grow in 2021.
(Lime)Survey
This was my newest jail last year and has been used again this year to run a couple of small surveys for my daughters Out Of School Club again. It’s updated less regularly now as I tend to do it manually rather than paying for the privilege of using the built-in Comfort updater. It takes a little longer but is saving me £80-90 a year.
(Open)VPN
Still working well for connecting back into my network securely whilst away from home, although again it’s had less use this year given I’ve spent most of my time at home! Having just upgraded all of my jails with TrueNAS, it’s also surprisingly up to date running 2.4.9.
WordPress
As with last year, I’ve still got the same WordPress jail for my company website and this blog, and a Docker container running another version of testing. They are both up to date running 5.6, although my test instance is a little behind on PHP 7.3.12 while the live system is running 7.4.13.
And that’s it, so a few haven’t made it to the end of 2020!
I replaced the SSL Proxy jail in June when I was running NGINX Proxy Manager in a small VM. Around October this move to my Hass.io Raspberry Pi. It’s a much cleaner tool for managing this, but I’m glad I ran things manually for a little while and have some understanding about what this is doing in the background. I moved all the old config and deleted the jail, but I can’t imagine ever going back to doing things manually.
The Home Assistant jail was moved to a Raspberry Pi as there’s so much more functionality available running Hass.io and Home Assistant Core than you can via the virtual python environment used to power things on FreeBSD. I didn’t blog about this at the time, but I perhaps will sometime this year as I really need to move the OS onto an SSD rather than the default micro SD card.
I switched to running Calibe-web in a Docker container almost straight after my 2020 update, which I blogged about here. It’s so much better and is running the latest 0.6.9 version. I still have the calibre jail, although it’s switched off and is another one to delete this year.
And lastly, my DNS jail. This was replaced with a VM running Pi-hole in February and has again proved to be a much nicer solution.
So as with 2020, almost everything is up-to-date and running well, and in many cases better than it was 12 months ago. I still have over 18TB of storage capacity on FreeNAS0 and the jail SSDs are still running less than 50% capacity. FreeNAS1 on the other hand is approaching 80%, although given that’s really just a backup target, I don’t think I need to worry about that limit. So long as I don’t hit 100% everything should be fine, and I can always be a little more selective about what I backup. At some point, I will replace the 4TB drives with 8TB drives from FreeNAS0, but I shouldn’t need to do that this year.
Anyway, that was my New Year TrueNAS update! Have a prosperous New Year and hopefully, 2021 will be a much more normal year. If you didn’t get around to playing with FreeNAS in 2020, makes 2021 one to check out TrueNAS…
At the end of 2019, I built a new FreeNAS server, which was the subject of many blogs at the time. It’s been running well ever since until I received an e-mail notification earlier this week to say that FreeNAS0 had suffered a HDD failure!
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRejectRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Recent Comments