Local install cant signin

I installed Ghost locally on Ubuntu 22.04 using this guide:

Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v18.18.2
Ghost Version: 5.70.2
Ghost-CLI Version: 1.25.3
Environment: production
Command: ‘ghost install’

Enter your blog URL: www.mywebsite.com
? Enter your MySQL hostname: localhost
? Enter your MySQL username: sqluser
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: sqldb

App runs OK on brave browser at:

When I try to signin at :

I get this console error:

Access to fetch at ‘…/members/api/member/’ from origin ‘localhost:2368’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

(I took out the http: as new posters cant post more than 3 links)

Running grep -r “access-control-allow-origin” . from /var/www/mywebsite/ I can see this parameter is set in ./content/logs/http___mywebsite_com_production.log as well as numerous node_modules. How can I diable this parameter in local development and keep it in production when deployed to a live server?

Looks like you are mixing the “production” and “local” install concepts.

The page you linked to says:

This install is not suitable for local use or contributing to core.

The steps for installing Ghost locally are here:

1 Like