Changing URL causes admin login to not work

I am running into an odd issue. I deployed ghost with docker compose.

  newr7:
    image: ghost:alpine
    container_name: "newr7"
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    environment:
      url: https://newr7.andyc.info
      database__client: mysql
      database__connection__host: newr7_db
      database__connection__password: XXXXXXXXXXXXXXXXXXXXXXXX
      database__connection__user: root
      database__connection__database: ghost
      mail__from: donotreply@r7acrounited.com
    depends_on:
      - newr7_db
    volumes:
      - "/home/newr7/html/:/var/lib/ghost/content:rw"

When I changed the url to the new domain name the site works great. But the /ghost/ admin page doesn’t work. Here are the errors I am seeing in the browser.

[2026-03-19 03:04:56] ERROR "GET /ghost/api/admin/users/me/?include=roles" 403 6ms

Authorization failed

"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."

and



Error ID:

818d5b80-2340-11f1-a53e-ab2b0f47c02f

----------------------------------------

NoPermissionError: Authorization failed

 at authorizeAdminApi (/var/lib/ghost/versions/6.22.0/core/server/services/auth/authorize.js:33:25)

 at Layer.handle [as handle_request] (/var/lib/ghost/versions/6.22.0/node_modules/express/lib/router/layer.js:95:5)

 at next (/var/lib/ghost/versions/6.22.0/node_modules/express/lib/router/route.js:149:13)

 at authenticate (/var/lib/ghost/versions/6.22.0/core/server/services/auth/session/middleware.js:48:28)

Has anyone successfully change the URL without issue?

Looks like it was sessions and browser cache were causing the issue.