You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port is missing when port-forwarding via Dashboard #8189
Looks like a bug. Thanks for reporting.
Generally, when hosting Coder on a subdomain, specify CODER_ACCESS_URL without the port and use a reverse proxy to route your subdomain to the port where the Coder service is running.
Instead of allowing the wildcard access URL to have a port we should just append the port from the access URL to the URL. We expect them to be served on the same port on the same host.
Ran into this same issue. Hoping there will be some traction on this issue soon. The forwarded port seems to show correctly in code-server list of forwarded ports, but not in the dashboard. Trying to force it yields errors.
Activity
matifali commentedon Jun 26, 2023
Looks like a bug. Thanks for reporting.
Generally, when hosting Coder on a subdomain, specify CODER_ACCESS_URL without the port and use a reverse proxy to route your subdomain to the port where the Coder service is running.
kylecarbs commentedon Jun 26, 2023
@Emyrk I believe this might be a regression with proxies...
Emyrk commentedon Jun 26, 2023
@kylecarbs will take a look
Emyrk commentedon Jun 26, 2023
Has this ever worked? There is a mistake in the configuration. The
CODER_WILDCARD_ACCESS_URLvalue does not have the port.The
CODER_ACCESS_URLvalue does not have any impact on those URLs. Only theCODER_WILDCARD_ACCESS_URL.So
CODER_WILDCARD_ACCESS_URLshould be*.example.com:3000not `*.example.com.That being said, we do not allow a port in the wildcard access url for two reasons.
First the flag parser:
coder/cli/clibase/values.go
Line 216 in 5bdc79a
Second the HostnamePattern check:
coder/coderd/httpapi/url.go
Lines 103 to 105 in 1406838
So I don't think we have ever allowed a port in the wildcardurl. I do not know why, so we might be able to just allow it?
Emyrk commentedon Jun 26, 2023
In the current state, if you wish to use a
CODER_WILDCARD_ACCESS_URL, you must use a domain without a port.jizusun commentedon Jun 29, 2023
Thank you @Emyrk
Currently there is another process listening on the port
80on that machine.Is the possible that I can make the port-forwarding via dashboard work with port
3000?matifali commentedon Jun 29, 2023
You could try hosting Coder behind a Revere proxy.
See https://github.com/coder/coder/tree/main/examples/web-server for examples.
Emyrk commentedon Jun 29, 2023
@deansheather do you know if this not using a port on wildcard domains is a requirement?
bpmct commentedon Aug 7, 2023
Let's read the port from the access URL itself to fix this. I believe this is how we handle it in Coder v1 (our legacy product)
deansheather commentedon Aug 7, 2023
Instead of allowing the wildcard access URL to have a port we should just append the port from the access URL to the URL. We expect them to be served on the same port on the same host.
Emyrk commentedon Aug 7, 2023
Should we expect them to be on the same port? That seems like an assumption that won't always hold true.
bpmct commentedon Aug 31, 2023
I think the assumption is fair. It is what we do in Coder v1.
Emyrk commentedon Aug 31, 2023
Why can we not just allow the wildcard url to have a port though? Am I missing something why we can't just allow that?
bpmct commentedon Aug 31, 2023
Oh, I'm down for either!
VaalaCat commentedon Oct 28, 2023
Is there any progress on this issue?
crono782 commentedon Jan 5, 2024
Ran into this same issue. Hoping there will be some traction on this issue soon. The forwarded port seems to show correctly in code-server list of forwarded ports, but not in the dashboard. Trying to force it yields errors.