Overview
Envloom provides automatic HTTPS for local development sites using a self-signed Certificate Authority (CA) and per-site SSL certificates. All certificates are trusted by Windows, eliminating browser warnings.Local CA
One-time CA generation, trusted system-wide
Per-Site Certs
Automatic certificate generation for each domain
Certificate Architecture
Certificate Hierarchy
Envloom uses a persistent local CA. Once trusted, all site certificates are automatically trusted without additional prompts.
Local Certificate Authority
CA Generation
The CA is created automatically the first time you enable SSL for any site:CA Certificate Details
Subject:- Common Name (CN): Envloom Local CA
- Organization (O): Envloom
- Type: Self-signed root CA
- Key: RSA (generated by rcgen crate)
- Validity: Long-lived (typically 10+ years)
- Usage: Certificate signing only
Site Certificate Generation
Automatic Creation
When you enable SSL for a site (or create a new site with SSL enabled):Create Site Certificate
Generate new certificate for the domain:
Site cert generation (src-tauri/src/lib.rs:2644-2674)
Subject Alternative Names (SANs)
Each site certificate includes multiple SANs:The wildcard SAN (
*.test) allows the certificate to be valid for any subdomain of the TLD, not just the specific domain.SSL Certificate Trust
Windows Trust Store
Envloom uses Windowscertutil to install the CA certificate:
Trust certificate (src-tauri/src/lib.rs:2677-2693)
- Adds CA to Current User → Trusted Root Certification Authorities
- Does not require administrator elevation
- Applies to all browsers using Windows certificate store (Edge, Chrome)
Browser Trust Verification
After enabling SSL:Check Certificate
Click the padlock icon in the address bar:
- Issuer: Envloom Local CA
- Subject: myapp.test
- Valid: ✓ (green padlock, no warnings)
Manual Trust (if needed)
If the CA is not automatically trusted:- Windows (Manual)
- Firefox
- Double-click
sites/ca/ca.crt - Click Install Certificate…
- Choose Current User
- Select Place all certificates in the following store
- Browse → Trusted Root Certification Authorities
- Click OK → Finish
SSL Management Actions
Enable SSL for Existing Site
Automatic Actions
Envloom:
- Generates site certificate (if not exists)
- Regenerates Nginx config with SSL directives
- Reloads Nginx
Regenerate Certificate
If a certificate expires or becomes corrupt:Regeneration does not recreate the CA. The same CA is reused, so browsers continue trusting new certificates.
Bulk SSL Actions (Tray Menu)
From the system tray, under Nginx submenu:- SSL all on: Enable SSL for all sites
- SSL all off: Disable SSL for all sites
Hosts File Management
Automatic Hosts Entries
Envloom managesC:\Windows\System32\drivers\etc\hosts to map domains to 127.0.0.1.
Envloom Hosts Block
Envloom creates a managed block in the hosts file:Example hosts file
Envloom respects the Herd block and will not modify entries inside it. Both tools can coexist peacefully.
Reconciliation Logic
UAC Elevation for Hosts
Modifying the hosts file requires admin rights:Manual Hosts Editing
If UAC elevation fails, manually add entries:- Open Notepad as Administrator
- Open
C:\Windows\System32\drivers\etc\hosts - Add lines:
- Save and close
Envloom will detect manual entries outside the block and move them inside on next reconciliation.
Nginx SSL Configuration
HTTP to HTTPS Redirect
When SSL is enabled, Envloom creates two server blocks:HTTP redirect + HTTPS server
Both HTTP and HTTPS share the same access and error logs.
Disabling SSL
When you disable SSL for a site:- Nginx config regenerated with only the HTTP server block (no redirect, no SSL directives)
- Certificate files remain in
sites/certs/(not deleted) - Nginx reloaded to apply changes
Security Considerations
CA Private Key Protection
Best practices:- Do not share
ca.keywith anyone - Do not commit to version control
- Keep it local to your development machine
- Consider adding
sites/ca/ca.keyto.gitignore
Certificate Validity
Self-signed certificates do not expire automatically like Let’s Encrypt:- Validity period: Controlled by rcgen library (typically 1-10 years)
- No auto-renewal: Manually regenerate if needed
- Browser warnings: Will appear if certificate becomes invalid or corrupted
Network Exposure
All Envloom services bind to
127.0.0.1 (localhost only). They are not accessible from other machines on your network.- Modify Nginx config to listen on
0.0.0.0 - Configure Windows Firewall to allow inbound on port 80/443
- Use your local IP address (e.g.,
https://192.168.1.100) - Import CA certificate on the remote device
CLI Commands
SSL management from CLI
Troubleshooting
Browser Shows “Not Secure”
- CA not trusted: Verify CA is in Windows certificate store
- Open
certmgr.msc(Certificate Manager) - Navigate to Trusted Root Certification Authorities → Certificates
- Look for “Envloom Local CA”
- Open
- Firefox: Import CA manually (see Manual Trust)
- Certificate expired: Regenerate certificate from site detail page
- Wrong certificate: Ensure Nginx is using correct
.crtand.keyfiles
”ERR_CERT_COMMON_NAME_INVALID”
- Domain mismatch: Verify site domain matches certificate CN/SAN
- Hosts file: Ensure domain resolves to
127.0.0.1 - Nginx config: Check
server_namedirective matches domain - Regenerate: Create new certificate for the correct domain
Hosts File Not Updating
- UAC denied: Accept elevation prompt when it appears
- File locked: Close editors that have hosts file open
- Permissions: Ensure you have admin rights
- Manual edit: Add entries manually as administrator
- DNS cache: Flush DNS cache:
ipconfig /flushdns
Certificate Generation Fails
- CA missing: Check
sites/ca/ca.crtandca.keyexist - Disk full: Ensure space in
sites/certs/directory - Permissions: Verify write access to
sites/directory - Recreate CA: Delete
sites/ca/and enable SSL to regenerate
Nginx SSL Test Fails
- Config syntax: Run
nginx -tmanually - Certificate paths: Verify paths in
sites/{domain}.confare correct - Missing files: Ensure
.crtand.keyexist insites/certs/ - Port conflict: Check if port 443 is already in use:
Related Documentation
Site Management
Create and link sites with SSL
Services
Manage Nginx service lifecycle