title: How to run Mercure in production
body: <p>I'm trying to run Mercure on Symfony within a production env.</p>
  
  <p><strong>[1st problem]</strong></p>
  
  <p>It seems that I need to keep my ssh connection active in order to keep mercure running.<br>
  Also, I would like to be able to run multiple instance of Mercure (one per vhost)</p>
  
  <p><strong>[2nd problem]</strong></p>
  
  <p>As my vhost is already using HTTPS, I'm using the following command to run Mercure:</p>
  
  <pre><code>JWT_KEY='4e2da03eda9acdfdb9253ab0f8f9e4011706fd6ba6d8293d9727e833752fb15b' CERT_FILE='/etc/letsencrypt/live/my-project.my-domain.com/fullchain.pem' KEY_FILE='/etc/letsencrypt/live/my-project.my-domain.com/privkey.pem' ALLOW_ANONYMOUS=1 ./mercure/mercure
  </code></pre>
  
  <p>If I try this command with my web user (www-data), I get the following error:</p>
  
  <blockquote>
    <p>ERRO[0000] listen tcp :443: bind: permission denied</p>
  </blockquote>
  
  <p>If I try to run it with root, I get this error instead:</p>
  
  <blockquote>
    <p>ERRO[0000] listen tcp :443: bind: address already in use</p>
  </blockquote>
  
  <p>Some messages here and there on the web suggested to use a proxy, but don't provide any example.</p>
  
  <hr>
  
  <p>Can someone provide a solution to, first, run Mercure without having to keep my user connection on ssh, and if possible, being able to run one instance of mercure per project (vhost) (mercure is at the root of my project)</p>
  
  <p>Second, provide a full example and how to solve the problem of either, ports issue or how to use a proxy.</p>