I’ve used the 1-click setup for a Ghost blog and I’m now trying to configure mail setup as explained here: https://docs.ghost.org/concepts/config/#mail
I’m using Windows 8 and wondering what is the easiest way to edit the config.production.json file.
Can I do it locally using a code editor like Visual Studio Code or Sublime Text or do I need to do it via the command line using PuTTY or something?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I use ssh and vim to edit the text. I also edit my project locally using git and pull updates to my server.
There’s a few ways to edit a configuration file such as this one, on a Droplet.
Many of the tutorials in our community refer to using either the nano or vi editor directly on the command line in the terminal on the Droplet, including this one: https://www.digitalocean.com/community/tutorials/how-to-configure-and-maintain-ghost-from-the-command-line#how-to-configure-email-for-ghost
Another simple way is to use your preferred local editor, and simply copy and paste the text to be changed into your local editor, make your changes, and copy / paste those back in via the nano editor in the ssh shell session on the Droplet. Quick and useful if the edits are likely to be infrequent or one-time.
You can also copy a file you’ve edited and saved locally to your Droplet using scp (you’ll need a copy of the file saved locally first of course). This is something you do from the command line on your local computer. This answer explains how: https://www.digitalocean.com/community/questions/how-to-copy-files-from-one-server-to-another-droplet?answer=18752
I use SFTP (SSH File Transfer Protocol) in the FileZilla FTP Client, using:
For the User: root
For the Host: the ip address of the droplet (i.e. 111.222.333.444)