Best practices on hosting multiple Ghost 6.x instances on Subdirectory (Docker Preview)

I’m wondering if anyone has ideas on best practices for installing Ghost 6.x (New Docker Preview method) on a subdirectory setup.

Also best practices for hosting multiple Ghost instances on the same VPS.

Any thoughts? :thinking:

I will actually be researching this too in the near future. Currently using Ghost-CLI and I’ve got three ghost installations on one cloud server using NGINX.

Not really a Docker fan, but I guess if that’s the direction Ghost is headed for self-hosting I’ll have to get used to it.

From what I gather, I would need to spin up three Docker containers to hold my Ghost sites, then spin up a fourth Docker container to hold a web server/reverse proxy like NGINX or Caddy and somehow link that to my three other containers so they get served correctly. That’s a very rudimentary explanation, but I haven’t started researching it yet.

I’d also like to hear about how other people are handling it so following along here. :slightly_smiling_face:

1 Like

I only migrated one instance to Ghost 6 and I will need to do the same with the others at some point. It also depends on your specific setup (e.g. are you hosting anything else on your vps, or are you fine with caddy using ports 80+443, etc.). But two initial thoughts come to mind for N instances:

  • If you want to access the ActivityHub and Analytics features as well as keep up with upstream changes, you’d better duplicate N times the full Docker Preview set of containers (i.e. caddy + db + ghost + …)
  • The main thing you’d need to take of is the conflict between caddy’s which would all want to listen to ports 80/443, by either
    • using Nginx as the front-end proxy to multiple caddy’s,
    • or by spinning just one caddy by stripping the compose files of all but one caddy instance, and add all your domains in the Caddyfile
1 Like

The ActivityPub setup pulled from their github is multitenant, so you wouldnt need multiple containers of it.

Same for caddy, if youre running nginx or some kind of proxy then you wouldnt even need caddy, just proper routing definitions.

I’m running around 15 instances of ghost on a single vm, they run the same container version. I have the activitypub setup on a separate server and definitions in the proxy server to handle the different destination for the activitypub routes of the individual domains. Its a pretty flexible setup once you get the hang of docker if youre new to it, ive been running things this way since I started using ghost early v5, ive never used the cli version.