Can you move domain on DO without creating a new droplet?

Is it possible to move Ghost from one domain, i.e. to Or, do I need to create a new droplet. I thought I was doing something simple and I have crated a major problem for myself.

I thought I could buy the “woohoo” domain, change the DNS settings and change the config files from foo to Woo. These simple steps didn’t work and now I’m in Error 502 Bad Gateway territory.

  1. How do I move from foo to woohoo?
  2. Is it possible for me to access my site without a web address? Silly me, I should have exported the site before doing anything.

Thank you

Hi @sjmscott,

just to be clear.

You did change ghosts url from foo to woohoo like this and restarted ghost:

$ ghost config url
$ ghost restart

You did point woohoo DNS to your Droplet IP correctly.

Yes you can access your site directly via the Droplet IP.

@daniel1 thank you!

  • Yes I did change the config url and did the ghost restart.
  • I set up a redirect from woo to foo. It worked.
  • Yes I think I did the DNS to the Droplet IP correctly, but I all I saw was “website coming soon”
  • I panicked because the website was “down” and changed everything back to the original settings, but I think I’ve created a problem now with 502 Bad Gateways.

I would feel more comfortable with things if I could log into my site with the ip address and export the site. I would be happy to spin up another dropblem and import the site if that is easy.

I’m also thinking I might just pay for ghost hosting if they reply before I can figure this out. My site is down and I have people emailing me :scream:

Try ghost doctor in your terminal and see if something comes up.
Also check ghost log for any errors:

$ ghost doctor
$ ghost log

Check what port ghost listens to:

$ ghost ls

See if rebooting your droplet does anything:

$ reboot

Check if the port mentioned in ghost ls corresponds with the port mentioned in the nginx config file for your site, located at

If not:
change port number in config.production.json file in ghost root folder to the port correct port number under “server” → “port”: 2386 (example)

Thanks, @daniel1 I feel I’m in over my head. I did some of those things, i.e. reboot.

Debug Information:
OS: Ubuntu, v18.04.4 LTS
Node Version: v12.18.0
Ghost Version: 3.40.1
Ghost-CLI Version: 1.15.3
Environment: production
Command: 'ghost log'

I’m not sure how to diagnose this from Ghost Doctor

✔ Checking system Node.js version

✔ Checking logged in user

✔ Ensuring user is not logged in as ghost user

✖ Checking if logged in user is directory owner

✖ Checking current folder permissions

✔ Checking system compatibility

✔ Checking for a MySQL installation

My guess is still, that your port number got mixed up somehow.
Please navigate to /etc/nginx/sites-enabled/yourghostinstancename.conf
Open .conf file with sudo nano yourghostinstancename.conf and look for “proxy_pass”:
Screenshot from 2021-02-01 18-03-04
Note down Portnumber (eg. 2368)
Navigate back to your ghost root folder at /etc/var/www/ghost/
Type ghost ls to check if shown Port corresponds with the Port mentioned in the above mentioned nginx conf file. If yes, good. If not, follow these steps (still in ghost root directory).

sudo service nginx stop
sudo nano config.production.json

Change port to the above mentioned nginx port number.
Screenshot from 2021-02-01 18-01-05

sudo ghost restart
sudo service nginx start

@daniel1 Thanks for all of your help. I’d like to see if I can solve this:

Is it possible for me to access the site without the DNS resolving? I’d like to log in and export all of the contents. Then, import it into a ghost pro site.


Im afraid that’s not possible. If you cant reach ghost over the web, you cant export the json file.

Did you manage to find out, if the port is correct?

No, despite your directions, I’m having trouble figuring it out. Thanks for all of your help. I’ll keep trying.

Lesson learned: export the json file frequently and keep offline file of members. This is very stressful right now.

@daniel1 I couldn’t figure it out via the terminal, but I saw the port numbers didn’t match. I was able to change the ports vis SFTP and . . .

I’m back! @daniel1 you are my hero!


That’s awesome!
Glad you worked it out.