Document ports used #641

Closed
opened 2025-12-29 02:21:32 +01:00 by adam · 3 comments
Owner

Originally created by @kradalby on GitHub (Feb 16, 2024).

As part of implementing #1600

We probably need more ports open and we should document which ports are required for each scenarios:

With embedded DERP:

  • 80 -> for generate204
  • 3478 -> STUN
  • 443 -> Headscale + DERP

With Letsencrypt:

  • 80 -> ownership check

Standard:

  • 50443 -> gRPC
  • 9090 -> /metrics
Originally created by @kradalby on GitHub (Feb 16, 2024). As part of implementing #1600 We probably need more ports open and we should document which ports are required for each scenarios: With embedded DERP: - 80 -> for generate204 - 3478 -> STUN - 443 -> Headscale + DERP With Letsencrypt: - 80 -> ownership check Standard: - 50443 -> gRPC - 9090 -> /metrics
adam added the stalebug labels 2025-12-29 02:21:32 +01:00
adam closed this issue 2025-12-29 02:21:32 +01:00
Author
Owner

@balki commented on GitHub (Apr 8, 2024):

Is it possible to change the usage of port 80. I have headscale listening on below

server_url: https://hs.mydomain.com:8443

and caddy web server on port 80 and 443. The clients seem to send the below request to port 80 which gets logged in caddy as errors instead of reaching headscale. Is the below request only used with embedded derp?

{                                                                                                                                                                                                          
    "level": "info",                                                                                                                                                                                         
    "ts": "<timestamp>",                                                                                                                                                                                
    "logger": "http.log.access.log0",                                                                                                                                                                        
    "msg": "handled request",                                                                                                                                                                                
    "request": {                                                                                                                                                                                             
      "remote_ip": "XX.XX.XX.XX",                                                                                                                                                                          
      "remote_port": "40362",                                                                                                                                                                                
      "client_ip": "XX.XX.XX.XX",                                                                                                                                                                          
      "proto": "HTTP/1.1",                                                                                                                                                                                   
      "method": "POST",                                                                                                                                                                                      
      "host": "hs.mydomain.com:80",                                                                                                                                                                              
      "uri": "/ts2021",                                                                                                                                                                                      
      "headers": {                                                                                                                                                                                           
        "User-Agent": [                                                                                                                                                                                      
          "Go-http-client/1.1"                                                                                                                                                                               
        ],                                                                                                                                                                                                   
        "Content-Length": [                                                                                                                                                                                  
          "0"                                                                                                                                                                                                
        ],                                                                                                                                                                                                   
        "Connection": [                                                                                                                                                                                      
          "upgrade"                                                                                                                                                                                          
        ],                                                                                                                                                                                                   
        "Upgrade": [                                                                                                                                                                                         
          "tailscale-control-protocol"                                                                                                                                                                       
        ],                                                                                                                                                                                                   
        "X-Tailscale-Handshake": [                                                                                                                                                                           
          "<base64 encoded binary data>ggwE="                                                         
        ]                                                                                                                                                                                                    
      }                                                                                                                                                                                                      
    },                                                                                                                                                                                                       
    "bytes_read": 0,                                                                                                                                                                                         
    "user_id": "",                                                                                                                                                                                           
    "duration": 0,                                                                                                                                                                                           
    "size": 0,                                                                                                                                                                                               
    "status": 0,                                                                                                                                                                                             
    "resp_headers": {                                                                                                                                                                                        
      "Server": [                                                                                                                                                                                            
        "Caddy"                                                                                                                                                                                              
      ]                                                                                                                                                                                                      
    }                                                                                                                                                                                                        
  }      
@balki commented on GitHub (Apr 8, 2024): Is it possible to change the usage of port 80. I have headscale listening on below ```yaml server_url: https://hs.mydomain.com:8443 ``` and caddy web server on port 80 and 443. The clients seem to send the below request to port 80 which gets logged in caddy as errors instead of reaching headscale. Is the below request only used with embedded derp? ```json { "level": "info", "ts": "<timestamp>", "logger": "http.log.access.log0", "msg": "handled request", "request": { "remote_ip": "XX.XX.XX.XX", "remote_port": "40362", "client_ip": "XX.XX.XX.XX", "proto": "HTTP/1.1", "method": "POST", "host": "hs.mydomain.com:80", "uri": "/ts2021", "headers": { "User-Agent": [ "Go-http-client/1.1" ], "Content-Length": [ "0" ], "Connection": [ "upgrade" ], "Upgrade": [ "tailscale-control-protocol" ], "X-Tailscale-Handshake": [ "<base64 encoded binary data>ggwE=" ] } }, "bytes_read": 0, "user_id": "", "duration": 0, "size": 0, "status": 0, "resp_headers": { "Server": [ "Caddy" ] } } ```
Author
Owner

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

This issue is stale because it has been open for 90 days with no activity.

@github-actions[bot] commented on GitHub (Jul 8, 2024): This issue is stale because it has been open for 90 days with no activity.
Author
Owner

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

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions[bot] commented on GitHub (Jul 15, 2024): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#641