Skip to content

Instantly share code, notes, and snippets.

@aont
Created May 1, 2025 10:56
Show Gist options
  • Save aont/2941536b3ba6dca83683382e1c38d015 to your computer and use it in GitHub Desktop.
Save aont/2941536b3ba6dca83683382e1c38d015 to your computer and use it in GitHub Desktop.

certbot webroot way

sudo -e /etc/nginx/sites-available/default

server {
    ....
    location /.well-known/acme-challenge/ {
        root /path/to/www;
    }
    ...
}
python3 -c 'from certbot.main import main; main()' certonly --webroot -w /path/to/www "${OTHER_ARGS}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment