Pm2: Can't run on port 443

Created on 6 Jun 2017  路  3Comments  路  Source: Unitech/pm2

Hi, I'm on ubuntu running version 2.4.6 of pm2 and using node 4.4.5. I want to set up pm2 to restart my node.js application whenever it crashes, but I'm running into trouble when starting the server. I type sudo pm2 start server.js to start the server on port 443. When I type pm2 list in the terminal, it says it's in an errored state and gives me this error: Error: listen EACCES 0.0.0.0:443 which is what I get when I don't run the server as root, because you need to be root to use ports lower than 1024. Can you please tell me how to start the server as root using pm2? Thanks!

Most helpful comment

Still being put into an errored state after following the authbind commands. Replaced 80 with 443 but still no dice. Finding this in the error log:
Error: listen EACCES 0.0.0.0:443

All 3 comments

Its documented right there : http://pm2.keymetrics.io/docs/usage/specifics/#listening-on-port-80-w-o-root
You can also use sudo setcap cap_net_bind_service=+ep /path/to/node to allow the node binary to bind the port itself.

Still being put into an errored state after following the authbind commands. Replaced 80 with 443 but still no dice. Finding this in the error log:
Error: listen EACCES 0.0.0.0:443

Hi, I am having this same issue. Followed the docs, but it doesn't work....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psparago picture psparago  路  3Comments

FujiHaruka picture FujiHaruka  路  3Comments

cchan picture cchan  路  3Comments

shaunwarman picture shaunwarman  路  3Comments

lefam picture lefam  路  3Comments