title: How to do auto-renewal of TLS certificates with certbot?
body: <p>I have an application with Nginx docker container for which the TLS certs are generated manually using the following command in the host (with Ubuntu OS) where application is deployed:</p>
  <pre><code>certbot certonly --manual --manual-public-ip-logging-ok --preferred-challenges dns -d my.app.com
  </code></pre>
  <p>When the certificates gets expired, i have to renew them.</p>
  <p>But i can't use the following <code>certbot renew</code> command for this purpose as it will give an error:</p>
  <pre><code>$ sudo certbot renew
  
  Failed to renew certificate my.app.com with error: The manual plugin is not working; there may be problems with your existing configuration.
  The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.')
  </code></pre>
  <p>So, what I'm doing now is to create the certs once again (using the same <code>certbot certonly</code> command that was used previously) instead of renewing them.</p>
  <p>How can I fix the error with <code>certbot renew</code> command?</p>
  <p>How can I automate this setup?</p>