Cannot get external access to local macOS install

Installation on my Mac and use of Ghost is working fine. But I cannot get access to it externally…
I have a DDNS setup and port-forwarding on my router (both DNS and port-forwarding on my router are work as I have tested with other applications running on anther machine on my network, so have rules those out as the issue.)
My Mac has the firewall turned off - so all incoming traffic allowed. Yet I still cannot seem to get a connection. If my very basic understanding of port-forwarding is right, then for a port-check to work (i.e. canyouseeme.org) there has to be something listening on the port, right? Well, ghost is running on 2368, but I can’t access it for externally or any other machine on my network.
So is it not listening? Is there a switch I need to flip somewhere?

  • What version of Ghost are you using? 2.18.2
  • What configuration? local on macOS Mojave v10.14.3
  • What browser? brave/chrome (current stable)

First of all, websites run on port 80 by default. You have to run a port listener on your machine to make the port check work, make sure all required ports are open, that your install has correct file system permissions, and that your Firewall is correctly set up.

Hosting a Ghost install on your local machine also isn’t recommended by any means. I recommend renting a VPS on either DigitalOcean (1GB for $5/mo, very easy setup) or Hetzner (2GB for €2.50/mo, best value). This saves you a lot of work and ensures the best availability and uptime for your blog.

Hello again, Marvin!
Thanks for the suggestions. I am looking to stick with local install though. I am using the JAMstack setup, so no need to pay for, or use, any hosting - all just static HTML - so my ghost blog backend (on my mac) only needs to be running when I want to post or edit. Once netlify rebuilds and pushed to my custom domain, I can turn off the laptop. Plus, I am interested in the tinkering side of hosting it myself a little :slight_smile:

You lost me in the first paragraph. I thought ghost runs on port 2368 by default?
When I previously had it running on my home server in a docker environment, my DDNS and port-forwarding to 2368.

On my mac, I just used the guide on ghostforbeginners. My mac only has one user setup, so I assume all permissions defaulted to that.

And the firewall is off - so all tracking is unrestricted.

I know there is internal port forwarding going on when you host Ghost in a Linux install on a VPS. Nginx uses a reverse proxy to serve the Ghost website on port 2368 to the default port 80. Have you tried accessing your website by attaching :2368 to your IP/Domain?

Maybe your Nginx config is misconfigured. If youre using Apache instead of Nginx, I guess I can’t help you with that.

It could also be that your ISP blocks the port. A lot of ISP block the port 80 to avoid local web content being served.

That might be the issue. Nothing is serving the site. From the terminal log when I installed, doesn’t look like any server software was installed. I take it nothing is packaged with the ghost-cli? I’ve no idea how to get nginx configured/installed myself - any good resources or guides you know of?

mac:~ ks$ sudo npm install -g ghost-cli@latest
Password:
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer 
requires a build toolchain, use it instead
/usr/local/bin/ghost -> /usr/local/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.9.9
added 355 packages from 189 contributors in 20.122s
mac:~ ks$ cd /Users/ks/Documents/ghostblog
mac:ghostblog ks$ ghost install local
✔ Checking system Node.js version
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking for latest Ghost version 
✔ Setting up install directory
✔ Downloading and installing Ghost v2.18.2
✔ Finishing install process
✔ Configuring Ghost 
✔ Setting up instance
✔ Checking current folder permissions
✔ Validating config
✔ Checking memory availability
✔ Starting Ghost

Nginx is a software for web servers. I think Ghost can run locally without Nginx, but to serve the content you would need to use a server software. I only set up Nginx on Linux, but I think you can install it onto macOS with brew.

I found this guide for installing Nginx with brew

However, I have no clue how to properly configure it on mac and no clue on how to get Nginx running properly. I’d still recommend getting a VPS or alternatively running Ghost in a Linux VM. You could also run it on a Raspberry Pi :slight_smile:

Yeah, raspberryPi was always my preference, but I could never seem to getting it working with the newest version. I don’t know if things have changes since then, but from memory there was no officially supported way to get the most recent version of ghost running normally on a PI without a lot of hackery!

Just use Ubuntu 18.04 on the Raspi.

  1. Install Ubuntu Server 18.04
  2. Do the initial server setup
  3. Install Node and Nginx
  4. Use this guide to install Ghost.

I don’t know how well Ubuntu runs on the Raspberry Pi, though.

Cheers - will give it a go tomorrow and report back.

Good luck with that :slight_smile:

@KeyserSoze by default express apps will only listen to localhost, you’ll want to change your Ghost config to have "host": "0.0.0.0" if you want it to accept connections on external interfaces.

1 Like

And just like that, we’re cooking! Thanks @Kevin !.
And thanks @marvin for your time and effort. I learnt a few new things about servers, which I am sure will be handy down the road.
Cheers both.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.