# Ghost setup Authorization failiure

**URL:** <https://forum.ghost.org/t/ghost-setup-authorization-failiure/14929>\
**Category:** Developer help\
**Created:** [June 6, 2020, 9:32pm UTC](https://forum.ghost.org/t/ghost-setup-authorization-failiure/14929 "2020-06-06T21:32:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreborud](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andreborud/32/1237_2.png) [@andreborud](https://forum.ghost.org/u/andreborud)\
**Post date:** [June 6, 2020, 9:32pm UTC](https://forum.ghost.org/t/ghost-setup-authorization-failiure/14929/1 "2020-06-06T21:32:10Z")

</div>

I’m trying to run Ghost with a docker image. Everything seems to be working until I run the setup, then I get the following error: **Authorization failed Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.**

And the log says the following:  
2020-06-06T21:18:55.665780000Z [2020-06-06 21:18:55] INFO Ghost is running in production…  
2020-06-06T21:18:55.667902000Z [2020-06-06 21:18:55] INFO Your site is now available on [https://pi-exports.com/](https://pi-exports.com/)  
2020-06-06T21:18:55.679869000Z [2020-06-06 21:18:55] INFO Ctrl+C to shut down  
2020-06-06T21:18:55.682375000Z [2020-06-06 21:18:55] INFO Ghost boot 2.683s  
2020-06-06T21:19:17.872642000Z [2020-06-06 21:19:17] INFO “GET /ghost/” 200 102ms  
2020-06-06T21:19:17.874216000Z (node:1) [DEP0066] DeprecationWarning: OutgoingMessage.prototype.\_headers is deprecated  
2020-06-06T21:19:18.368059000Z [2020-06-06 21:19:18] INFO “GET /ghost/assets/img/favicon.ico” 200 1ms  
2020-06-06T21:19:18.460012000Z [2020-06-06 21:19:18] ERROR “GET /ghost/api/v3/admin/users/me/?include=roles” 403 10ms  
2020-06-06T21:19:18.460212000Z  
2020-06-06T21:19:18.460342000Z Authorization failed  
2020-06-06T21:19:18.460499000Z “Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.”  
2020-06-06T21:19:18.460687000Z Error ID:  
2020-06-06T21:19:18.460772000Z 61bd1560-a83b-11ea-9103-910f814fb93b  
2020-06-06T21:19:18.460912000Z ----------------------------------------  
2020-06-06T21:19:18.461114000Z NoPermissionError: Authorization failed  
2020-06-06T21:19:18.461195000Z at new NoPermissionError (/var/lib/ghost/versions/3.18.1/node\_modules/ghost-ignition/lib/errors/index.js:134:23)  
2020-06-06T21:19:18.461266000Z at authorizeAdminApi (/var/lib/ghost/versions/3.18.1/core/server/services/auth/authorize.js:28:25)  
2020-06-06T21:19:18.461349000Z at Layer.handle [as handle\_request] (/var/lib/ghost/versions/3.18.1/node\_modules/express/lib/router/layer.js:95:5)  
2020-06-06T21:19:18.461419000Z at next (/var/lib/ghost/versions/3.18.1/node\_modules/express/lib/router/route.js:137:13)  
2020-06-06T21:19:18.461485000Z at authenticate (/var/lib/ghost/versions/3.18.1/core/server/services/auth/session/middleware.js:24:13)  
2020-06-06T21:19:18.461549000Z at processTicksAndRejections (internal/process/task\_queues.js:97:5)

I remember running in to this issue before, installing ghost using ghost-cli, and I think it was local file permission problem. Does anyone have any idea what it could be?

Using latest ghost version with docker on Fedora Core OS.

---

<div class="post-metadata">

**Author:** ![andreborud](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/andreborud/32/1237_2.png) [@andreborud](https://forum.ghost.org/u/andreborud)\
**Post date:** [June 7, 2020, 9:05am UTC](https://forum.ghost.org/t/ghost-setup-authorization-failiure/14929/2 "2020-06-07T09:05:45Z")

</div>

It was an NGINX issue in the end. I had to add the following to the .conf file:

```
location ^~ /ghost/ {
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://127.0.0.1:2368;
}

```

inside server {}.
