Unable to bind to port 80 on macOS
See original GitHub issuePreliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
MacOS has allowed unprivileged access to binding to all ports since macOS 10.14, but only when binding to 0.0.0.0
.
Reproduction Link
https://github.com/gatsbyjs/gatsby-starter-minimal
Steps to Reproduce
- Open any gatsby project on a mac
- Run
gatsby develop --host 0.0.0.0 --port 80
Expected Result
It should bind to port 80
Actual Result
It does not bind to port 80
Environment
System:
OS: macOS 11.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 96.0.4664.45
Firefox: 94.0.1
Safari: 14.1.2
Config Flags
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:27 (3 by maintainers)
Top Results From Across the Web
How can I open port 80 so a non-root process can bind to it?
Normally only root processes can bind to port 80 (or to any port below 1024). Can I open port 80 specifically so that...
Read more >lost ability to bind port 80 on mac, how to debug? - Super User
One simple solution is to have it bind to a higher port number and then in your operating system firewall, set up a...
Read more >Cannot use port 80 on Mac - Stack Overflow
Ports from 1 to 1024 cannot be used by normal users without root credentials. You would be able to use sudo to bind...
Read more >How is caddy able to bind to port 80 and 443 on MacOS ...
One thing I don't understand is, how is Caddy able to work on port 80 and 443 on MacOS without root. I'm not...
Read more >Port 80: connection refused. How to fix on Mac OSX? [duplicate]
Namely, the machine that fails to serve the virtual host test.dev on 80 shows me this on port scan: Сканирование портов выполняется… Port...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Aah! A ghost! (not fixed, don’t close)
@the-redx Go ahead and put up a PR yourself 😃