Skip to content

feat(install): unattended setup for package-manager installs#980

Open
geodro wants to merge 1 commit into
mainfrom
feat/unattended-install-split
Open

feat(install): unattended setup for package-manager installs#980
geodro wants to merge 1 commit into
mainfrom
feat/unattended-install-split

Conversation

@geodro

@geodro geodro commented Jul 20, 2026

Copy link
Copy Markdown
Member

Debian and Ubuntu users install lerd from a Launchpad PPA (ppa:lerd/lerd), where a maintainer script runs as root and cannot answer the interactive sudo prompts a normal lerd install relies on. This adds the pieces that let a package finish setup without prompting, and teaches lerd to cooperate with a system-managed binary, while leaving the interactive install untouched.

lerd bootstrap --system does the root-level machine-global steps, the unprivileged-port sysctl, systemd linger, and the DNS sudoers rule. lerd install --unattended runs the rest non-interactively, defaults to managed .test, and generates the mkcert CA with TRUST_STORES=nss so it needs no sudo. lerd bootstrap --trust-ca installs that CA into the system trust store as root afterward. The companion lerd-deb package runs bootstrap --system, the per-user install, then bootstrap --trust-ca, so managed DNS and HTTPS come up with no password. Every unattended-only branch is gated behind the flag, so an ordinary lerd install behaves exactly as before.

The systemd unit templates hardcoded ~/.local/bin/lerd, which cannot resolve for a package that installs the binary to /usr/bin, so the unit ExecStart now carries the running binary's real path.

lerd update self-replaces a ~/.local/bin binary, which would fight apt on a packaged install, so it now recognises a binary under /usr and defers to the package manager.

Closes #979

Debian and Ubuntu users install lerd from a Launchpad PPA, where a maintainer script runs as root and cannot answer the interactive sudo prompts a normal lerd install relies on. This adds the pieces that let a package finish setup without prompting, while leaving the interactive install path unchanged.

lerd bootstrap --system performs the root-level, machine-global steps: the unprivileged-port sysctl, systemd linger, and the DNS sudoers rule. lerd install --unattended runs the rest non-interactively, defaults to managed .test, and generates the mkcert CA with TRUST_STORES=nss so it needs no sudo. lerd bootstrap --trust-ca then installs that CA into the system trust store as root. The postinst runs bootstrap --system, the per-user install, then bootstrap --trust-ca, so managed DNS and HTTPS come up with no password. Every unattended-only step is gated behind the flag, so an ordinary lerd install behaves exactly as before.

The systemd unit templates hardcoded ~/.local/bin/lerd, which cannot resolve for a package that installs the binary to /usr/bin. The unit ExecStart is now filled in with the running binary's real path, so the daemon starts from wherever lerd actually lives.

lerd update self-replaces a ~/.local/bin binary, which would fight apt on a packaged install, so it now recognises a binary under /usr and points the user at their package manager instead.
@geodro
geodro requested a review from a team as a code owner July 20, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cooperate with apt/deb installs: unattended install split and an apt-managed update guard

1 participant