Port issue when restarting ghost on a digital ocean droplet

Hello,

I am self hosting my site using the Digital Ocean one-click droplet. The issue occurred when I updated the config.production.json to include my Mailgun SFTP settings. Running the follow…

ghost-mgr@mysite:/var/www/ghost$ ghost restart

Yields the following result:

 Ghost instance is not running! Starting...
 ✖ Starting Ghost
 A SystemError occurred.

 Message: The content folder is not owned by the current user.
 Ensure the content folder has correct permissions and try again.

 Debug Information:
     OS: Ubuntu, v22.04.4 LTS
     Node Version: v18.20.4
     Ghost Version: 5.101.4
     Ghost-CLI Version: 1.26.0
     Environment: production
     Command: 'ghost restart'

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

I then ran ghost doctor and was met with

ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
✖ Validating config
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
One or more errors occurred.

1) 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.


Debug Information:
    OS: Ubuntu, v22.04.4 LTS
    Node Version: v18.20.4
    Ghost Version: 5.101.4
    Ghost-CLI Version: 1.26.0
    Environment: production
    Command: 'ghost start'

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

Running a ghost ls shows me that the site is stopped but the site is still being served at my domain.

The issues seem like they may be seperate but I am unsure what to do to fix them.

Best,
Devin

The error msg indicates that the user ghost-mgr doesn’t have the file permission for ghost project files. You should check the file permission by running ls -l

To ensure the Ghost site is stopped, you can run ghost stop