Running Ghost on Digital Ocean

I decided to self host my Ghost instance on Digital Ocean using their droplets. Overall it was really easy to get set up, much easier than using something like Amazon Lightsail. Although I quickly ran into issues with running Ghost on the cheapest droplet size.


       The issue was memory.

In the graph pictured above, the section from 6:35 - 7:00 was the amount of memory usage used by Ghost just running. I was using the basic $5/month droplet so I have 1 shared vCPU, 1GB of memory, 25GB of SSD space, and 1TB of data transfer. So it's easy to see that simply just running the application was taking around 80% of available memory. All was well I could make posts, edit settings and visit the site with no issues.

As soon as I started uploading images into posts, specifcally galleries, that's where the issues began. The memory spike in the graph above at 7:00 was when I started uploading images, and then the next jump was when I tried to upload some more, and suddenly memory usage was pegged at 100% and my image uploads started failing.

The server became unresponsive, I couldn't access the site and couldn't even ssh into the instance to reboot. So where you see the graph drop is where I restarted the server and suddenly memory usage was significantly down. Although as soon as Ghost initalized and my site was back up and running, you can see that it was right back to 80%.

Clearly 1GB of memory was not enough for Ghost to handle the load of uploading images, especially a gallery of images, which is a max of 9 images at once.

I upgraded to the next level up of droplet, so everything else was the same, but now I had 2GB of memory. As soon as I was back up and running with the 2GB droplet, gave my image upload another try, and it worked with no issues, and wasn't anywhere as slow as the first time around.

I'm going to keep an eye on memory utiliziation overtime as I use this, and see if it gets out of hand again, but from the graphs it seems to be staying steady just under 50%.