Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Ghost
  3. Adding a storage-adapter in ghost

Adding a storage-adapter in ghost

Scheduled Pinned Locked Moved Ghost
7 Posts 3 Posters 1.6k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    d1rk
    wrote on last edited by d1rk
    #1

    I am using ghost to blog. I prefer the interface over working with Wordpress. The interface, including the templates is clean and easy to use.

    Since the team over at ghost decided not to build a media-manager, I prefer to not upload my media to the ghost installation itself, but to something externally.

    Luckily ghost offers storage adapters for that. Sadly enough, most of them are outdated. Not even sure, they work.

    The ones I found to be recent are:

    • Google Drive
    • Google Cloud Storage
    • WebDAV
    • BunnyCDN

    The last one has been released just recently. That's great as it is cheap (starts at 1 USD / month) and has a built-in cdn, to allow for even faster page-speeds.

    According to the documentation one has to add the relevant code at content/adapters/storage to make the adapter available.

    Then, one has to add a snippet to the configuration, according to the documentation.

    So, using the Cloudron file manager, it was quite easy to achieve:

    1. Add the folder storage underneath /content/adapters
    2. Upload the required files to said folder
    3. Update the config-file, according to the documentation
    4. Restart the app

    Done.

    My question to make that process a bit easier: Could we package up the storage-adapters to the ghost-base image to save the first two steps here?

    Hope this helps as a guide, as well as a starting point for discussion 🙂

    1 Reply Last reply
    3
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      Great question, and yes, having adapters already installed would help.

      Also, I'd like to point out the WebDAV option which our own Surfer app can do easily, so you can even self-host your media yourself with a nice FileManager interface for it too.

      Conscious tech

      D 1 Reply Last reply
      2
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        As @robi said, Surfer might be a good option btw. All our screenshots are hosted on https://screenshots.cloudron.io, for example, which is just a surfer instance.

        But to answer the original question, the danger (for us) of adding these modules to the base package is that users might start to rely on them and expect us (the packagers) to somehow maintain this. Like if we bundle some s3 adapter and that adpater becomes unmaintained, removing this will cause unnecessary heartache for all involved. It's best if users understand that they are using some 3rd party thing that is not "supported" directly by the upstream app Ghost.

        D 1 Reply Last reply
        1
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by girish
          #4

          If you are in the market, you can submit a PR to update the Ghost docs at https://docs.cloudron.io/apps/ghost/ . You have to add it to https://git.cloudron.io/cloudron/docs/-/blob/master/knowledgebase/docs/apps/ghost.md?ref_type=heads . Thanks!

          1 Reply Last reply
          1
          • robiR robi

            Great question, and yes, having adapters already installed would help.

            Also, I'd like to point out the WebDAV option which our own Surfer app can do easily, so you can even self-host your media yourself with a nice FileManager interface for it too.

            D Offline
            D Offline
            d1rk
            wrote on last edited by
            #5

            @robi Good point - thanks.

            1 Reply Last reply
            0
            • girishG girish

              As @robi said, Surfer might be a good option btw. All our screenshots are hosted on https://screenshots.cloudron.io, for example, which is just a surfer instance.

              But to answer the original question, the danger (for us) of adding these modules to the base package is that users might start to rely on them and expect us (the packagers) to somehow maintain this. Like if we bundle some s3 adapter and that adpater becomes unmaintained, removing this will cause unnecessary heartache for all involved. It's best if users understand that they are using some 3rd party thing that is not "supported" directly by the upstream app Ghost.

              D Offline
              D Offline
              d1rk
              wrote on last edited by
              #6

              @girish I see that problem. Especially, as the quality of the storage adapter is questionable, at its best...

              1 Reply Last reply
              1
              • D Offline
                D Offline
                d1rk
                wrote on last edited by
                #7

                I actually have a problem to get any storage adapter to work:

                Dec 15 16:49:03==> Ensure permissions
                Dec 15 16:49:03==> Migrating database
                Dec 15 16:49:04=> Healtheck error: Error: connect ECONNREFUSED 172.18.17.69:2368
                Dec 15 16:49:04[2023-12-15 22:49:04] INFO Finished database init!
                Dec 15 16:49:05[2023-12-15 22:49:05] INFO Finished database migration!
                Dec 15 16:49:05==> Starting Ghost
                Dec 15 16:49:05[2023-12-15 22:49:05] INFO Ghost is running in production...
                Dec 15 16:49:05[2023-12-15 22:49:05] INFO Your site is now available on https://whatever/
                Dec 15 16:49:05[2023-12-15 22:49:05] INFO Ctrl+C to shut down
                Dec 15 16:49:05[2023-12-15 22:49:05] INFO Ghost server started in 0.423s
                Dec 15 16:49:06[2023-12-15 22:49:06] INFO Database is in a ready state.
                Dec 15 16:49:06[2023-12-15 22:49:06] INFO Ghost database ready in 0.705s
                Dec 15 16:49:07[2023-12-15 22:49:07] ERROR Unable to find storage adapter s3 in ,/app/data/content/adapters/,/home/cloudron/ghost/versions/5.75.2/core/server/adapters/.
                Dec 15 16:49:07
                Dec 15 16:49:07Unable to find storage adapter s3 in ,/app/data/content/adapters/,/home/cloudron/ghost/versions/5.75.2/core/server/adapters/.
                Dec 15 16:49:07
                Dec 15 16:49:07Error ID:
                Dec 15 16:49:0727753420-9b9c-11ee-acce-d91d06239c3f
                Dec 15 16:49:07
                Dec 15 16:49:07----------------------------------------
                Dec 15 16:49:07
                Dec 15 16:49:07IncorrectUsageError: Unable to find storage adapter s3 in ,/app/data/content/adapters/,/home/cloudron/ghost/versions/5.75.2/core/server/adapters/.
                Dec 15 16:49:07at AdapterManager.getAdapter (/home/cloudron/ghost/versions/5.75.2/node_modules/@tryghost/adapter-manager/lib/AdapterManager.js:128:19)
                Dec 15 16:49:07at Object.getAdapter (/home/cloudron/ghost/versions/5.75.2/core/server/services/adapter-manager/index.js:31:31)
                Dec 15 16:49:07at Object.getStorage (/home/cloudron/ghost/versions/5.75.2/core/server/adapters/storage/index.js:14:27)
                Dec 15 16:49:07at setupSiteApp (/home/cloudron/ghost/versions/5.75.2/core/frontend/web/site.js:85:71)
                Dec 15 16:49:07at module.exports (/home/cloudron/ghost/versions/5.75.2/core/server/web/parent/frontend.js:22:58)
                Dec 15 16:49:07at initExpressApps (/home/cloudron/ghost/versions/5.75.2/core/boot.js:248:68)
                Dec 15 16:49:07at bootGhost (/home/cloudron/ghost/versions/5.75.2/core/boot.js:515:32)
                Dec 15 16:49:07
                Dec 15 16:49:07[2023-12-15 22:49:07] WARN Ghost is shutting down
                Dec 15 16:49:07[2023-12-15 22:49:07] WARN Ghost has shut down
                Dec 15 16:49:07[2023-12-15 22:49:07] WARN Your site is now offline
                Dec 15 16:49:07[2023-12-15 22:49:07] WARN Ghost was running for a few seconds
                Dec 15 16:49:17=> Healtheck error: Error: Timeout of 7000ms exceeded
                Dec 15 16:49:27=> Healtheck error: Error: Timeout of 7000ms exceeded
                

                The configuration is as per documentation on each adapter. Location of all adapters are: content/adapters/storage/s3. Tried different locations, though.

                Anyone has an idea?

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search