[GH-ISSUE #3136] Dashboard incorrect number of hosts #2128

Open
opened 2026-02-26 07:34:08 +03:00 by kerem · 7 comments
Owner

Originally created by @MrAlfabet on GitHub (Aug 16, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3136

Describe the bug
Dashboard displays the wrong number of hosts

Nginx Proxy Manager Version
2.10.3

To Reproduce
Create hosts as user X
Create user Y
Login as user Y

Expected behavior
Same number of hosts displayed for both accounts on the dashboard

Exactly this bug: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1679
But I managed to replicate it.

Originally created by @MrAlfabet on GitHub (Aug 16, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3136 **Describe the bug** Dashboard displays the wrong number of hosts **Nginx Proxy Manager Version** 2.10.3 **To Reproduce** Create hosts as user X Create user Y Login as user Y **Expected behavior** Same number of hosts displayed for both accounts on the dashboard Exactly this bug: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1679 But I managed to replicate it.
Author
Owner

@gabviv73 commented on GitHub (Nov 23, 2023):

I confirm with 2.10.4: Items created with different users are not counted on the dashboard page, bit are manageable from the specfic pages.

<!-- gh-comment-id:1824113170 --> @gabviv73 commented on GitHub (Nov 23, 2023): I confirm with 2.10.4: Items created with different users are not counted on the dashboard page, bit are manageable from the specfic pages.
Author
Owner

@blockloop commented on GitHub (Dec 18, 2023):

I successfully recreated this issue by creating Proxy Hosts with a different user. I believe the count is only for proxy hosts (in my case) created by the current user. If I create a new host with my current user the count increases.

If you follow the chain:

  1. github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/frontend/js/app/dashboard/main.js (L54)
  2. github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/frontend/js/app/api.js (L724-L726)
  3. github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/routes/api/reports.js (L21)
  4. github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/internal/report.js (L18)
  5. github.com/NginxProxyManager/nginx-proxy-manager@e08a4d4490/backend/internal/proxy-host.js (L448-L461)

It looks like the visibility flag is not sent properly from the frontend call? The backend query is looking for

if (visibility !== 'all') {
	query.andWhere('owner_user_id', user_id);
}

So it is limiting the count to only the active user.

<!-- gh-comment-id:1861621113 --> @blockloop commented on GitHub (Dec 18, 2023): I successfully recreated this issue by creating Proxy Hosts with a different user. I **believe** the count is only for proxy hosts (in my case) created by the _current user_. If I create a new host with my current user the count increases. If you follow the chain: 1. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/e08a4d44901081ea0e8b33d0f865d4fc4a0a1806/frontend/js/app/dashboard/main.js#L54 2. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/e08a4d44901081ea0e8b33d0f865d4fc4a0a1806/frontend/js/app/api.js#L724-L726 3. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/e08a4d44901081ea0e8b33d0f865d4fc4a0a1806/backend/routes/api/reports.js#L21 4. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/e08a4d44901081ea0e8b33d0f865d4fc4a0a1806/backend/internal/report.js#L18 5. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/e08a4d44901081ea0e8b33d0f865d4fc4a0a1806/backend/internal/proxy-host.js#L448-L461 It looks like the `visibility` flag is not sent properly from the frontend call? The backend query is looking for ``` if (visibility !== 'all') { query.andWhere('owner_user_id', user_id); } ``` So it is limiting the count to only the active user.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 21, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2241381870 --> @github-actions[bot] commented on GitHub (Jul 21, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@jasp106 commented on GitHub (Jul 23, 2024):

you can change this line:
if (visibility !== 'all') {
query.andWhere('owner_user_id', user_id);
}

to:
if (visibility && visibility !== 'all') {
query.andWhere('owner_user_id', user_id);
}

inject it with a volume mapping via docker compose like this for testing:
volumes:

  • ./proxy-host.js:/app/internal/proxy-host.js:ro
<!-- gh-comment-id:2244774825 --> @jasp106 commented on GitHub (Jul 23, 2024): you can change this line: if (visibility !== 'all') { query.andWhere('owner_user_id', user_id); } to: if (visibility && visibility !== 'all') { query.andWhere('owner_user_id', user_id); } inject it with a volume mapping via docker compose like this for testing: volumes: - ./proxy-host.js:/app/internal/proxy-host.js:ro
Author
Owner

@github-actions[bot] commented on GitHub (Jun 5, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2942526638 --> @github-actions[bot] commented on GitHub (Jun 5, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@jotremb commented on GitHub (Jul 9, 2025):

Same issue, the above suggested change does fix the issue.

<!-- gh-comment-id:3053455429 --> @jotremb commented on GitHub (Jul 9, 2025): Same issue, the above suggested change does fix the issue.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 23, 2026):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3787814771 --> @github-actions[bot] commented on GitHub (Jan 23, 2026): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2128
No description provided.