Posts

Showing posts from November, 2022

How to custom storage adapters to make your self-hosted Ghost instance filesystem completely external?

Image
I set up my self-hosted Ghost on a free Google Compute Engine( a E2 micro GCP VM instance ) several years ago. The free disk after running a Ghost on the vm is only about 6G left, while Ghost uses local file storage by default In order to save the free space, I would like to seek a way to save images into external storage. The above code section is based on this  Ghost source commit . After dive deep into Ghost open source , you can change the above /images/upload implementation and save the file to any external storages such as AWS s3. Or you can follow this official config guide:  https://ghost.org/docs/config/#creating-a-custom-storage-adapter You can refer to this widely tested AWS s3 adapter . My custom idea: try to use Oracle free 40G database to save images I always like free storage. Oracle JSON database can give you 2 instances, 20G each. In a word, Oracle give you 40G free database storage. I am thinking custom the upload endpoint's implementation and save the image file