Source Events ↗

cloudpanel.certificate.install_requested

A Let's Encrypt certificate install was requested.

When
Before CloudPanel command hooks run for lets-encrypt:install:certificate.
Payload
JSON: { operation, command, args, siteType?, status?, duration_ms, error?, hook_handlers }.
Cancelable
No

Arguments are redacted before lifecycle payloads are emitted.

Use cases

  • Domain validation
  • Rate limiting ACME requests

Example

Registration and handler

Register

hook!(host, PluginEvent::CloudPanelCertificateInstallRequested, on_certificate_install_requested);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events