title: Error: listen EADDRINUSE: address already in use :::3000 - Digitalocean
body: <p>I recently followed a <a href="https://github.com/amirsanni/Video-Call-App-NodeJS" rel="nofollow noreferrer">video chat tutorial</a> and wanted to host it on Digitalocean to test some webRTC things. I got it working and even got it hosted on Heroku. However, when I go to host it on an unused droplet (running off of the initial $100 free Digitalocean credit) and SSH into my droplet &amp; run <code>npm start</code> (yes, although its not in the tutorials github code, <code>npm start</code> <strong>is</strong> in the <code>package.json</code>), I get an error.</p>
  <pre><code>USER***@nodejs-s-1vcpu-1gb-sfo2-01:~/DIRNAME$ sudo npm start
  
  &gt; livestream-server@0.0.1 start /home/USER***/DIRNAME
  &gt; node app.js
  
  events.js:292
        throw er; // Unhandled 'error' event
        ^
  
  Error: listen EADDRINUSE: address already in use :::3000
      at Server.setupListenHandle [as _listen2] (net.js:1313:16)
      at listenInCluster (net.js:1361:12)
      at Server.listen (net.js:1447:7)
      at Object.&lt;anonymous&gt; (/home/USER***/ZMP_Solutions/app.js:17:8)
      at Module._compile (internal/modules/cjs/loader.js:1137:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
      at Module.load (internal/modules/cjs/loader.js:985:32)
      at Function.Module._load (internal/modules/cjs/loader.js:878:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
      at internal/main/run_main_module.js:17:47
  Emitted 'error' event on Server instance at:
      at emitErrorNT (net.js:1340:8)
      at processTicksAndRejections (internal/process/task_queues.js:84:21) {
    code: 'EADDRINUSE',
    errno: 'EADDRINUSE',
    syscall: 'listen',
    address: '::',
    port: 3000
  }
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! livestream-server@0.0.1 start: `node app.js`
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the livestream-server@0.0.1 start script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  </code></pre>
  <p>I already read <a href="https://stackoverflow.com/questions/9164915/node-js-eacces-error-when-listening-on-most-ports">read this related question</a> and tried a lot of things, e.g. using <code>sudo</code> when running <code>npm start</code>, or setting the port to higher than 3000, but none of it helped. Is there a fix to this?</p>
  <p>Thanks!</p>