How access config.production.json?

Hello, community
I try to access config.production.json file (want to add parameters of Mailgun) and get an error that “there is no such directory”
What i did and what i have to do:

  • installed ghost blog
  • digital ocean droplet
  • i open root console
  • do everything like here Config.production.json
  • but after cd /var/www/ghost i got message “No such files in directory”.
  1. What i’m doing wrong?
  2. Maybe it’s connected with my root-user? I should switch to any other role?

Could you please type ‘ghost ls’ from the command line (as the ghost user)? Hopefully that’ll help you figure out where Ghost is actually installed. :)

What i see in console:

user@ghostonubuntu2204-s-1vcpu-2gb-ams3-01:~$ ghost ls
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.

No installed ghost instances found

And it look strange as my site is already working

I also tried another command, but it also doesn’t allow to switch directory and get config file

user@ghostonubuntu2204-s-1vcpu-2gb-ams3-01:~$ which ghost
/usr/bin/ghost
user@ghostonubuntu2204-s-1vcpu-2gb-ams3-01:~$ cd usr/bin/
-bash: cd: usr/bin/: No such file or directory

You appear to be running these commands as the user named ‘user’. Is that actually the user you used when setting up Ghost?

Cathy, i did setup at Digital Ocean droplet regarding this manual:

Thus, setup was made under root user. But console ask me to change user to any other.

Oh, i’ve found the problem. You were right about another user. I forgot about “ghost-mgr” user that was created right after first steps of the “root” user.

I’ve opened cd /var/www/ghost, but can’t understand (sorry for one more newbie question) how open config file right from directory. I opened it, but with another command “sudo nano /var/www/ghost/config.production.json”.

Just interesting how to make it inside directory) And thank you so much for your support.

1 Like

Nano is a simple text editor, so you should be able to edit your config file that way.

Did you find the location of the file? You can change to the ghost-mgr user using su - ghost-mgr and then ghost ls should give you the directory of the ghost install. Then you can cd <path-to-directory> and edit the file with nano.

But please allow me the last question - how can i launch Nano and launch certain file insde directory?

I’m sorry, I don’t understand your question. Can you explain what you’re trying to do a bit more?

Just wonder what is the Linux command to open json file in editor when i’m already inside directory

sudo nano thenameofyourfile.json

1 Like

Thanks a lot, it helped!!!