This document describes a production-grade Posh-ACME deployment for Apache running on Windows 11 with approximately 10 name-based virtual hosts. It covers installation, configuration, certificate layout, Apache runtime integration, and automated renewal.
All ACME state is stored under C:\ProgramData\Posh-ACME.
Apache reads certificates from a separate, stable runtime path.
powershell -ExecutionPolicy Bypass Install-Module Posh-ACME -Scope AllUsers Import-Module Posh-ACME
New-PAAccount -AcceptTOS Set-PAAccount -Contact mailto:admin@example.com
The ACME account key is stored encrypted using Windows DPAPI.
Stored at:
C:\ProgramData\Posh-ACME\config.json
View configuration:
Get-PAConfig
Each certificate is an order. Orders define:
Orders are stored under:
C:\ProgramData\Posh-ACME\acme-v02.api.letsencrypt.org\orders\
$GDKey = ConvertTo-SecureString "GODADDY_API_KEY" -AsPlainText -Force
$GDSecret = ConvertTo-SecureString "GODADDY_API_SECRET" -AsPlainText -Force
New-PAOrder `
-MainDomain site1.example.com `
-SubjectAltName site2.example.com,site3.example.com,site4.example.com `
-DnsPlugin GoDaddy `
-PluginArgs @{ GDKey=$GDKey; GDSecret=$GDSecret }
Submit-PAOrder
Apache reads certificates from a fixed runtime directory, for example:
C:\_amp\run\SSL\
├── group1\
│ ├── fullchain.pem
│ └── privkey.pem
├── group2\
│ ├── fullchain.pem
│ └── privkey.pem
└── group3\
├── fullchain.pem
└── privkey.pem
<VirtualHost *:443> ServerName site1.example.com SSLEngine on SSLCertificateFile "C:/_amp/run/SSL/group1/fullchain.pem" SSLCertificateKeyFile "C:/_amp/run/SSL/group1/privkey.pem" DocumentRoot "C:/_amp/host/site1/site" </VirtualHost>
After issuance or renewal, certificates are exported explicitly.
Get-PACertificate | Export-PACertFiles ` -CertFile "C:\_amp\run\SSL\group1\fullchain.pem" ` -KeyFile "C:\_amp\run\SSL\group1\privkey.pem" ` -Force
Save as C:\Scripts\PoshACME-Renew.ps1
Import-Module Posh-ACME
Submit-Renewal
Get-PACertificate | ForEach-Object {
Export-PACertFiles -PACertificate $_ `
-CertFile "C:\_amp\run\SSL\$($_.Subject)\fullchain.pem" `
-KeyFile "C:\_amp\run\SSL\$($_.Subject)\privkey.pem" `
-Force
}
Restart-Service Apache2.4
Action:
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\PoshACME-Renew.ps1"