Recently when I tried to update the ghost installation(this was my first ghost update) of this blog I encountered few errors upon running ghost update command and here is how solved them.
You can't run commands as the 'root' user. Switch to your regular user, or create a new user with regular account privileges and use this user to run 'ghost update'.
I was connected to my server (DigitalOcean droplet) as a root user and it seems ghost has issues with it.
At the time of ghost setup, the script creates a new user named ghost-mgr which can be used to run ghost commands instead of root.
Switch to ghost-mgr user using following command
sudo -i -u ghost-mgr
and now you can run any ghost cli commands like update, or ssl setup etc.
SystemError: You are recommended to have at least 150 MB of memory available for smooth operation.
Ghost CLI expects at least 150 MB of available memory to run the update script but this might not be always available specially if you are running the basic droplet like me.
To update ghost and skip this available memory check use --no-check-mem flag
ghost update --no-check-mem