The Strapi interface works perfectly on the xxx.clusterxxx.hosting.ovh.net but when I run the yarn develop command to use Strapi it doesn’t work, an error appears: error Error: bind EACCES 0.0.0.0:1337
I tried several solutions from different forums (change the port, …) but nothing works, if someone has a solution?
I had this issue aswell on my windows machine (develop). I tried to change the port in config/server.js but strapi admin panel still sent requests to port 1337. Therefore the login to the admin panel was not possible for me with this solution.
My solution to this problem was to figure out the process id with the command “netstat -ano | findstr :1337” in command prompt. With the output process id I went to the task manager and watched under the details tab which application corresponds to the process id. In my case it was the Razer Chroma app. After I uninstalled the razer App, I had no more issues with the port 1337 and could use strapi without problems
I can confirm, I have the exact same issue and Razer app was also using port 1337, uninstalled razer app and strapi worked. I also tried to change the port to something different but it kept trying to access the admin panel on port 1337 no matter what I put in the .env file (even though strapi was running on the port in the .env file it still tried to access the admin on 1337).
This is the problem with trying to be clever with your default ports: someone else already thought of it.
1337 is cool and all, but already in use, just like 5432 and 3306 etc. The latter ports were carefully chosen to avoid conflicts.
Using a round default number, above not just 1024, but 2048, like 3000 or 5000 should only conflict with with other local development projects that can be disabled.
All my projects that try a default port (usually 3000 and/or 3333), they recursively try/catch and generate a random port in the 20k ranges at least once or twice before actually failing so tests still work with the app running.
Sometimes it’s better to be compatible than clever.
I also tried using 3000 in the ENV file but the web app still looks at 1337… seems like only part of the app reads the env variable.
What is the solution here for developing locally on windows (other than uninstalling all my Razer software)?
Is there a fix planned for the PORT variable not working properly?
As a workaround I was able to:
shut down my Razer apps
open an admin PowerShell (req. for the last step)
netstat -ano | findstr :1337
taskkill /F /PID ( resulting PID from last command )
You’ll likely have to repeat steps 3 and 4 when the service gets relaunched.
Maybe it’s Hyper-V’s problem if you have installed something like docker in your windows PC.
Run netsh int ipv4 show excludedportrange protocol=tcp first to check the banned ports, if it includes 1337 port, then update it with netsh int ipv4 set dynamic tcp start=12345 num=53190, and reboot to make it work.