Localhost instead of real URL

I have a problem - common one as I guess - with my Ghost installation. It is about a URL. During the instalation I set it to https://dev.claimrank.pl. But, I can see http://localhost:2368 instead of the URL in some places, i.e.

  • ‘under’ the Ghost Logo
  • in the admin panel - ‘under’ open site in a new tab
  • in the admin panel - metas settings / Search engine result preview

I followed instructions + some forum hints. I used ghost config url to set the URL. Actually it is correct there in the config file. But http://localhost:2368 is still present in the mentioned places.

I have even reinstalled Ghost.
What more should I do to get rid of localhost? :frowning:

  • What’s your URL? This is the easiest way for others to debug your issue

  • What version of Ghost are you using?

  • What configuration?

  • What browser?

  • What errors or information do you see in the console?

There are a couple things you can do to check:

  1. Make sure you restart Ghost - If you change the configuration, the changes won’t take place until you restart
  2. Make sure you’re running in the same environment - Ghost uses different configuration files for production and development

Thanks for your answers.

I restarted Ghost after each config change. As for config files: I did not change anything at all after installation :slight_smile: There is only one file inside the root folder and it is config.production.json.

Moreover, I realized that localhost is present also in robots.txt file:
User-agent: *
Sitemap: http://localhost:2368/sitemap.xml
Disallow: /ghost/
Disallow: /p/

There is also some systemd info defaulting to 'local' when starting/restarting Ghost in the console:

I have checked config.production.json. It looks like that:
“url”: “https://dev.claimrank.pl”,
“server”: {
“port”: 6421,
“host”: “”
“database”: {
“client”: “mysql”,
“connection”: {
“host”: “",
“user”: "
“password”: “",
“database”: "

“mail”: {
“transport”: “Direct”
“logging”: {
“transports”: [
“process”: “systemd”,
“paths”: {
“contentPath”: “/usr/home/urasone/domains/dev.claimrank.pl/content”

Is it ok?

Everything seems okay… However, it seems that your system doesn’t support the systemd process manager, which could be a problem - it’s in charge of restarting Ghost if it ever crashes.

The url that Ghost gets from the config file is used everywhere, so it’s not surprising you’re seeing localhost in multiple places.

Can you run ghost stop and then ghost run (when you’re done, press ctrl+c to get out) and see what the url is?

I have installed Ghost one more time. I changed env type of the server for node.js (from dev to prod). And it works fine now. Then installed Ghost with dev server config and it has localhosts. Kinda strange, is not it? :stuck_out_tongue:

Could it be about the server configuration?

I think that’s why… you don’t have a development configuration, so it’s using the default configuration