Cannot access ghost local server from other machine

I have installed ghost locally for theme development. Running ghost from http://localhost:2368 works fine. But I am not able to access the ghost server from another computer on the same network using the ip address of the current machine. Something like this - 192.168.1.2:2368 - It says ERR_CONNECTION_REFUSED

I installed simple http server and tried with that. I was able to access it from other computer using the ip address and port combination. Checked everything related to firewall and looks like its just Ghost that is not working.

Do I need to do anything special to make the development version of ghost accessible over local network?

  • What’s your URL? This is the easiest way for others to debug your issue
    localhost:2368
  • What version of Ghost are you using?
    3.22.1
  • What configuration?
    Windows 10
  • What browser?
    Chrome
  • What errors or information do you see in the console?
    ERR_CONNECTION_REFUSED
  • What steps could someone else take to reproduce the issue you’re having?

Edit the config.development.json & define your local machine IP instead of localhost or 172.0.0.1 see below

"url": "http://yourdomain.com or IP",
  "server": {
    "port": 2368,
    "host": "192.168.1.2"
  },
2 Likes

Thanks man. That works.

1 Like

You are welcome … :slight_smile:

Hi,

I am also trying to achieve the same thing but somehow it’s not working for me. I think I am getting confused about which IP to use and where.

suppose - server1 is the server hosting the ghost-cli and server2 is the host from where I want to access it using localhost.

“url”: “http://yourdomain.com or IP”, <----Which server’s IP i need to use here?
“server”: {
“port”: 2368,
“host”: “192.168.1.2” <-----Do I need to make changes here, in my case, it was 127.0.0.1
},

thanks

I’m not sure I’ve understood your question, but your configuration.development.json file should have the IP address if the computer running ghost (where you installed ghost) not the computer you’re running the web browser on.

Hi Cathy,
So in the “url” I need to provide the IP of the server running ghost.
But for the “host” value do I need to make any changes, in my case, it was 127.0.0.1 whereas in the first answer @inoryum mentioned 192.168.1.2.

thanks in advance

You need the computers non-127.0.0.1 address. You should be able to see it under network properties.