🐛 Bug Report: Unable to access /login/setup #496

Closed
opened 2025-10-08 00:11:17 +03:00 by OVERLORD · 13 comments
Owner

Originally created by @Heavensong89 on GitHub.

Reproduction steps

Installed from Unraid, I'm using SWAG (Nginx) Reverse Proxy, so I have setup https://id.example.com to reverse proxy to http://pocketid:3000, however the logs show Failed to get application configuration: connect ECONNREFUSED 192.168.7.127:443 Variable is updated appropriately, see Unraid's run command below:

docker run
  -d
  --name='pocketid'
  --net='proxy'
  --pids-limit 2048
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="farrosphere"
  -e HOST_CONTAINERNAME="pocketid"
  -e 'PUBLIC_APP_URL'='https://id.example.com'
  -e 'DB_PATH'='data/pocket-id.db'
  -e 'UPLOAD_PATH'='data/uploads'
  -e 'PORT'='3000'
  -e 'BACKEND_PORT'='8080'
  -e 'PUID'='099'
  -e 'PGID'='100'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:3000]/'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/nwithan8/unraid_templates/master/images/pocket-id-icon.png'
  -v '/mnt/user/appdata/pocket-id/data':'/app/backend/data':'rw'
'stonith404/pocket-id:latest'

Expected behavior

Allow me to create first user/login.

Actual Behavior

image

Originally created by @Heavensong89 on GitHub. ### Reproduction steps Installed from Unraid, I'm using SWAG (Nginx) Reverse Proxy, so I have setup https://id.example.com to reverse proxy to http://pocketid:3000, however the logs show `Failed to get application configuration: connect ECONNREFUSED 192.168.7.127:443` Variable is updated appropriately, see Unraid's run command below: ``` docker run -d --name='pocketid' --net='proxy' --pids-limit 2048 -e TZ="Europe/London" -e HOST_OS="Unraid" -e HOST_HOSTNAME="farrosphere" -e HOST_CONTAINERNAME="pocketid" -e 'PUBLIC_APP_URL'='https://id.example.com' -e 'DB_PATH'='data/pocket-id.db' -e 'UPLOAD_PATH'='data/uploads' -e 'PORT'='3000' -e 'BACKEND_PORT'='8080' -e 'PUID'='099' -e 'PGID'='100' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:3000]/' -l net.unraid.docker.icon='https://raw.githubusercontent.com/nwithan8/unraid_templates/master/images/pocket-id-icon.png' -v '/mnt/user/appdata/pocket-id/data':'/app/backend/data':'rw' 'stonith404/pocket-id:latest' ``` ### Expected behavior Allow me to create first user/login. ### Actual Behavior ![image](https://github.com/user-attachments/assets/28e16eae-8e62-4895-a26d-a299d2d49842)
OVERLORD added the bug label 2025-10-08 00:11:17 +03:00
Author
Owner

@ducati1198 commented on GitHub:

Same problem here. docker exec pocket-id env | grep PUBLIC_APP_URL Is give my the good url. Swag is pointing to 192.168.xx.xx:3000 and same on Cloudflare tunnel mod

@ducati1198 commented on GitHub: Same problem here. docker exec pocket-id env | grep PUBLIC_APP_URL Is give my the good url. Swag is pointing to 192.168.xx.xx:3000 and same on Cloudflare tunnel mod
Author
Owner

@stonith404 commented on GitHub:

Okay thanks, does your domain (id.example.com) point to the local IP 192.168.7.127?

@stonith404 commented on GitHub: Okay thanks, does your domain (id.example.com) point to the local IP 192.168.7.127?
Author
Owner

@stonith404 commented on GitHub:

Are you sure that the PUBLIC_APP_URL is really set to https://id.example.com? You can verify it with

docker exec pocket-id env | grep PUBLIC_APP_URL
@stonith404 commented on GitHub: Are you sure that the `PUBLIC_APP_URL` is really set to `https://id.example.com`? You can verify it with ``` docker exec pocket-id env | grep PUBLIC_APP_URL ```
Author
Owner

@stonith404 commented on GitHub:

Yeah the issue probably occurs because 192.168.xx.xx isn't accessible inside the docker container. I've created a potential fix. Would you mind to test the stonith404/pocket-id:development image?

@stonith404 commented on GitHub: Yeah the issue probably occurs because `192.168.xx.xx` isn't accessible inside the docker container. I've created a potential fix. Would you mind to test the `stonith404/pocket-id:development` image?
Author
Owner

@Heavensong89 commented on GitHub:

Are you sure that the PUBLIC_APP_URL is really set to https://id.example.com? You can verify it with

docker exec pocket-id env | grep PUBLIC_APP_URL

Yes. It’s set in Unraid Docker UI’s variables, and that command returns the URL that i set it as.

@Heavensong89 commented on GitHub: > Are you sure that the `PUBLIC_APP_URL` is really set to `https://id.example.com`? You can verify it with > > ``` > docker exec pocket-id env | grep PUBLIC_APP_URL > ``` Yes. It’s set in Unraid Docker UI’s variables, and that command returns the URL that i set it as.
Author
Owner

@stonith404 commented on GitHub:

Could you share the container logs?

@stonith404 commented on GitHub: Could you share the container logs?
Author
Owner

@Heavensong89 commented on GitHub:

Could you share the container logs?

Listening on 0.0.0.0:3000
[GIN] 2024/08/17 - 08:56:48 | 401 |       26.16µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:48 | 401 |       42.02µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:48 | 200 |     206.016µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:48 | 200 |     223.204µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:48 | 401 |      16.753µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:48 | 401 |      35.199µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:48 | 200 |     188.891µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:48 | 200 |     250.385µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:48 | 401 |      12.246µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:48 | 401 |      23.134µs |             ::1 | GET      "/api/users/me"
SvelteKitError: Not found: /api/application-configuration/logo
    at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18)
    at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) {
  status: 404,
  text: 'Not Found'
}
[GIN] 2024/08/17 - 08:56:48 | 200 |     129.898µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:48 | 200 |     138.049µs |             ::1 | GET      "/api/application-configuration"
SvelteKitError: Not found: /api/application-configuration/background-image
    at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18)
    at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) {
  status: 404,
  text: 'Not Found'
}
[GIN] 2024/08/17 - 08:56:50 | 401 |      20.973µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:50 | 401 |      56.818µs |             ::1 | GET      "/api/users/me"
[GIN] 2024/08/17 - 08:56:50 | 200 |     190.647µs |             ::1 | GET      "/api/application-configuration"
[GIN] 2024/08/17 - 08:56:50 | 200 |     211.641µs |             ::1 | GET      "/api/application-configuration"
SvelteKitError: Not found: /api/one-time-access-token/setup
    at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18)
    at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34)
    at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26)
    at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) {
  status: 404,
  text: 'Not Found'
}
@Heavensong89 commented on GitHub: > Could you share the container logs? ``` Listening on 0.0.0.0:3000 [GIN] 2024/08/17 - 08:56:48 | 401 | 26.16µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:48 | 401 | 42.02µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:48 | 200 | 206.016µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:48 | 200 | 223.204µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:48 | 401 | 16.753µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:48 | 401 | 35.199µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:48 | 200 | 188.891µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:48 | 200 | 250.385µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:48 | 401 | 12.246µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:48 | 401 | 23.134µs | ::1 | GET "/api/users/me" SvelteKitError: Not found: /api/application-configuration/logo at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18) at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) { status: 404, text: 'Not Found' } [GIN] 2024/08/17 - 08:56:48 | 200 | 129.898µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:48 | 200 | 138.049µs | ::1 | GET "/api/application-configuration" SvelteKitError: Not found: /api/application-configuration/background-image at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18) at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) { status: 404, text: 'Not Found' } [GIN] 2024/08/17 - 08:56:50 | 401 | 20.973µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:50 | 401 | 56.818µs | ::1 | GET "/api/users/me" [GIN] 2024/08/17 - 08:56:50 | 200 | 190.647µs | ::1 | GET "/api/application-configuration" [GIN] 2024/08/17 - 08:56:50 | 200 | 211.641µs | ::1 | GET "/api/application-configuration" SvelteKitError: Not found: /api/one-time-access-token/setup at resolve2 (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5273:18) at resolve (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5106:34) at Object.handle (file:///app/frontend/build/server/chunks/hooks.server-BZMsLR3h.js:41:26) at respond (file:///app/frontend/build/server/chunks/index-CjGFhKNr.js:5104:43) { status: 404, text: 'Not Found' } ```
Author
Owner

@Heavensong89 commented on GitHub:

Oh, I think this is an issue of the Unraid template, I'm not using Unraid because of that the template isn't made by me. Can you try to change the port of the application in the template to 80 instead of 3000?

The frontend runs on port 3000, the backend on 8080 and the reverse proxy on 80. You have to access Pocket ID over the reverse proxy because if you directly access the frontend, the path /api/** isn't found.

So should the PORT environment variable be set to 80 for the frontend? Or still keep frontend as 3000 but also expose/reverse proxy port 80?

Edit: Confirmed, leave PORT as 3000, BACKEND_PORT as 8080, but then need to reverse proxy to port 80

@Heavensong89 commented on GitHub: > Oh, I think this is an issue of the Unraid template, I'm not using Unraid because of that the template isn't made by me. Can you try to change the port of the application in the template to `80` instead of `3000`? > > The frontend runs on port `3000`, the backend on `8080` and the reverse proxy on `80`. You have to access Pocket ID over the reverse proxy because if you directly access the frontend, the path `/api/**` isn't found. So should the PORT environment variable be set to 80 for the frontend? Or still keep frontend as 3000 but also expose/reverse proxy port 80? Edit: Confirmed, leave PORT as 3000, BACKEND_PORT as 8080, but then need to reverse proxy to port 80
Author
Owner

@stonith404 commented on GitHub:

Oh, I think this is an issue of the Unraid template, I'm not using Unraid because of that the template isn't made by me. Can you try to change the port of the application in the template to 80 instead of 3000?

The frontend runs on port 3000, the backend on 8080 and the reverse proxy on 80. You have to access Pocket ID over the reverse proxy because if you directly access the frontend, the path /api/** isn't found.

@stonith404 commented on GitHub: Oh, I think this is an issue of the Unraid template, I'm not using Unraid because of that the template isn't made by me. Can you try to change the port of the application in the template to `80` instead of `3000`? The frontend runs on port `3000`, the backend on `8080` and the reverse proxy on `80`. You have to access Pocket ID over the reverse proxy because if you directly access the frontend, the path `/api/**` isn't found.
Author
Owner

@Heavensong89 commented on GitHub:

pocket-id:development

IMG_0060
Can now load but looks like images are broken and get error occurred alert when clicking continue

@Heavensong89 commented on GitHub: > pocket-id:development ![IMG_0060](https://github.com/user-attachments/assets/c9436a0f-1c95-4a75-8820-de5a07442324) Can now load but looks like images are broken and get error occurred alert when clicking continue
Author
Owner

@nwithan8 commented on GitHub:

Was just debugging this last night. Glad someone figured out what the problem was already. Pushing out an updated template now, sorry about that.

EDIT: Update has been pushed. Templates usually populate on the Unraid Community Apps store within two hours.

EDIT 2: The Unraid app feed has been inconsistent for the past few days. Looks like it hasn't updated since I merged in the fixed template, so it's not available yet.

@nwithan8 commented on GitHub: Was just debugging this last night. Glad someone figured out what the problem was already. Pushing out an updated template now, sorry about that. EDIT: Update has been pushed. Templates usually populate on the Unraid Community Apps store within two hours. EDIT 2: The Unraid app feed has been inconsistent for the past few days. Looks like it hasn't updated since I merged in the fixed template, so it's not available yet.
Author
Owner

@Bartrpc commented on GitHub:

You may reach out directly to this guy, He added pocket id to Unraid Community Apps ->
https://github.com/nwithan8/unraid_templates
Or You can create Your own template as a pocket id dev.
Here is some useful link -> https://selfhosters.net/docker/templating/templating/
Alternatively, someone who will use nwithan8 template should modify template by yourself before creating a docker container. (nah... )

@Bartrpc commented on GitHub: You may reach out directly to this guy, He added pocket id to Unraid Community Apps -> https://github.com/nwithan8/unraid_templates Or You can create Your own template as a pocket id dev. Here is some useful link -> https://selfhosters.net/docker/templating/templating/ Alternatively, someone who will use nwithan8 template should modify template by yourself before creating a docker container. (nah... )
Author
Owner

@stonith404 commented on GitHub:

Great :) Do you know how I can edit the Unraid template that is in the store?

@stonith404 commented on GitHub: Great :) Do you know how I can edit the Unraid template that is in the store?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#496