I'm happy to annouce that Ghost is once again available as an installable application in your Opalstack control panel! 🎉
The new installer has some key differences compared to the installer that we retired back in November 2022:
- It uses a systemwide installation of Node.js v18 instead of a bundled Node.js instance.
- It uses SQLite as the database - more about that later...
- It avoids the binary compatibility problems that our original Ghost installer had by building its npm packages from source instead of using prebuilt binaries
So, about that SQLite database...
You might recall that our original Ghost installer from the early days of Opalstack used SQLite as the database. The Ghost team doesn't recommend SQLite for production use with Ghost so we eventually changed the installer to use our managed MariaDB service for the database.
That worked great until November 2021 when Ghost and MariaDB stopped playing nice together. When that happened, we had no manageable database to use with Ghost and made the decision to stop providing an officially-supported installation for Ghost.
We didn't want to abandon our Ghost customers, so in lieu of the installer we developed a DIY procedure (now deprecated) which included a compatible MySQL instance to use as the database service and that's where we've been for the past several months. It works, but there are some downsides:
- Running your own MySQL instance is extra work and uses extra RAM
- Building Node.js from source takes a very very very long time
- It's harder for us to support from our end since we don't have root access to included MySQL database server
We really wanted to get the Ghost installer out there again and avoid those issues, so we did the following:
- To avoid an excessive build time for every install, we built a systemwide NodeJS v18 that every new installation uses.
- We still can't use MariaDB so we experimented with different environment settings to solve the SQLite binary issues. In the end, the magic environment variable was
NPM_CONFIG_BUILD_FROM_SOURCE=true
which forced npm to build all of the Ghost dependencies from source. This allowed us to go back to our original approach of using SQLite as our default DB for Ghost.
But what about MySQL?
If you view the "about" info in your Ghost admin dashboard when using SQLite as the production database you'll see a warning that it is an unsupported configuration. I can't recall any of our Ghost customers running into any actual problems related to SQLite (other than the binary compatibility issues which came later) but if you're running a large installation then you should probably use a MySQL database.
At this time we still only have MariaDB as our MySQL-compatible (ha) database offering so if you want to run Ghost with MySQL on Opalstack today then you'll still need to use the DIY procedure which has been updated to take advantage of the new Ghost installer.
In the near future it will be much easier to use MySQL with Ghost on Opalstack - we're hoping to roll out our first new servers with AlmaLinux v9 as the operating system and those machines will run MySQL instead of MariaDB. We'll then update the installer to use the appropriate database service depending on the server, ie SQLite for CentOS 7 and MySQL for AlmaLinux 9.