mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-28 21:35:22 -05:00
[GH-ISSUE #1585] Locked out of resources page "http://..../settings/resources" after presumably wrong usage of Docker labels — Fully self-hosted instance #23249
Reference in New Issue
Block a user
Originally created by @maxiride on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1585
Originally assigned to: @oschwartz10612 on GitHub.
Describe the Bug
I successfully setup and used Pangolin on a VPS. Till now, I manually added resources through the web ui, but I decided to try docker labels for automatic provisioning of new resources since I am transitioning away from caddy's lucaslorentz image. This image does the same thing for Caddy through labels.
I created a basic whoami container with the following label:
After reloading the
newtcontainer to apply the blueprint I can't access my Pangolin resources page.The developer tools report
Uncaught TypeError: can't access property "toString", r.proxyPort is null:I tried to stop the
whoamicontainer, remove the labels etc but I can't regain access to Pangolin resources page. I know from the officical Youtube video that resources are not automatically deleted, however I am not understanding what to manipulate in Pangolin's local files configuration to remove the resource backend-side.So the issue is tri-fold:
According to the documentation, or at least my understanding of it, these are the only required fields when creating a target only resource.
The configuration table reports that:
Automatic Discovery
When hostname and internal port are not explicitly defined in labels, Pangolin will automatically detect them from the container configuration.
Site Assignment
If no site is specified in the labels, the resource will be assigned to the Newt site that discovered the container.
Environment
To Reproduce
Expected Behavior
I expected either Newt to refuse the container's labels with an error in the logs, or the resource to not appear in the Pangolin dashboard.
@Pallavikumarimdb commented on GitHub (Sep 29, 2025):
Hi @maxiride , Thanks for sharing the issue! The crash happens because proxyPort ends up being null when the labels don’t fully define the resource, and the UI isn’t handling that case.
text={resourceRow.proxyPort!.toString()}That’s why the resources page breaks. Need to update Pangolin to validate labels more strictly and also make the frontend safer so missing fields don’t cause a full lockout.
@maxiride commented on GitHub (Sep 29, 2025):
Thanks for getting back to me @Pallavikumarimdb.
Since I am still locked out of the Resources UI, I did browse Pangolin files and the only occurrence I found of the resources is in the SQLite database in the table
resources. Since I didn't have time to fully explore the database schema, is it safe to delete the offending records from that table?If not, what's the correct procedure to restore the UI?
@Pallavikumarimdb commented on GitHub (Sep 29, 2025):
Hi @maxiride , Resources table is connected to many other tables (
targets, siteResources, roleResources, userResources, resourcePincode, resourcePassword, resourceAccessToken, resourceSessions, resourceWhitelist, resourceOtp, resourceRules) via foreign keys with cascading delete.If you delete any record from resources, all related entries in these tables will also be deleted automatically, which can lead to loss of important data. Please be very careful and consider backing up the database first.
@oschwartz10612 commented on GitHub (Sep 29, 2025):
@maxiride as @Pallavikumarimdb says just be careful about deleting stuff, but if you delete the resource you created (identified by the niceId) then I assume this should regain you access. I think @Pallavikumarimdb is correct about the change in the front end - thats easy to fix for the next patch.
Could you post the exact blueprint you applied?
@DennisGaida commented on GitHub (Sep 30, 2025):
Exactly the same problem with the following blueprint / labels - thought this was a targets-only resource, but apparently I am missing something:
newthappily chugs along:@maxiride commented on GitHub (Sep 30, 2025):
For anyone else stumbling here. I did regain access to the UI.
resourcestable@oschwartz10612 on the subject of the blueprient applied:
Below is the whole
docker inspect, which boils down to:where
pangolin_defaultis the network shared with the localnewtnode.