Updating Ghost: Unable to load systemd file, Port '2368' is in use

Hi everyone,

I’m at my wit’s end, but I’m not at all experienced and I’m attempting a Ghost update for the very first time and so far it’s not going well.

My hosting provider installed Ghost for me in a docker container but refuses to do the update like have done in the past because Ghost is not among the software they typically support. So I’m on my own.

It was installed as the root user and I had to create a new account and give ownership and rights to the new user. I have done this but I still get some error messages about lacking permissions and the ownership of my node_modules folder keeps reverting back to a different user every time I log in.

This is the docker container’s setup:

OS: Debian GNU/Linux, v11
Node Version: v22.22.2
Ghost Version: 5.38.0
Ghost-CLI Version: 1.29.2
Environment: production
Command: 'ghost backup'

These are the error messages I’m getting when I attempt “ghost run”:

[2026-06-14 03:23:00] ERROR (EADDRINUSE) Cannot start Ghost.

(EADDRINUSE) Cannot start Ghost.

"Port 2368 is already in use by another program."
"Is another Ghost instance already running?"

Error ID:
58a6c9f0-67a0-11f1-9c64-7dd94b4200e3




InternalServerError: (EADDRINUSE) Cannot start Ghost.
at Server. (/var/lib/ghost/versions/5.38.0/core/server/ghost-server.js:89:34)
at Server.emit (node:events:519:28)
at emitErrorNT (node:net:1976:8)
at process.processTicksAndRejections (node:internal/process/task_queues:89:21)

[2026-06-14 03:23:00] WARN Ghost is shutting down
[2026-06-14 03:23:00] WARN Ghost has shut down
[2026-06-14 03:23:00] WARN Your site is now offline
[2026-06-14 03:23:00] WARN Ghost was running for a few seconds
Process manager 'systemd' will not run on this system, defaulting to 'local'

Ghost doctor” returns this:

Process manager 'systemd' will not run on this system, defaulting to 'local'
✔ Checking system Node.js version - found v22.22.2
✔ 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
System checks failed with message: 'Linux version is not Ubuntu 16, 18, 20, 22, or 24'
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
ℹ Checking system compatibility [skipped]
✖ Validating config
✖ Checking folder permissions
✖ Checking file permissions
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✖ Checking systemd unit file
✖ Checking systemd node version
One or more errors occurred.

Validating config

Error detected in the production configuration.

Message: Port '2368' is in use.
Configuration Key(s): server.port
Current Value(s): 2368

Help: Run ghost config <key> <new value> for each key to fix the issue.

Checking folder permissions

Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} ; and try again.

Checking file permissions

Message: Ghost can't access some files or directories to check for correct permissions.
Help: Run sudo find ./ -type d -exec chmod 00775 {} ; and try again.

SystemError

Message: Unable to load or parse systemd unit file

SystemError

Message: Unable to determine node version in use by systemd
Help: Ensure 'ExecStart' exists in /lib/systemd/system/ghost_undefined.service and uses a valid Node version

Debug Information:
OS: Debian GNU/Linux, v11
Node Version: v22.22.2
Ghost Version: 5.38.0
Ghost-CLI Version: 1.29.2
Environment: production
Command: 'ghost doctor'

The systemd file ghost.service didn’t seem to be there, but attempts to set it up with ghost setup systemd returned this, even though Ghost-CLI is the latest version according to the debug information above:

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.

The "ghost" user has not been created, try running ghost setup linux-user first
ℹ Setting up Systemd [skipped]

I just don’t know what to do or even where I’m going wrong. I’d create a fresh install but that seems equally daunting for someone who has never done it before.

I don’t know if it was my tinkering or an upgrade to Hestia control panel done by my hosting provider, but right now my website looks like this :persevering_face: [EDIT: removed for security]

Any help is deeply appreciated!

Sorry to be that guy, but…you need to change your hosting.

What you have here is a liability. I know, you’re trying to upgrade − which is great. But it sounds you’re in over your head. Your host isn’t helping. Look for a dedicated managed Ghost hosting provider if you don’t want to have the management overhead (disclaimer, I run one myself, but I’d give you that advice independent of that).

The version you are running is massively outdated, and there are active security issues with that version. @moderators any chance you remove the link to OPs website?


If you have Docker set up as a container, I would expect that you just update the Docker image? Trying to update from within the container itself seems like the wrong method here. A simple container restart would most likely wipe any update efforts.

How was the Docker container set up? Docker Compose? docker run? Any info you can share here?

Thank you for your quick reply!

I don’t know how the docker was set up because the hosting provider did this. They told me “We simply used what was in the official Ghost documentation at that time and deployed that container.”

I can’t easily switch because the website has some adult content. It’s not porn but I’ve had issues with hosting providers before so I chose one that allows it but it comes with other caveats like this one. As I said, they used to do the updates for me until suddenly they didn’t any more because Ghost is not officially supported.

How do I update the docker image? I think it is docker run, as it doesn’t recognise docker compose as a command?

I’ll second that, as someone who doesn’t run a hosting company! I do self-host my own stuff, but I don’t recommend it as a cost-saving strategy because one problem like this will wipe out any savings. And the fact is, you haven’t been updated in two years, and you are susceptible to at least one vulnerability that’ll allow someone to export all your member’s data, wipe or replace your content, and generally destroy whatever you’ve got there.

If the price of Ghost Pro is not in reach, look at Magic Pages or Synaps. Both less expensive (unless you send a LOT of email), and both run by great members of the Ghost community. Or heck, even Pikapods will update Ghost for you regularly.

(Updated: Our messages crossed. I don’t know whether any of my recommendations above will host adult non-porn content, but it may be worth asking.)

But… v5.38.0 is not “suddenly”. As Cathy pointed out, that hasn’t been updated in 2 years.

Feel free to send me details of what adult content you host. There is no ban on adult content on Magic Pages (the one I am running), it’s always a case-by-case decision based on how the legislation (specifically youth protection laws) in Germany (server location) and Austria (company location).

Usually by docker image pull ...: docker image pull | Docker Docs

But then again, you’d need to restart the docker container itself after you’ve pulled and without knowing how the site was set up, that’s gonna be painful.

There’s also docker ps and docker inspect, but quite frankly, you’d need to understand Docker to know get useful information from that.