Web Server Integration
Serve local applications over browser-trusted HTTPS with Caddy, Nginx, or Traefik.
This guide uses 192.168.1.50 as a working example. Its certificate covers:
Replace the IP address, domain names, and file paths in the examples below with your own environment values.
For local development & LAN testing only
lancert private keys are publicly accessible by design: anyone can download the certificate and key for any supported private IP. While valid certificates eliminate browser warnings, they do not prove device identity. Do not use these certificates in production or on untrusted networks.
Download Certificate & Key
Trigger certificate issuance for your LAN IP via HTTP API, then download the PEM files:
Once ready, save the fullchain certificate and private key to your local config folder:
Configure Your Web Server
Select your reverse proxy or web server below to view the configuration snippet and reload command:
Point the tls directive in your Caddyfile at the downloaded certificate files:
Reload Caddy to apply the new certificates:
💡 --force tells Caddy to reload manually provided certificates even if the Caddyfile text hasn't changed.
Automated Renewal Script
lancert certificates renew automatically on our servers. To fetch updated certificates and reload your web server without unnecessary restarts, use this POSIX shell helper script:
Save script as ~/.local/bin/lancert-update:
Make it executable:
Run daily with cron or your preferred scheduler:
Verify the Served TLS Certificate
Check that your web server serves the certificate for your LAN hostname. You can open the hostname in a browser or test it with curl; use OpenSSL when you need to inspect certificate details or verify the SNI response:
💡 Any covered subdomain works as SNI servername (e.g. app.192-168-1-50.lancert.dev).
Troubleshooting & FAQ
The download returns HTTP 404
The certificate may not exist yet on the server. Send a POST https://lancert.dev/certs/{ip} request first, wait 5–10 seconds for Let's Encrypt issuance, and retry downloading.
The browser shows a certificate warning or mismatch
Ensure you are connecting using a *.lancert.dev hostname (e.g. https://192-168-1-50.lancert.dev) rather than accessing the raw IP address directly in the browser location bar.
The certificate was renewed on disk but the server still serves the old one
Your web server has not reloaded the new certificate files from disk. Execute a reload command (e.g. caddy reload --force or nginx -s reload) or ensure your Traefik file provider is set to watch: true.