IP adress instead of domain name in Ghost

February 7, 2018 3k views
Ghost Ubuntu 16.04

Hello! I have a little problem with my installation of Ghost. I installed it and set target from my domain to it. I also setted it up to be only available at the domain I chose. Everything is working, but all links at the blog leads not to the domain, but to the IP of my Droplet.

Do I need to change anything in a config? And where do I need to change it?

Lukáš Pánek

2 Answers

For Ghost to properly generate links with the domain name of your blog, you need to edit a setting in its configuration file. The file’s name is config.production.json If you are using the DigitalOcean Ghost One-Click application, it is located at /var/www/ghost/config.production.json

Find the section of the file containing the IP address:

  "url": "",

and edit it to contain your domain name:

"url": "http://example.com",

You can also do this using the Ghost CLI tool from inside the Ghost directory:

  • cd /var/www/ghost/
  • ghost config url http://example.com

Finally, you will need to restart Ghost for the change to take effect:

  • ghost restart
  • After doing this I still have the same issue. All new link will generate with the IP address instead of the domain name.

    • You may have to clear your browser’s cache. In the Design section when creating a new tag, the IP URL still lingers. This ended up resolving itself over time.

Hello, it says permission denied when I tried running this:

  • You supposed to log in as ghost-mgr. Simply type this in Ghost CLI.
    sudo -i -u ghost-mgr

    It’s displayed in the welcome screen while logging to CLI, but you used already it happens to display last used commands instead of this welcome screen. It took me a while to get it ;)

Have another answer? Share your knowledge.