Problem in Multiple Ghost sites on shared hosting

Hi everyone. I have run into a problem while hosting multiple ghost sites on a shared hosting (namecheap stellar plus). These are low traffic non-membership sites.

I have a main domain abc.com with shared hosting.
I have two addon websites pqr.com & xyz.com on which I want to install ghost.
Their respective directories with 755 access are /home/abc/pqr & /home/abc/xyz

Installing ghost on xyz successfully

  • creating a node 18 app
  • in the terminal, installing ghost cli, then rm -rf *, then ghost install local
  • changing the url in the config file from localhost to the website url

I am repeating the same steps for pqr, I get this error on ghost install local step:
Ghost was able to start, but errored during boot with: Access denied for user ‘root’@‘localhost’ (using password: NO)

On checking, it is not able to generate ghost-local.db in the folder /contents/data/

What do I do?
(If I do ghost install instead of ghost install local, I get the sudo-root error which might be due to shared hosting instead of VPS, so I went the ghost install local way).

Sounds like a permissions problem. I’d really carefully check that the permissions for that folder are correct for the user you’re running ghost install local as. Since you have a working install, you might find it helpful to compare.

It’s definitely possible to run multiple local installs at once, each in its own directory and with its own port.

I think you already know this, but only MySQL 8 is supported for production. That doesn’t mean you can’t set up a local install and treat it like production, but do be aware that you’re doing something that’s not intended, so you’re at higher risk of things breaking.

1 Like

Turns out the problem was database. The installation was not able to create ghost-local.db file.
I changed sqlite3 to mysql and ghost start was successful but the site gave 503.
I had to copy a local ghost-local.db file and the site finally worked as expected.

1 Like