Certificates¶
Use SSL certificates to secure web access and connections to virtual desktops with viewers.
If you do not configure Let's Encrypt parameters, IsardVDI generates a default self-signed generic certificate during the initial installation. Browsers will prompt you to accept this certificate on first access to the IsardVDI web interface.
If you configure the Let's Encrypt domain parameters in isardvdi.cfg, IsardVDI generates a certificate for you and renews it automatically. Ensure that server ports 80 and 443 remain open for external access through this domain. If no certificate is present, IsardVDI generates a new self-signed certificate for default use.
You can also use your own certificate by replacing the auto-generated /opt/isard/certs/default/chain.pem with your concatenated certificate.
This configuration works for all flavors (portal, video, all-in-one) because they all use the same certificate configuration.
Certificate Types and Setup¶
IsardVDI supports three types of SSL certificates:
1. Self-Signed Certificates (Default)¶
- Generated automatically when no other certificate is configured.
- Best for: Testing, development, and private networks.
- Location:
/opt/isard/certs/default/chain.pem - Browser warning: Users will see security warnings and must manually accept the certificate.
2. Let's Encrypt Certificates (Recommended for Public Access)¶
- Automatically generated and renewed when properly configured.
- Best for: Production deployments with public domain access.
- Requirements:
- A public domain name pointing to your server.
- Ports 80 and 443 accessible from the internet.
- A valid email address for Let's Encrypt notifications.
Configuration in isardvdi.cfg:
DOMAIN=your-domain.com
ACME_EMAIL=admin@your-domain.com
# Optional: ACME CA to use (default is "letsencrypt"). See ACME_SERVER in isardvdi.cfg.example
#ACME_SERVER="letsencrypt"
# Optional: Separate domain for video hypervisor flavour
VIDEO_DOMAIN=video.your-domain.com
Renewal: Automatic daily renewal at 2:00 AM (Alpine Linux default schedule).
Important information: If you initially started with self-signed certificates and want to switch to Let's Encrypt, you must remove the existing certificates first:
docker-compose down
rm -rf /opt/isard/certs/default/*
# Update your isardvdi.cfg with DOMAIN and ACME_EMAIL
docker-compose up -d
3. Custom/Commercial Certificates¶
- Manual installation of certificates from Certificate Authorities.
- Best for: Enterprise environments with existing PKI infrastructure.
- Supports: Commercial certificates, internal CA certificates, and wildcard certificates.
Spice certificates must be self-signed. They are autogenerated and distributed automatically to auto-registered hypervisors. They are kept in the /opt/isard/certs/viewers folder.
Manage certificates¶
Certificates are stored in the /opt/isard/certs/ directory. This directory always contains a self-signed or Let's Encrypt certificate named chain.pem.
If you are using self-signed or auto-generated Let's Encrypt certificates, no further action is required.
You can set your own certificate as described previously. Follow this guide to generate your custom xxxxx-chain.pem from your certificates.
Custom Certificate Installation¶
To install your own certificate, replace the auto-generated certificate:
# Stop IsardVDI
docker-compose down
# Remove existing certificates
rm -rf /opt/isard/certs/default/*
# Create your concatenated certificate as chain.pem
cat server-cert.pem server-key.pem > /opt/isard/certs/default/chain.pem
# Restart IsardVDI
docker-compose up -d
Commercial Certificate Example¶
For commercial certificates, include the intermediate chain:
# domain.crt: domain certificate
# intermediate.pem: intermediate certificate
# domain.key: private key
docker-compose down
rm -rf /opt/isard/certs/default/*
cat domain.crt intermediate.pem domain.key > /opt/isard/certs/default/chain.pem
docker-compose up -d
External Let's Encrypt Certificate¶
If you have a Let's Encrypt certificate obtained externally (not auto-generated by IsardVDI):
docker-compose down
rm -rf /opt/isard/certs/default/*
cat fullchain.pem privkey.pem > /opt/isard/certs/default/chain.pem
docker-compose up -d
Custom Certificate for All Flavours¶
All IsardVDI flavours (portal, video, all-in-one, hypervisor) use the same certificate configuration. There is no separate video certificate; all web traffic uses the same chain.pem file.
Examples with certificates from vendors¶
Commercial certificate¶
Place your concatenated certificate with the correct name in /opt/isard/certs/default/ (replace everything already in that folder).
Then, restart the portal (or video) container.
You can now connect to the IsardVDI server using the qualified CN provided with your certificate.
NOTE: Wildcard certificates have also been validated with this procedure to work as expected. See the example below:
Example wildcard SSL Certificate¶
For example, suppose you have a wildcard commercial certificate from a company (for instance, you bought *.isardvdi.com). You will receive the following files from your certificate provider:
- wildcard_isardvdi_com.crt.pem: Your wildcard certificate.
- GandiStandardSSLCA2.pem: The intermediate certificate from the certificate authority (in this example, the provider is gandi.net). You can always obtain this certificate by copying or exporting it from your browser's certificate settings or downloading it from their webpage (i.e.
wget -q -O - https://www.gandi.net/static/CAs/GandiStandardSSLCA2.pem). - wildcard_isardvdi_com.key.pem: Your certificate private key.
You need to transform these files into the chain:
cat wildcard_isardvdi_com.crt.pem GandiStandardSSLCA2.pem wildcard_isardvdi_com.key.pem > /opt/isard/certs/default/chain.pem
Then, restart the portal (or video) container.
Reset certificates¶
If you replaced certificates and the system is not working, reset the certificates to restart the process. Manually manipulating files in the certificate folder can confuse the IsardVDI certificate processing code.
You can restore IsardVDI functionality with self-signed certificates by removing the /opt/isard/certs/default folder. IsardVDI will generate and configure a new self-signed certificate. The procedure is as follows:
If you have a backup of your previously working self-signed certificates, you can copy them to the default certificate folder instead of generating new ones.
Troubleshoot certificates¶
Common issues and solutions¶
Certificate not loading or browser shows self-signed certificate¶
-
Check that the certificate file exists and is valid:
-
Restart the portal container:
-
Check the container logs:
Let's Encrypt certificate generation failed¶
-
Verify that the domain points to your server:
-
Check that ports 80 and 443 are accessible:
-
Check ACME logs and the working directory:
Continuous HAProxy reloads (fixed in recent versions)¶
If you experience frequent HAProxy reloads, ensure you are using the latest version. Recent versions include:
- Single cron daemon for certificate renewals (no dual crond processes)
- No reload for certificate changes: changed certificates are hot-updated by cert-watch instead of reloading HAProxy
Certificate renewal issues¶
- Renewal time: Automatic renewal attempts occur daily at 2:00 AM.
- Force a renewal check:
Emergency certificate reset¶
Reset to self-signed certificates¶
If certificates become corrupted or unusable:
# Stop IsardVDI
docker-compose down
# Remove only default certificates (BACKUP FIRST if needed)
sudo rm -rf /opt/isard/certs/default/*
# Restart - will generate new self-signed certificates
docker-compose up -d
Reset Let's Encrypt certificates¶
If Let's Encrypt certificates are expired or corrupted and you want to request fresh ones:
# Stop IsardVDI
docker-compose down
# Remove both default and acme certificates (BACKUP FIRST if needed)
sudo rm -rf /opt/isard/certs/default/*
sudo rm -rf /opt/isard/certs/acme/*
# Ensure DOMAIN and ACME_EMAIL are configured in isardvdi.cfg
# Restart - will request new ACME (Let's Encrypt) certificates
docker-compose up -d
Internal Certificate Flow¶
This section explains how certificates work internally in IsardVDI.
Certificate Processing Pipeline¶
- Container Startup (
haproxy-docker-entrypoint.sh) - Checks if
/certs/chain.pemexists and is non-empty. - If missing, triggers
auto-generate-certs.shto create a self-signed certificate. -
If present, uses the existing certificate.
-
ACME Flow (
acme-management.sh) - Runs after HAProxy starts if
ACME_EMAILis set. - The domain (
ACME_DOMAIN) is taken fromDOMAIN(orVIDEO_DOMAINfor the video flavour). - The CA is
ACME_SERVER(defaults toletsencrypt). LETSENCRYPT_EMAILis accepted as a legacy alias forACME_EMAIL.- Registers the ACME account for
ACME_EMAILagainstACME_SERVER. - Issues the certificate via
acme-generate-cert.sh(acme.sh --issue --stateless). -
Retries until HAProxy serves the certificate.
-
Certificate Deployment (
acme-generate-cert.sh) - Deploys the certificate using acme.sh's HAProxy deploy-hook (
acme.sh --deploy --deploy-hook haproxy). - Writes the certificate to
/certs/chain.pem. -
Hot-updates HAProxy through its stats socket (
/var/run/haproxy.sock). -
Automatic Renewal (acme.sh cron)
- Scheduled daily at 2:00 AM (
0 2 * * * acme.sh --cron --home /etc/acme). - Logs are written to
/var/log/acme-cron.log. -
Automatically re-deploys via the HAProxy deploy-hook on successful renewal.
-
HAProxy Integration
- SSL Termination: HAProxy binds to port 8443 with
ssl crt /certs/chain.pem. - TCP Frontend: Port 443 routes traffic to the SSL terminator on port 8443.
- Certificate watch: a
cert-watchprocess periodically checks the certificates HAProxy serves and hot-updates them through the HAProxy admin socket when they change on disk. It polls because inotify does not fire for a certificate renewed on the other side of an NFS mount.CERT_WATCH=offdisables it. - No restart needed: a changed certificate file is applied without restarting the container.
File Locations and Purposes¶
| Path | Purpose |
|---|---|
/opt/isard/certs/default/chain.pem |
Primary certificate. Auto-generated (self-signed), Let's Encrypt, or custom. |
/opt/isard/certs/acme/ |
acme.sh working directory (mounted as /etc/acme). |
/opt/isard/certs/viewers/ |
Spice certificates for hypervisors. |
Certificate Logic¶
IsardVDI certificate handling follows a simple logic:
- HAProxy always uses
/opt/isard/certs/default/chain.pem. chain.pemcontains:- Let's Encrypt certificate (if
ACME_EMAILis configured and obtained successfully). - Custom certificate (if you replaced the auto-generated one).
- Self-signed certificate (auto-generated as a fallback).
Please refer to the certificates troubleshooting section for additional troubleshooting.