{"id":1367,"date":"2025-06-03T09:32:39","date_gmt":"2025-06-03T07:32:39","guid":{"rendered":"https:\/\/daisy-street.fr\/?p=1367"},"modified":"2025-06-03T09:32:39","modified_gmt":"2025-06-03T07:32:39","slug":"create-a-self-signed-ssl-certificate-on-windows","status":"publish","type":"post","link":"https:\/\/daisy-street.fr\/index.php\/2025\/06\/03\/create-a-self-signed-ssl-certificate-on-windows\/","title":{"rendered":"Create a Self-Signed SSL Certificate on Windows"},"content":{"rendered":"\n<p>You can create a self-signed certificate using <strong>PowerShell<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open <strong>PowerShell as Administrator<\/strong>.<\/li>\n\n\n\n<li>Run this command to create a new self-signed cert and export the key and certificate as <code>.pem<\/code> files:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">powershellCopyEdit<code># Define file paths\n$certPath = \"C:\\Users\\&lt;YourUser&gt;\\bolt-certs\"\nNew-Item -ItemType Directory -Path $certPath -Force\n\n# Create self-signed cert\n$cert = New-SelfSignedCertificate -DnsName \"localhost\" -CertStoreLocation \"cert:\\LocalMachine\\My\"\n\n# Export certificate (public part)\nExport-Certificate -Cert $cert -FilePath \"$certPath\\cert.pem\"\n\n# Export private key as PFX\n$pfxPath = \"$certPath\\cert.pfx\"\n$password = ConvertTo-SecureString -String \"YourStrongPassword\" -Force -AsPlainText\nExport-PfxCertificate -Cert $cert -FilePath $pfxPath -Password $password\n<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Convert the <code>.pfx<\/code> file to <code>.key<\/code> and <code>.pem<\/code> files (Docker usually wants <code>.key<\/code> and <code>.crt<\/code> or <code>.pem<\/code> separately).<br>You can do this using <strong>OpenSSL<\/strong> (if you have it installed, e.g., via <a class=\"\" href=\"https:\/\/git-scm.com\/downloads\">Git Bash<\/a> or [WSL]):<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">bashCopyEdit<code># Navigate to cert folder (adjust path)\ncd \/c\/Users\/&lt;YourUser&gt;\/bolt-certs\n\n# Extract key\nopenssl pkcs12 -in cert.pfx -nocerts -out key.pem -nodes -password pass:YourStrongPassword\n\n# Extract cert\nopenssl pkcs12 -in cert.pfx -clcerts -nokeys -out cert.pem -password pass:YourStrongPassword<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can create a self-signed certificate using PowerShell. powershellCopyEdit# Define file paths $certPath = &#8220;C:\\Users\\&lt;YourUser&gt;\\bolt-certs&#8221; New-Item -ItemType Directory -Path $certPath -Force # Create self-signed cert $cert = New-SelfSignedCertificate -DnsName &#8220;localhost&#8221; -CertStoreLocation &#8220;cert:\\LocalMachine\\My&#8221; # Export certificate (public part) Export-Certificate -Cert $cert -FilePath &#8220;$certPath\\cert.pem&#8221; # Export private key as PFX $pfxPath = &#8220;$certPath\\cert.pfx&#8221; $password = ConvertTo-SecureString -String &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/daisy-street.fr\/index.php\/2025\/06\/03\/create-a-self-signed-ssl-certificate-on-windows\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Create a Self-Signed SSL Certificate on Windows&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[247],"tags":[250,249,248,96],"class_list":["post-1367","post","type-post","status-publish","format-standard","hentry","category-security","tag-https","tag-openssl","tag-pem","tag-ssl"],"jetpack_publicize_connections":[],"featured_image_src":null,"author_info":{"display_name":"admin9483","author_link":"https:\/\/daisy-street.fr\/index.php\/author\/admin9483\/"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1367"}],"version-history":[{"count":1,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1367\/revisions"}],"predecessor-version":[{"id":1368,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/1367\/revisions\/1368"}],"wp:attachment":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/categories?post=1367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/tags?post=1367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}