Community site: login faq

Have changed the config.js file and need to restart the ghost app. What's the best way to do this?

asked 25 Oct '13, 22:51

accept rate: 0%

I've got the same issue. It just 502's after running stop && start. EDIT: resolved by entering full URL in config file.

(25 Nov '13, 22:14) dsschnau

You can restart it using the stop and start commands in the ~/webapps/<appname>/bin/ directory from within an SSH session.

permanent link

answered 26 Oct '13, 00:21

accept rate: 27%

Please note that start breaks if forever.log is already present. I changed forever to forever -a and everything seems all right.

(26 Oct '13, 08:26) janesconference

Using stop and start commands in the /webapps/ghost/bin/ directory did not work, but using bin/stop and bin/start commands in the /webapps/ghost/ directory did.

(26 Oct '13, 10:53) Rickard

When I try this, I keep getting the following error ->

File "bin/stop", line 3 NODE_ENV=<mypath>/ghost/node_modules/forever/bin/forever stop index.js SyntaxError: invalid syntax

There's also a carat pointing to just after the "p" in "stop". Any help would be appreciated.

(26 Oct '13, 20:27) elobdell

@Rickard When executing a script, you need to give the path to the script file (for exceptions, research: Linux PATH environment variable) so, when you're in the same directory as the script, you need to run them like this: ./start

(29 Oct '13, 06:17) Crantok

I tried to restart Ghost, and now I get a 502 bad gateway.

I installed via admin

changed config to point to my domain name instead of my-ghost-install.com, and saved



Now I get 502 Bad Gateway. How do I fix this?

permanent link

answered 02 Nov '13, 21:03

accept rate: 0%

A 502 error indicates the server is off-line or not broadcasting HTTP on the specified port. Check the application's error logs or STDERR output for details for why it could not start.

(02 Nov '13, 21:23) johns

I had the same problem with getting "502: Bad Gateway" after restarting Ghost. It didn't have to do with controlling Ghost via the command line (which worked fine in SSH) or the new domain (which also redirected fine when Ghost was debugged). It was my mail server settings in config.js.

Thanks to the folks here at webfaction, by commenting out the mail settings, I was able to get my blog back up into production mode. You may want to try this if you're experiencing a lot of 502 errors and you get a "111: Connection refused" error in the error logs.

permanent link

answered 19 Nov '13, 11:51

the KO
accept rate: 0%

Same problem here, 502 Status Code. I realised thanks to the KO's comment that I had a typo on my config.js production url.

Thanks a bunch, dude.

(26 Dec '14, 14:34) fmquaglia

I just want to add a simplified version for idiots like me instructions are here for ssh connection https://docs.webfaction.com/user-guide/access.html Windows users:

download and run putty

your host will be something like: web310.webfaction.com (see for your webxxx: control panel > domaian/websites > domains)


enter user/pass

enter the following, modify for your installation

cd /home/[your username]/webapps/[your ghost]/bin/

[your username] will (probably) be the username you logged into putty with

[your ghost] will be the name you called your ghost installation webapp

press enter

to check if you have entered your details correctly

type dir [enter]

you should see this: node npm start stop

if you do then

type: ./stop or ./start

enter exit to finish

permanent link

answered 20 Sep '15, 14:38

accept rate: 0%

Guys this 502 is the same problems is happening to me.

I have not edited anything, beyond uncomenting the email settings, to try "the KO"'s advice.

The installation is pratically fresh and I installed via the officional webaction dashboard.

Is there any advice to fix ghost start? Dosen't make much sense to me to edit the config.js if its pratitically fresh.

permanent link

answered 29 Apr '15, 03:45

accept rate: 0%

@rafarc21, it shound like the email settings may be wrong. Try commenting them again and restarting if it works then it means that the email configuration you entered may contain something wrong.

If that's the case and you don't know how to fix it you can create a github gist or a pastebin with the configuration file (making sure you edit our the sensitive data e.g. tokens and secrets) and share it here and we can help you to troubleshoot.


(29 Apr '15, 12:14) fmquaglia

Hello guys, I posted it here: http://pastebin.com/DxDYgiNp

Tried without comments on email setting before, no success.

(29 Apr '15, 17:51) rafarc21

@rafarc21 Did you restart after changing the settings?

(29 Apr '15, 17:56) fmquaglia

@rafarc21 the config looks ok.

Try running curl 28699 to see what do you get there.

If that does not help try stopping with the bin/stop script, and then running node ghost/index.js and see what do you get.

(29 Apr '15, 18:11) fmquaglia

Its working now!! This is what made it:

[rafzdv@web472 rafa_blog]$ cd bin [rafzdv@web472 bin]$ ls node npm start stop [rafzdv@web472 bin]$ ./stop error: Forever cannot find process with id: /home/rafzdv/webapps/rafa_blog/ghost/index.js [rafzdv@web472 bin]$ curl curl: (7) couldn't connect to host [rafzdv@web472 bin]$ curl 28699 curl: (6) Couldn't resolve host '' curl: (7) Failed to connect to Invalid argument [rafzdv@web472 bin]$ ./stop error: Forever cannot find process with id: /home/rafzdv/webapps/rafa_blog/ghost/index.js [rafzdv@web472 bin]$ ./start warn: --minUptime not set. Defaulting to: 1000ms warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms info: Forever processing file: /home/rafzdv/webapps/rafa_blog/ghost/index.js

(29 Apr '15, 23:46) rafarc21

I have been trying to figure this out for days. This walkthrough is great but I can't access my files for some reason. If I login at my web server, web123.webfaction.com (arbitrary name), I get an Access Denied error when I put in my account name and password. I created another SSH user, and I was able to authenticate. But when I type "ls" to see the contents of the directory, it is empty. If I navigate to /webapps/...etc., it says there is no such directory. Someone from support has told me to type ./webapps/... because I'm logged in as another SSH user. This resulted in the same "No such file or directory" error that I keep getting. You would think this would be more straight-forward in the documentation. Unfortunately, every host is different so the Ghost docs aren't helping me. I need to start/stop Ghost because I have made changes to some CSS and some settings.

permanent link

answered 15 Jan '16, 14:08

accept rate: 0%

If you are logging in as a secondary user then you would not be able to restart your ghost instance.

(15 Jan '16, 14:19) aaront ♦♦

OK so my problem is that I can't login as my primary user. I can login to my webfaction account. If I use these same credentials in putty, it tells me access denied.

(15 Jan '16, 14:32) raneyron

I changed the password for my server here https://my.webfaction.com/password and now it's working

(15 Jan '16, 14:36) raneyron

Glad to hear that it is working. Only primary users have a webapps directory and can restart services unless you have granted the secondary user permission.

(15 Jan '16, 14:43) aaront ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Oct '13, 22:51

question was seen: 10,939 times

last updated: 15 Jan '16, 14:43