Ghost Installation on DO with Runcloud

How can we install Ghost on Digital Ocean which already has Runcloud installed?
I have Nginx setup task failed…

Runcloud itself installed ngnix, apache, php, mysql, etc so the only thing I had to do was updating nginx to the newest version. And I did it.

But the issue now is Ghost-cli tool doesn’t see my ngnix folder, because Runcloud named it nginx-rc during its own configuration process, so I have etc/nginx-rc folder. But one more issue might be with sites-available folder…I simply don’t have it inside etc/nginx-rc/

By the way, I want to keep the ghost install on the same droplet which is running Runcloud with its WordPress websites.

Good question!

There’s an undocumented feature that allows you to use an environment variable to override the config path for nginx. Details in this PR:

Providing it still runs as nginx, you should only need to set NGINX_CONFIG_PATH. You can use this when running commands, but if you set it globally on the machine you won’t have to think about it again :slight_smile:

Good to know, but Runcloud Doc says: “Do not change this (/etc/nginx-rc/nginx.conf) config manually since it will be overwritten by RunCloud”.

What commands should I use if I don’t want to change the config globally?
(I just want to install Ghost. I’ll wont be dealing with ghost-cli much in the future)

After reading the article you provided I understand that at least I need to create the following folders:
sites-available , sites-enabled , snippets , conf.d inside of /etc/nginx-rc/ owned by root and with perms 755

I wish Ghost team could make the installation on servers with OpenResty / Runcloud / Serverpilot, etc easier one day…

Okay, I managed to install Ghost, but only without SSL. And it was tricky.
The issue is that some ghost cli commands require nginx reload, when Runcloud nginx called nginx-rc. So I have to manually reload my nginx-rc.

Now, what suggestion for setting up https version of my ghost instance?
Even though I did manual restart of nginx-rc after running ghost setup nginx ssl it seems like it didn’t finish generating what I need for my nginx config.

Currently my nginx-rc/conf.d/ghost.conf (let’s call it NGINX CONFIG as this file worked for http version of my ghost)) looks like:

(Yes, I slightly modified it, because originally it didn’t work too)

By the way, I have created A record blog on my DNS panel (Cloudflare) with Digital Ocean droplet IP. And I still can not see my ghost website …

Maybe I can modify ghost cli? Is that possible? At least I need nginx-rc reload instead of nginx reload.

Or maybe I should simply modify my NGINX CONFIG. What do you think?

Please help. I am not strong at nginx configurations

No need for answer. I came up with a solution and successfully install ghost with SSL on blog.mydomain.com. I marked your respond as SOLUTION because running command export NGINX_CONFIG_PATH=/etc/nginx-rc before dealing with ghost cli really helped me. Thanks.