Looking to update from very old v2, unable to start ghost, version missing

This is a very old DigitalOcean box from about 3-4 years ago. I did not keep up on it, no one’s fault but my own and I accept that. After spending a few hours researching similar threads and issues, I am at a loss. The site it was hosting WAS up and running earlier today but it no longer is. I was on an old Ubuntu version, which I updated first and it’s been downhill since.

I tried multiple versions of node because I kept getting node version errors when attempting to just do “ghost update v2” or “ghost update”. I’m just very confused at the moment and looking for any direction.

/var/www/ghost$ which ghost
/home/dan/.nvm/versions/node/v10.24.1/bin/ghost

/var/www/ghost$ whereis ghost
ghost: /usr/bin/ghost /usr/local/bin/ghost /home/dan/.nvm/versions/node/v10.24.1/bin/ghost

/var/www/ghost$ which node
/home/dan/.nvm/versions/node/v10.24.1/bin/node

/var/www/ghost$ whereis node
node: /usr/bin/node /usr/local/bin/node /home/dan/.nvm/versions/node/v10.24.1/bin/node /usr/share/man/man1/node.1.gz

/var/www/ghost$ ghost version
Ghost-CLI version: 1.9.9
Ghost version: 2.9.1 (at /var/www/ghost)

/var/www/ghost$ /home/dan/.nvm/versions/node/v10.24.1/bin/ghost version
Ghost-CLI version: 1.9.9
Ghost version: 2.9.1 (at /var/www/ghost)

/var/www/ghost$ /home/dan/.nvm/versions/node/v10.24.1/bin/ghost update
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run npm install -g ghost-cli@latest to upgrade.

  • sudo systemctl is-active ghost_mysite
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking for available migrations
    :heavy_multiplication_x: Checking for latest Ghost version
    A CliError occurred.

Message: You are about to migrate to Ghost 2.0. Your blog is not on the latest Ghost 1.0 version.
Help: Instead run “ghost update --v1”.

Debug Information:
OS: Ubuntu, v20.04
Node Version: v10.24.1
Ghost-CLI Version: 1.9.9
Environment: production
Command: ‘ghost update’

Additional log info available in: /home/dan/.ghost/logs/ghost-cli-debug-2023-08-30T21_28_14_938Z.log

Try running ghost doctor to check your system for known issues.

(NOTE: notice the missing “Ghost Version”… I’m not sure why this is not finding the 2.9.1 version that it previously said was installed)

/var/www/ghost$ /home/dan/.nvm/versions/node/v10.24.1/bin/ghost update --v1
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run npm install -g ghost-cli@latest to upgrade.

  • sudo systemctl is-active ghost_mysite
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking for available migrations
    :heavy_check_mark: Checking for latest Ghost version
    All up to date!

Then if I rerun ghost update v2, it says the same thing.

/var/www/ghost$ /home/dan/.nvm/versions/node/v10.24.1/bin/ghost doctor
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
System checks failed with message: ‘Linux version is not Ubuntu 16 or 18’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
System stack check skipped
:information_source: Checking operating system compatibility [skipped]
:heavy_check_mark: Checking for a MySQL installation

  • sudo systemctl is-active ghost_mysite
    Instance is currently running
    :information_source: Validating config [skipped]
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability

I believe, but I am not 100% sure, that I originally installed Ghost via npm years ago. Today, during my efforts to update, I ended up installing and uninstalling a VARIETY of versions from 8, 10, 12, 14, and 18 using nvm and npm with no success. It’s certainly possible the uninstalls/installs of node messed something up along the way.

Any help would be GREATLY appreciated. I believe this thread was very close to my issue, but he ended up reinstalling which I would really prefer not to do - Help updating ghost

This was a mistake. If you have a DO snapshot or backup, roll back to that, so you may export the content using the Ghost backend.

Ghost versions are compatible with specific versions of node, and to upgrade from an outdated version, you need to update Ghost to each terminal release before installing the next version using the correct versions of node*. Therefore, it would probably be easier to export the content and rebuild.

*I’m uncertain if you can do this with Ghost V2.

1 Like

Unfortunately no DO snapshot or backup. I can look into the manual backup of Ghost but I can already tell you I no longer have access to the /admin page as it’s down now.

The official update guide is here:

Extensive information about node version compatibility can be found here:

This explains what versions of Nod.jse and Ghost-CLI you need to be on for different versions of Ghost. Confusion around node versions often comes from the fact that Ghost & Ghost-CLI both have requirements, so you need to upgrade both in steps.

npm install -g ghost-cli@latest installs latest ghost-cli which will be too new for the intermediate steps, you’ll want npm install -g ghost-cli@[some version]

Also nvm doesn’t help much, because it’s hard to get globally installed Ghost CLI and locally installed Ghost to both see the right version of Node.js from nvm.

This is why the official guide recommends a reinstall past a certain point, because this gets very painful and fiddly… plus each time you change node version you also need to force Ghost to reinstall it’s dependencies using ghost upgrade [version] --force because some of them are binaries i.e. compiled for a specific node version.

Maybe this can help you unpick where you are at.

1 Like

I appreciate the suggestion. Unfortunately, this is why I was here to begin with. I thought I attempted as many things as I could think of when it came to the node versioning, but I may have fallen over myself with the uninstall and reinstall of the different versions. I managed to get my machine back to a familiar spot where I was unsure and hope someone could tell me where to go from here:

/var/www/ghost$ ghost upgrade v2 --force

Checking system Node.js version - found v14.21.1
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
:heavy_check_mark: Checking folder permissions
:heavy_check_mark: Checking file permissions
:heavy_check_mark: Checking content folder ownership
:heavy_check_mark: Checking memory availability
:heavy_check_mark: Checking free space
:heavy_check_mark: Checking for available migrations
:heavy_check_mark: Checking for latest Ghost version
:heavy_check_mark: Release notes were not found
:heavy_multiplication_x: Downloading and updating Ghost to v2.38.3
A SystemError occurred.

Message: Ghost v2.38.3 is not compatible with the current Node version. Your node version is 14.21.1, but Ghost v2.38.3 requires ^8.10.0 || ^10.13.0

Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v14.21.1
Ghost Version: 2.9.1
Ghost-CLI Version: 1.24.2
Environment: production
Command: ‘ghost upgrade v2 --force’

Try running ghost doctor to check your system for known issues.

/var/www/ghost$ which node
/home/dan/.nvm/versions/node/v14.21.1/bin/node
/var/www/ghost$ which ghost
/home/dan/.nvm/versions/node/v14.21.1/bin/ghost

So from this point, is this salvageable? I think my goal from here to get on node v10, and maybe my Ghost-CLI to 1.9.9 (per the other thread)?

You need to install an earlier version of Node.

This may work for you, but no guarantees.

curl -sL https://deb.nodesource.com/setup_10.x | sudo bash
sudo apt install nodejs --yes

This successfully got the 10.x version of node installed but my ghost is still pointing to 14.x

:heavy_multiplication_x: Downloading and updating Ghost to v2.38.3
A SystemError occurred.

Message: Ghost v2.38.3 is not compatible with the current Node version. Your node version is 14.21.1, but Ghost v2.38.3 requires ^8.10.0 || ^10.13.0

Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v14.21.1
Ghost Version: 2.9.1
Ghost-CLI Version: 1.24.2
Environment: production
Command: ‘ghost upgrade v2 --force’

/var/www/ghost$ whereis node
node: /usr/bin/node /usr/local/bin/node /usr/include/node /home/dan/.nvm/versions/node/v14.21.1/bin/node /usr/share/man/man1/node.1.gz

/var/www/ghost$ /usr/bin/node -v
v10.24.1

/var/www/ghost$ which ghost
/home/dan/.nvm/versions/node/v14.21.1/bin/ghost

You previously installed Node using nvm. Try this.

nvm uninstall 14.21.1

14.21.1 uninstalled. Ran ghost upgrade v2 --force again and it’s telling me it found node v18.12.1 now, which appears to be located in my /usr/local/bin

/var/www/ghost$ /usr/local/bin/node -v
v18.12.1

I don’t believe this was installed via nvm, as $nvm uninstall 18 fails… I’m seeing some stack overflows that suggest I can rm -rf /usr/local/bin/npm, /usr/local/bin/node, /usr/local/lib/node_modules/, /usr/local/include/node/, /usr/local/share/man/man1/node.1 – but not sure if this is my best bet now. Thoughts?

Try to establish the method of installation, so you can remove it safely, e.g., dpkg -s node.

Apologies for the significant delay.

I have managed to uninstall node 18. Ghost is recognizing node 10 as the installed version but I’m still stuck in a feedback loop of $ghost upgrade --v2 verus $ghost upgrade --v1

/var/www/ghost$ ghost upgrade --v2
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run npm install -g ghost-cli@latest to upgrade.

  • sudo systemctl is-active ghost_site
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking for available migrations
    :heavy_multiplication_x: Checking for latest Ghost version
    A CliError occurred.

Message: You are about to migrate to Ghost 2.0. Your blog is not on the latest Ghost 1.0 version.
Help: Instead run “ghost update --v1”.

Debug Information:
OS: Ubuntu, v20.04
Node Version: v10.24.1
Ghost-CLI Version: 1.9.8
Environment: production
Command: ‘ghost upgrade --v2’

then…

/var/www/ghost$ ghost update --v1
You are running an outdated version of Ghost-CLI.
It is recommended that you upgrade before continuing.
Run npm install -g ghost-cli@latest to upgrade.

  • sudo systemctl is-active ghost_site
    :heavy_check_mark: Checking system Node.js version
    :heavy_check_mark: Ensuring user is not logged in as ghost user
    :heavy_check_mark: Checking if logged in user is directory owner
    :heavy_check_mark: Checking current folder permissions
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability
    :heavy_check_mark: Checking for available migrations
    :heavy_check_mark: Checking for latest Ghost version
    All up to date!

and ghost doctor…

/var/www/ghost$ ghost doctor
:heavy_check_mark: Checking system Node.js version
:heavy_check_mark: Checking logged in user
:heavy_check_mark: Ensuring user is not logged in as ghost user
:heavy_check_mark: Checking if logged in user is directory owner
:heavy_check_mark: Checking current folder permissions
System checks failed with message: ‘Linux version is not Ubuntu 16 or 18’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
System stack check skipped
:information_source: Checking operating system compatibility [skipped]
:heavy_check_mark: Checking for a MySQL installation

  • sudo systemctl is-active ghost_site
    :heavy_check_mark: Validating config
    :heavy_check_mark: Checking folder permissions
    :heavy_check_mark: Checking file permissions
    :heavy_check_mark: Checking content folder ownership
    :heavy_check_mark: Checking memory availability

@Hannah Linked to the official docs on updating. They recommend a full reinstall for Ghost sites older than 3.0, and I agree with that guidance.

The direct link to the reinstall guide is here:

If this is the only thing running on the server, you want to start with a completely new server as well.