title: How to run node.js as non-root user?
body: <p>I'm running a node.js server, that will serve requests on port 80 amongst others. Clearly this requires the application running as root (on Linux).</p>
  
  <p>Looking at this post (<a href="http://syskall.com/dont-run-node-dot-js-as-root" rel="noreferrer">http://syskall.com/dont-run-node-dot-js-as-root</a>) as an example it's clear that there are simple ways to allow node to be run as a non-root user, but I'm wondering  if anyone has views on the advantages/disadvantages of the different methods suggested:</p>
  
  <ol>
  <li><p>code: use setuid() to drop down from root to non-priviledged user after listening on port 80 is established.</p></li>
  <li><p>using a proxy server of some sort to redirect requests to a port >1024 (and so not need node to run as root)</p></li>
  <li><p>using IP tables to forward to another port (ditto node would not run as root)</p></li>
  </ol>
  
  <p>Thanks</p>