Within the past 3 years it appears DigitalOcean made some adjustments to their droplet environments, particularly in how memory is displayed. Now 1GB of memory shows up as 828628 kB instead of 1014776 kB which is preventing DNSOnly from being installed. Fortunately there's a way to get around this so one can still install DNSOnly on a 1GB droplet!

First provision your droplet. I provisioned mine with CentOS 8 since DigitalOcean doesn't offer AlmaLinux directly. If you go this route, you can use a nifty script provided by the AlmaLinux team which will convert you from CentOS 8.x over to AlmaLinux 8.x.

Nonetheless once you've got your base system set, we'll need to run the following command to move into the /home directory and then fetch the DNSOnly install script.

cd /home
curl -o latest-dnsonly -L https://securedownloads.cpanel.net/latest-dnsonly

Next we'll want to run the script with the --keep flag so the install files are kept.

sh latest-dnsonly --keep

Once this is done running you should now see a new directory installd. Go into that directory and open the Installer.pm file in your editor of choice. Here I made a slight adjustment so it bails out if instead the total memory is greater than the minimum memory.

--- Installer.pm.orig   2021-11-19 11:46:36.000000000 -0600
+++ Installer.pm    2022-01-03 12:53:12.000000000 -0600
@@ -293,7 +293,7 @@
     my $total_memory = $self->get_total_memory();
     my $minmemory    = $self->distro_major == 6 ? 768 : 1_024;

-    if ( $total_memory < $minmemory ) {
+    if ( $total_memory > $minmemory ) {
         ERROR("cPanel, L.L.C. requires a minimum of $minmemory MB of RAM for your operating system.");
         FATAL("Increase the server's total amount of RAM, and then reinstall cPanel & WHM.");
     }

Now, while still in the installd directory run the following command to install cPanel & WHM DNSOnly:

./bootstrap-dnsonly

The process should take 10-15 minutes, once completed you now have DNSOnly installed on your DigitalOcean droplet that has 1GB of RAM! 🎉 If you found this guide useful and want to use DigitalOcean please use this link, it helps me afford my infrastructure!

Resources