[GH-ISSUE #265] Pangolin Doesn't Work with Subdomains as Base Domain #14252

Closed
opened 2026-05-16 02:00:11 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @KamilKleina on GitHub (Mar 3, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/265

Pangolin does not function when a subdomain is set as the base domain. I do not want to use domain.com as the base because it is already in use across multiple different servers. Instead, I need to set host-01.remote-location-01.domain.com as the base domain and have services like pangolin.host-01.remote-location-01.domain.com work normally.
Expected Behavior

Pangolin should support subdomains as base domains.
Certificates should issue and validate correctly.
Routing should function as expected for services under the subdomain base.

Actual Behavior

Pangolin fails entirely when using a subdomain as the base.

Steps to Reproduce

Set the base domain to host-01.remote-location-01.domain.com.
Originally created by @KamilKleina on GitHub (Mar 3, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/265 Pangolin does not function when a subdomain is set as the base domain. I do not want to use domain.com as the base because it is already in use across multiple different servers. Instead, I need to set host-01.remote-location-01.domain.com as the base domain and have services like pangolin.host-01.remote-location-01.domain.com work normally. Expected Behavior Pangolin should support subdomains as base domains. Certificates should issue and validate correctly. Routing should function as expected for services under the subdomain base. Actual Behavior Pangolin fails entirely when using a subdomain as the base. Steps to Reproduce Set the base domain to host-01.remote-location-01.domain.com.
Author
Owner

@miloschwartz commented on GitHub (Mar 3, 2025):

Hey, this should work; we use a subdomain as as a base domain internally, and I think some of our users in Discord do as well. However, it's possible it's still buggy. Can you provide some more info as to what happens when you attempt this and why it's failing? Are there are errors or anything in the logs that could provide us a hint?

<!-- gh-comment-id:2694831083 --> @miloschwartz commented on GitHub (Mar 3, 2025): Hey, this should work; we use a subdomain as as a base domain internally, and I think some of our users in Discord do as well. However, it's possible it's still buggy. Can you provide some more info as to what happens when you attempt this and why it's failing? Are there are errors or anything in the logs that could provide us a hint?
Author
Owner

@KamilKleina commented on GitHub (Mar 3, 2025):

@miloschwartz
so my config looks like it after running installer.sh (removed section about user and smtp)

app:
    dashboard_url: "https://pangolin.machine-01.cloud-01.domain.com"
    log_level: "info"
    save_logs: false

domains:
    domain1:
        base_domain: "machine-01.cloud-01.domain.com"
        cert_resolver: "letsencrypt"

server:
    external_port: 3000
    internal_port: 3001
    next_port: 3002
    internal_hostname: "pangolin"
    session_cookie_name: "p_session_token"
    resource_access_token_param: "p_token"
    resource_session_request_param: "p_session_request"
    cors:
        origins: ["https://pangolin.machine-01.cloud-01.domain.com"]
        methods: ["GET", "POST", "PUT", "DELETE", "PATCH"]
        headers: ["X-CSRF-Token", "Content-Type"]
        credentials: false

traefik:
    cert_resolver: "letsencrypt"
    http_entrypoint: "web"
    https_entrypoint: "websecure"
    prefer_wildcard_cert: false

gerbil:
    start_port: 51820
    base_endpoint: "pangolin.machine-01.cloud-01.domain.com"
    use_subdomain: false
    block_size: 24
    site_block_size: 30
    subnet_group: 100.89.137.0/20

rate_limits:
    global:
        window_minutes: 1
        max_requests: 100

flags:
    require_email_verification: true
    disable_signup_without_invite: true
    disable_user_create_org: false
    allow_raw_resources: true
    allow_base_domain_resources: true

and error is like that after running docker logs pangolin

Error: Invalid configuration file: Validation error: Invalid at "domains.domain1.base_domain"
<!-- gh-comment-id:2695442899 --> @KamilKleina commented on GitHub (Mar 3, 2025): @miloschwartz so my config looks like it after running installer.sh (removed section about user and smtp) ``` app: dashboard_url: "https://pangolin.machine-01.cloud-01.domain.com" log_level: "info" save_logs: false domains: domain1: base_domain: "machine-01.cloud-01.domain.com" cert_resolver: "letsencrypt" server: external_port: 3000 internal_port: 3001 next_port: 3002 internal_hostname: "pangolin" session_cookie_name: "p_session_token" resource_access_token_param: "p_token" resource_session_request_param: "p_session_request" cors: origins: ["https://pangolin.machine-01.cloud-01.domain.com"] methods: ["GET", "POST", "PUT", "DELETE", "PATCH"] headers: ["X-CSRF-Token", "Content-Type"] credentials: false traefik: cert_resolver: "letsencrypt" http_entrypoint: "web" https_entrypoint: "websecure" prefer_wildcard_cert: false gerbil: start_port: 51820 base_endpoint: "pangolin.machine-01.cloud-01.domain.com" use_subdomain: false block_size: 24 site_block_size: 30 subnet_group: 100.89.137.0/20 rate_limits: global: window_minutes: 1 max_requests: 100 flags: require_email_verification: true disable_signup_without_invite: true disable_user_create_org: false allow_raw_resources: true allow_base_domain_resources: true ``` and error is like that after running `docker logs pangolin` ``` Error: Invalid configuration file: Validation error: Invalid at "domains.domain1.base_domain" ```
Author
Owner

@miloschwartz commented on GitHub (Mar 3, 2025):

Okay, thanks. This helps narrow down the issue.

I think this is a parsing issue in the config. I think it's also an easy fix that I will try to include in the next release for you. Hope to have that out tomorrow.

<!-- gh-comment-id:2695473977 --> @miloschwartz commented on GitHub (Mar 3, 2025): Okay, thanks. This helps narrow down the issue. I think this is a parsing issue in the config. I think it's also an easy fix that I will try to include in the next release for you. Hope to have that out tomorrow.
Author
Owner

@KamilKleina commented on GitHub (Mar 3, 2025):

That would be really awesome sir.

<!-- gh-comment-id:2695496137 --> @KamilKleina commented on GitHub (Mar 3, 2025): That would be really awesome sir.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#14252