sova-acme 0.1.1

Let's Encrypt ACME (HTTP-01) certificates for Sova with TLS hot-reload
Documentation

crates.io docs.rs License

sova-acme

Let's Encrypt HTTP-01 certificates for Sova with TLS hot-reload (no process restart).

Guide: https://s00d.github.io/sova/plugins/acme

cargo add sova --features "tls,acme"
use sova::{Acme, App, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let mut app = App::new();
    app.get("/", || async { "hello https" });
    app.install(
        Acme::lets_encrypt(["example.com"])
            .email("ops@example.com")
            .dir("./data/acme")
            .hsts(true),
    );
    // install attached TLS to the app — just listen
    app.listen(443).await
}

Port 80 must be reachable for HTTP-01. The plugin listens there for challenges and (by default) redirects other traffic to HTTPS. Use .staging(true) / Acme::lets_encrypt_staging while testing.

CLI: acme status / acme renew (force). Events: CertificateIssued, CertificateRenewed, AcmeFailed.

License

MIT — see LICENSE.