LAN dev box (custom cert)
Run a dev box on an internal Linux server that isn't exposed to the internet. Let's Encrypt can't reach it, so you bring your own certificate (internal CA or wildcard) and Traefik serves it via its file provider. Everything else matches the public VPS flow; only the differences are shown here.
Before you start
- A PEM certificate + key covering the dev domain and its
vite./mail.subdomains — via SAN entries or a wildcard*.dev.corp.local. The key must be unencrypted (no passphrase). - Internal DNS (Active Directory, Pi-hole, Unbound…) resolving the domain + both subdomains to the box's LAN IP.
- Clients must trust the issuing CA (internal CA root installed, or a publicly-trusted wildcard).
Point internal DNS at the LAN IP:
A dev.corp.local → 10.0.0.20A vite.dev.corp.local → 10.0.0.20A mail.dev.corp.local → 10.0.0.20The DNS pre-flight still applies — these just resolve on internal DNS, not publicly.
Bootstrap with a custom certificate instead of
--email:gon server:dev:setup 10.0.0.20 \--alias=dev-lan \--cert=~/certs/dev.pem \--key=~/certs/dev-key.pem \--ghcr-token=ghp_xxxxxgon uploads the cert to
/opt/traefik/certsand configures Traefik's file provider. The server is recorded withcert_mode: custom.Add the project — it inherits
cert_mode: customautomatically (no Let's Encrypt resolver):gon server:dev:add-project demo \--host=dev-lan \--repo=rozklad/demo \--domain=dev.corp.localThis writes
deployment.tls: customintogon.json. Pass--tls=customexplicitly only if you need to override the server default.Verify (from a machine that trusts the CA and uses the internal DNS):
curl -I https://dev.corp.local/api/v1/healthcheck
Renewing the certificate
Re-run setup with the new PEM — it's idempotent and Traefik's file provider hot-reloads, no downtime:
gon server:dev:setup 10.0.0.20 \--cert=~/certs/dev.pem \--key=~/certs/dev-key.pem
Everything past this — adding developers, .env reloads, DB tunnel — is identical to the public VPS flow.