DEV Community

Discussion on: How do you decide your application port number?

Collapse
 
ericandrewlewis profile image
eric • Edited

I will randomly pick a port number in the thousands (e.g. 7777) to run my application on and it is typically free.

If I ever have a collision, my application fails to start and tells me the port is in use. This happens when I previously started an application on my go-to port number, so I restart my application with the port number increased by one.

I generally avoid port numbers below 1024 because they're considered "system ports" and require root access.