> ## Content Index
> Fetch the complete content index at: https://airabbit.blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Goodbye Ghost.org: How to Move Your Blog to Your Own Server
- URL: https://airabbit.blog/switching-from-ghost-org-how-to-move-your-blog-and-images-to-your-own-server/
- Published: 2024-11-22T16:21:34.000Z
- Updated: 2025-03-21T15:45:26.000Z
- Description: Migrating your blog from The Ghost Cloud to your own server can save you money and offer greater flexibility. This post outlines a step-by-step guide to set up your Ghost instance on DigitalOcean for just $5/month, import your data seamlessly, and manage your images. Embrace independence and enha...
- Author: AiRabbit
- Tags: Infrastructure, Tutorials, Content Creation, Development

# 

If you host your blog on **The Ghost Cloud**, you might think it's too expensive. For example, from 2024 you will only be able to access the **API** if you pay **$25 a month**, which comes to **$300 a year**. In my opinion, that is a lot of money. 

And if you don't need all the fancy plugins and some of the fancy themes they offer, you might think twice about whether it's worth paying that price every year. Instead, you could simply move your blog to another provider, or even better, **host it yourself.**

In this blog post, we're going to do just that. We'll migrate your Ghost instance from Ghost.org to your own instance for just **$5 per month**. This will save you tons of money and give you unlimited access to the **API**, all **themes** and **plugins**.

We'll walk you through the entire process step-by-step, including setting up a new **server**, exporting your **data**, configuring your **domain**, importing your **data**, and making sure your **images** are migrated properly. 

In the end, your blog will be up and running on your own server, giving you more control and flexibility.

Let's go.

## Step 1: Install Ghost on DigitalOcean

In DigitalOcean, you can simply use a ready-to-use appliance that has everything already configured. Here's how:

First, sign up for DigitalOcean if you haven't already. Then, go to the dashboard [here](https://cloud.digitalocean.com/droplets/new?ref=airabbit.blog) and create a new droplet.

![Create a New Droplet](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-10.png)

Select a droplet from the marketplace with Ghost as shown below.

![Select Ghost from Marketplace](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-1-4.png)

![Another Marketplace Selection](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-2-6.png)

Choose any plan you like. For a start, the basic plan suffices.

![Choose a Plan](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-3-4.png)

After a few minutes, your instance should be up and running. Note the **IP address** and the **SSH key** or password you selected during the creation.

![Instance Running](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-4-3.png)

## Step 2: Exporting Your Data

Now, go to your Ghost Cloud settings at [https://<your server>/ghost/#/settings](https://airabbit.ghost.io/ghost/?ref=airabbit.blog#/settings) and export your data.

![](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/image-108.png)

Assume you've saved the export as `export.json` (renaming it for simplicity). 

Next, copy this file to your DigitalOcean instance using the following command:

```bash
scp -i ~/.ssh/do ~/export.json root@143.xxxx:/tmp/export.json

```

## Step 3: Configure the Domain

A good blog probably needs a good domain. If you already have a domain, you can use it. Make sure you have access to the domain configuration to set up the DNS if necessary. 

If not, you can use any domain provider such as Namecheap (my favourite) or GoDaddy (too complicated in my opinion).

![Domain Configuration](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-6-2.png)

If you don't have a domain yet, you can test your blog with the IP of your DigitalOcean instance. Note, however, that changing it later is not easy.

## Step 4: Finish the Setup

With the export file and the domain at hand, we can now finish the setup and import the data. Log in to the instance using SSH:

```bash
ssh root@your_server_ip

```

Ghost will prompt you for two details related to your domain. If you don't have a domain, you can simply use the IP of the DigitalOcean instance as shown below.

```plain_text
1. Your domain
   2. Add an A Record -> xxx.xxx.xxx.xxx & ensure the DNS has fully propagated
   3. Or alternatively enter http://xxx.xxx.xxx.xxx
2. Your email address (only used for SSL)
Press enter when you're ready to get started!

```

Now you should be able to see the instance at [http://<your server>/ghost/](http://143.198.100.108/ghost/?ref=airabbit.blog). The posts are still empty or have only one dummy post. You can configure the themes and other settings anytime later.

![Ghost Instance](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-7-2.png)

## Step 5: Import the Data

Now, let's import the data we exported from Ghost.org. Select the `.json` file from the export (`export.json`).

![Import Data](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-8-2.png)

The import should finish, and you should already be able to see the posts.

```bash
http://<your domain or ip>

```

That's great, but if you have images saved in Ghost Cloud, you probably won't be able to see them yet.

![Missing Images](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-9-2.png)

The reason is that the export file i**ncludes only the links** to the image files saved on Ghost Cloud. I don't know why Ghost.org does that, although many people complain about it. I presume it's to increase the migration effort?

In any case, we need to solve it.

### The Simple Solution

The solution is to download the images and save them in the images folder under `/var/www/ghost/content/images`.

Assuming the export file is in `/tmp/export.json`, here's a one-liner that will do just that. Make sure to replace `airabbit.blog` with the URL of your website accordingly.

```bash
grep -oE 'https://airabbit.blog/content/images[^" ]+\.(png|jpe?g|gif|bmp|svg)' /tmp/export.json \
| sed 's|https://airabbit.blog|https://airabbit.blog|' \
| while read -r url; do \
    relative_path="${url#https://airabbit.blog/content/images/}" \
    mkdir -p "/var/www/ghost/content/images/$(dirname "$relative_path")" && \
    wget -nc "$url" -O "/var/www/ghost/content/images/$relative_path"; \
done | tee download.log

```

Done.

### Let's Test It

Now visit your instance. Here is my instance after importing all the images:

![Blog with Images](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-10-1.png)

Great, it looks much more interesting with the images now!

![Another View](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-11.png)

Finally, let's see if we can access the API. Here's a simple `curl` command that can fetch all your posts. Make sure to set the `key` and the `url`accordingly.

```bash
curl --location --request GET 'http://143.xxxx/ghost/api/content/posts/?key=xxxx&fields=title,url&limit=200' \
--header 'Accept-Version: v5.0'

```

And here is the result:

![API Response](https://storage.ghost.io/c/b6/58/b65880bb-2a06-491e-bb4d-a6abeb13a649/content/images/2024/11/DraggedImage-12.png)

## Wrap Up

In this blog post, we covered the nuts and bolts of migrating a blog from Ghost.org, complete with posts and images.  
First, we spun up an instance at DigitalOcean using an out-of-the-box appliance. We added the domain, imported the exported data and finally imported the images.  
That was the hard part of the migration and our blog was up and running.   
What remains is to migrate the **users** and set up an **email** provider.  
For more information, you can refer to the [Ghost documentation](https://ghost.org/docs?ref=airabbit.blog).

Happy blogging!