- 02 Dec 2025
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
Manually Set Up Let's Encrypt with Polarity Server v5
- Updated on 02 Dec 2025
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
This process will allow the Polarity Server v5 to use Let’s Encrypt to automatically manage certificates.
Requirements:
An operational Polarity Server v5
A Public FQDN
A DNS A/AAAA record(s) for public FQDN
External access via port 443 and (optionally) port 80.
Process:
Bring down the Polarity Server containers.
cd /app ./down.sh
Copy Let’s Encrypt RSA CA certificate chain (PEM format) to
/app/certs/ca.3 certificates at the time of this writing (1x root cert, 2x intermediate certs).
isrgrootx1.pem,r10.pem, andr11.pem.Downloadable from here: Chains of Trust
Add the
ACME_ENABLEDenvironment variable to the/app/.envfile.echo "ACME_ENABLED=true" >> /app/.env
Open the
/app/caddy/config/Caddyfilefor editing.In the global block:
Remove the
auto_https offdeclaration.Add the following:
storage file_system { root /app/certs }
Resulting global block should look like this:
{ storage file_system { root /app/certs } }
In the main server block (starts with
:8443):Prepend the
:8443with{$POLARITY_HOSTNAME}, making it{$POLARITY_HOSTNAME}:8443.After the
tlsdeclaration:Remove the text
/config/server.crt /config/server.keyReplace with the following block:
{ key_type rsa2048 }
Result will look like this:
tls { key_type rsa2048 }
Save the changes to the
Caddyfileand close it.
Open the
/app/docker-compose.ymlfile for editing.Under the services:web:volumes block, find the line:
- ./certs/ca:/app/certs/ca:z
Change this line to this:
- ./certs:/app/certs:z
Save the changes to the
docker-compose.ymlfile and close it.
Back up the Platform certifcates.
cd /app/certs mv polarity.pem polarity.pem.bak mv polarity_key.pem polarity_key.pem.bak
Reset the standard permissions.
cd /app bin/polarity docker-set-permissions
Start the Polarity Server containers.
cd /app ./up.sh
Create a symbolic link from the new LetsEncrypt certificates to the Platform certificates.
cd /app/certs ln -s ./certificates/acme-v02.api.letsencrypt.org-directory/<<your.polarity.fqdn>>/<<your.polarity.fqdn>>.crt ./polarity.pem ln -s ./certificates/acme-v02.api.letsencrypt.org-directory/<<your.polarity.fqdn>>/<<your.polarity.fqdn>>.key ./polarity_key.pemNOTE: Be sure to replace the
<<your.polarity.fqdn>>placeholders with your Polarity Server’s FQDN.This should be the
POLARITY_HOSTNAMEvalue from the/app/.envfile.
The certs could be in a slightly different directory, but they will be in a child directory of
/app/certs/certificates/.
Your Polarity Server is now configured to use Let’s Encrypt for automated certificate management!