- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support binding on port 0 #2992
Comments
Strange. Could you describe a use-case where this would be useful? Which version of Caddy are you using? It's very unlikely a change to this would land in v1, but it's possible that it could be supported in v2. |
Thanks for quick reply. |
I understand that, but why would you want to use a random port instead of a specific well-known port, especially for a webserver? I think a random port does makes sense in a situation where you have some development tool, for example More information about how and why this would be used would be helpful. |
We can do this, but I also want to know a compelling use case. |
Thanks for your response . |
Okay. No problem, but I think if there is enough demand for this feature, we should definitely do it. |
So, this already works actually. I just added a log message that prints the port so you can know it without having to netstat or whatever. |
Binding on port 0 means the kernel will select an unused port.
It seems Caddy does not support it.
Do you have plan to support it?
Thanks.
The text was updated successfully, but these errors were encountered: