mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-15 21:31:24 -05:00
[GH-ISSUE #1709] Duplicate docker labels breaking Pangolin #19072
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DennisGaida on GitHub (Oct 20, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1709
Originally assigned to: @oschwartz10612 on GitHub.
Describe the Bug
I'm trying out Pangolin and want to get away from the hidden database-method of configuring things, I want everything with docker labels - enter blueprints.
Unfortunately when you do a configuration mistake and create duplicate names, all docker labels configured resources are deleted in the database, more specifically:
subDomainis nulled andfullDomainis set to the base domain.Environment
OS Type & Version: Debian & Ubuntu
Pangolin Version: 1.11.0
Gerbil Version: 1.2.1
Traefik Version: v3.5.3
Newt Version: 1.5.2
To Reproduce
The infinite redirect may be my specific use case as the base domain
domain.example.orgis the domain where Pangolin lives. Checking the database, I see that that several entries are nulled and I have to manually fix them in the database(I anonymized the base domain in the above screenshot - so syncthing in this example has set the base domain of
domain.example.orginstead of the example ofsyncthing-host1.domain.example.org). Since there are now multiple entries in traefik with the same base domain, I assume that is why I get infinite redirects.Given the above example from the screenshot, I need to set the subdomain for n8n, as well as the
fullDomain(i.e.n8n.domain.example.org) in the database and the same goes for the other three nulled entries. Secondly the newt instances can't "fix themselves", since the newt endpoint as per documentation ishttps://domain.example.organd that right now is infinitely redirecting.After fixing everything in the database and restarting Pangolin, everything is back in order. Of course I need to fix the non-unique names in host1 and host2 otherwise I can recreate the same problem when restarting.
Expected Behavior
A misconfiguration of newt / docker-labels should not result in a catastrophic failure. Documentation doesn't specify that the name needs to be unique (it makes sense, of course) - Pangolin should actually just add e.g.
-1suffix if the name already exists and not delete things.Secondly when playing around with the docker labels, I figured out that the name within the key is also important, i.e.
pangolin.proxy-resources.<name>.name: something. When having multiplepangolin.proxy-resourceswith the same<name>across multiple hosts, things also go awry. So the best practice seems to be (not documented) to have unique a<name>within the docker label key, as well as a unique name as the actual name. I guess you should always suffix your names with the host names or something like that and then again this could be something newt could be automatically doing.As for newt not being able to "fix itself" due to the Pangolin endpoint being broken - can't i use another internal endpoint, so that newt <-> Pangolin always works? Right now I am using the public domain as the endpoint, but newt <-> Pangolin could also talk via VPN IP (e.g. Tailscale/Zerotier etc.), so the "safer" endpoint could be
<VPN-IP>, couldn't it?@github-actions[bot] commented on GitHub (Nov 4, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@DennisGaida commented on GitHub (Nov 4, 2025):
I would like a breaking change to be investigated or maybe I am doing something wrong.
@oschwartz10612 commented on GitHub (Nov 4, 2025):
Thanks for the bump I will take a look asap
@oschwartz10612 commented on GitHub (Nov 9, 2025):
It seems like undefined behavior is taking place when you have duplicate blueprints around the subdomains so I will take a look into that but you will need to make a change to make this work: the "nice id" of the resource across resources needs to be unique and thats whats causing your issue.
The nice id is the ID of the resource in the table and on the lable here
Basically defining a new nice id here will create a new resource. So by defining two different newts they are fighting over this resource. If you want two different syncthing deployments you should call them with different nice ids.
@DennisGaida commented on GitHub (Nov 9, 2025):
I am aware as also stated in the OP, though such a user error (using duplicate ids) shouldn’t result in failure. Either check whether the ID already exists and err on the newt side or generate a completely new random ID or just add a suffix such as -1 if it already exists.
@michimussato commented on GitHub (Nov 13, 2025):
Stumbled across this issue as well today.
Creating a Resource through the web UI leads to the following entry in
db.sqlite:/db/main/tables/resources:which will work and resolve just fine.
Adding a Resource through the Blueprints interface (and also using
labelsin Docker Compose):The
subdomainfield seems missing when using Blueprints/Labels.Both Resource resolve just fine, however, after adding the second Resource, Pangolin will not survive a system reboot.
Trying to open https://pangolin.openstudiolandscapes.cloud-ip.cc - which worked fine with just the manually entered Resource - now leads to the following redirect URL:
https://pangolin.openstudiolandscapes.cloud-ip.cc/auth/resource/956c72c2-2513-49e7-a69e-9417b89bfab8?redirect=https%3A%2F%2Fpangolin.openstudiolandscapes.cloud-ip.cc%2Fauth%2Fresource%2F956c72c2-2513-49e7-a69e-9417b89bfab8%3Fredirect%3Dhttps%253A%252F%252Fpangolin.openstudiolandscapes.cloud-ip.cc%252Fauth%252Fresource%252F956c72c2-2513-49e7-a69e-9417b89bfab8%253Fredirect%253Dhttps%25253A%25252F%25252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252Fauth%25252Fresource%25252F956c72c2-2513-49e7-a69e-9417b89bfab8%25253Fredirect%25253Dhttps%2525253A%2525252F%2525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252Fauth%2525252Fresource%2525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525253Fredirect%2525253Dhttps%252525253A%252525252F%252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252Fauth%252525252Fresource%252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%252525253Fredirect%252525253Dhttps%25252525253A%25252525252F%25252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252525252Fauth%25252525252Fresource%25252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%25252525253Fredirect%25252525253Dhttps%2525252525253A%2525252525252F%2525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252525252Fauth%2525252525252Fresource%2525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525252525253Fredirect%2525252525253Dhttps%252525252525253A%252525252525252F%252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252525252Fauth%252525252525252Fresource%252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%252525252525253Fredirect%252525252525253Dhttps%25252525252525253A%25252525252525252F%25252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252525252525252Fauth%25252525252525252Fresource%25252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%25252525252525253Fredirect%25252525252525253Dhttps%2525252525252525253A%2525252525252525252F%2525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252525252525252Fauth%2525252525252525252Fresource%2525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525252525252525253Fredirect%2525252525252525253Dhttps%252525252525252525253A%252525252525252525252F%252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252525252525252Fauth%252525252525252525252Fresource%252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%252525252525252525253Fredirect%252525252525252525253Dhttps%25252525252525252525253A%25252525252525252525252F%25252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252525252525252525252Fauth%25252525252525252525252Fresource%25252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%25252525252525252525253Fredirect%25252525252525252525253Dhttps%2525252525252525252525253A%2525252525252525252525252F%2525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252525252525252525252Fauth%2525252525252525252525252Fresource%2525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525252525252525252525253Fredirect%2525252525252525252525253Dhttps%252525252525252525252525253A%252525252525252525252525252F%252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252525252525252525252Fauth%252525252525252525252525252Fresource%252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%252525252525252525252525253Fredirect%252525252525252525252525253Dhttps%25252525252525252525252525253A%25252525252525252525252525252F%25252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252525252525252525252525252Fauth%25252525252525252525252525252Fresource%25252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%25252525252525252525252525253Fredirect%25252525252525252525252525253Dhttps%2525252525252525252525252525253A%2525252525252525252525252525252F%2525252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252525252525252525252525252Fauth%2525252525252525252525252525252Fresource%2525252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525252525252525252525252525253Fredirect%2525252525252525252525252525253Dhttps%252525252525252525252525252525253A%252525252525252525252525252525252F%252525252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252525252525252525252525252Fauth%252525252525252525252525252525252Fresource%252525252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%252525252525252525252525252525253Fredirect%252525252525252525252525252525253Dhttps%25252525252525252525252525252525253A%25252525252525252525252525252525252F%25252525252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%25252525252525252525252525252525252Fauth%25252525252525252525252525252525252Fresource%25252525252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%25252525252525252525252525252525253Fredirect%25252525252525252525252525252525253Dhttps%2525252525252525252525252525252525253A%2525252525252525252525252525252525252F%2525252525252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%2525252525252525252525252525252525252Fauth%2525252525252525252525252525252525252Fresource%2525252525252525252525252525252525252F956c72c2-2513-49e7-a69e-9417b89bfab8%2525252525252525252525252525252525253Fredirect%2525252525252525252525252525252525253Dhttps%252525252525252525252525252525252525253A%252525252525252525252525252525252525252F%252525252525252525252525252525252525252Fpangolin.openstudiolandscapes.cloud-ip.cc%252525252525252525252525252525252525252Fopenstudiolandscapes%252525252525252525252525252525252525252Fsettings%252525252525252525252525252525252525252Fresources
A snippet from the
traefiklogs (maybe it helps):As you can see here, I'm using DNS Challenge with a single certificate for
pangolin.openstudiolandscapes.cloud-ip.ccand*.pangolin.openstudiolandscapes.cloud-ip.ccas opposed the default HTTP Challenge.My
traefik_config.yml:And my
dynamic_config.yml@oschwartz10612 commented on GitHub (Dec 7, 2025):
I am hoping this is fixed by #1645 but LMK if not.