01

Install the CLI

The CLI supports macOS, Linux, and Windows on amd64 and arm64.

Download a prebuilt binary from the GitHub releases page. Choose the archive for your operating system and architecture: .tar.gz for macOS or Linux, or .zip for Windows. Extract it and add the directory containing lancert (or lancert.exe on Windows) to your PATH.

On macOS or Linux, you can also install with Homebrew:

Terminal
brew install lucor/tap/lancert

Or install it from source with Go:

Terminal
go install go.lucor.dev/lancert-cli/cmd/lancert@latest
02

Get the certificate

Choose how to provide the address of your local app:

Run the CLI without an address to see supported addresses on active network interfaces and how to select one:

Terminal
$ lancert
Detected private IP addresses:

  172.17.15.11 (utun4)
  192.168.0.9  (en0)

Choose the address where your application is reachable, then run:
  lancert <address>

On the first request, the CLI asks you to accept the certificate authority’s terms. It then prints the hostname and the paths to the certificate and private key.

Output
Certificate issued.
Hostname: quiet-otter.lancert.dev
Certificate: /home/alice/.config/lancert/certs/quiet-otter.lancert.dev/fullchain.pem
Private key: /home/alice/.config/lancert/certs/quiet-otter.lancert.dev/privkey.pem

The example paths above are for Linux. On Windows, the CLI stores its data under %AppData%\lancert; on macOS, under ~/Library/Application Support/lancert. Use the paths printed on your machine.

Let’s Encrypt is the default. Its terms, policies, and rate limits apply. Use --acme-directory to select another ACME-compatible certificate authority.

The certificate covers the assigned hostname and its wildcard. Your ACME account, certificate, and private key stay on your machine.

03

Configure your web server

Use the certificate and private key paths printed by the CLI in your web server configuration.

Caddyfile
quiet-otter.lancert.dev, *.quiet-otter.lancert.dev {
    tls /path/to/fullchain.pem /path/to/privkey.pem
    reverse_proxy 127.0.0.1:3000
}

Reload with caddy reload --force --config /path/to/Caddyfile.

04

Renew the certificate

Schedule the CLI renewal command with cron or systemd on Linux, launchd on macOS, or Task Scheduler on Windows:

Terminal
lancert renew

The CLI checks every locally managed certificate and renews those that are due.

↗

Prefer another ACME client?

Use Lancert’s DNS service with Lego, Certbot, acme.sh, or another compatible client. Open the ACME client guide.