Ghost Custom Storage Adapter - Supabase

Summary

Supabase storage adapter for Ghost. Recommended as a completely free storage solution for blogs being hosted on platforms with ephemeral filesystems, like Heroku.

Add the following to your configuration file and modify it accordingly.

"storage": {
    "active": "ghost-storage-supabase",
    "ghost-storage-supabase": {
        "bucket": "<your public bucket name>",
        "supabaseUrl": "<your supabase url>",
        "supabaseKey": "<your supabase service key>"
    }
}

To locate the information above, follow this Supabase guide. Buckets are readonly by default, even the public ones needed for this integration. Make sure that you use the service key in the supabaseKey. If you would rather use your anon key, make sure you add the appropriate Postgres Policy in other to allow uploading

Let me know if you need any help trying this out, thinking I should create a Heroku deploy button but there is a good one (without this plugin) already at GitHub - thelovekesh/ghost-v4-on-heroku: Deploy the latest ghost v4 on Heroku

2 Likes

I’m not quite sure what this does. Is this for storing files in “buckets” like on Amazon S3? Could you ELI5 please?

Hey Donald, pretty much… Supabase has a feature for file storage. This used that API to store all your file uploads from Ghost into that platform.

But where is the plugin you mentioned? Or is that code block that is to be added to the config file the plugin?

I’m hosting a site on DigitalOcean and let’s say I wanted to host PDF files somewhere so that I could link to them for people to download.

Is that the kind of use case this is intended for?

Obviously image files can already be stored on Ghost itself, but I suppose there would be an advantage to hosting images elsewhere, to free up space on the Digital Ocean droplet?

1 Like

Oh wow, I forgot to post it :face_with_hand_over_mouth: let me update the original post

Haha that explains the confusion. I don’t feel so dumb anymore. :joy:

Also if you could respond to my question about Digital Ocean, PDF files and storing image files elsewhere, whenever you get a chance, I would much appreciate it!

I’m hosting a site on DigitalOcean and let’s say I wanted to host PDF files somewhere so that I could link to them for people to download.

No, this will replace all uploads and it will actually break your site since it will think your previous files were also uploaded using that system. These adapters completely change the way your Ghost instance works with files. For more info check out their docs Configuration - Adapt your publication to suit your needs