title: How can I cleanly handle the first use of letsencrypt on an nginx server?
body: <p>I use letsencrypt/certbot to manage certs for nginx's use. I find that, when setting up servers, I get into a chicken and egg situation: nginx must work to supply the <code>.well-known/acme-challenge</code> directory, but nginx refuses to start if configured ssl certificates don't exist yet.</p>
  
  <p>So far I've gotten around that by manually editing ssl out of the nginx server block, starting it, running certbot for the first time, then reverting the change. I'm wondering if there is a cleaner way to do it.</p>
  
  <p>(at the moment I'm using the webroot auth method, but I'm not married to it. The goal here is to come up with a single configuration that does the Right Thing during initial setup)</p>