Getting Ghost to work on low memory servers

Not everyone has the luxury of a 1Gb web server

Getting Ghost to work on low memory servers

A short guide on how to solve the low memory warning when setting up Ghost for the first time.

The VPS box used in this example was specc'd at 256mb RAM, on the Ghost install page they recommend a minimum of 1gb of RAM.

When running the ghost install command on a low memory environment, it will fail the installation if it detects less than 150mb of RAM. Even if swap space is given, it will still fail this step.

The solution for this is to manually edit the specific file that contains the memory check.

This is located in the global node modules folder. To find that use this command.

npm root -g

Then within that directory, change to the ghost-cli folder.

cd ghost-cli/lib/commands/doctor/checks/

Using a suitable text editor, change line 6 in the check-memory.js file to 1mb

const MIN_MEMORY = 1;

Then re-run the ghost install script to resume installation.

Note: a useful command to find and kill processes by memory usage. This can free up wasteful processes running on a VPS box with low resources.

ps aux --sort=-%mem | awk 'NR<=10{print $0}'