Repository navigation
Closed
Description
What's missing
Flock runs on macOS and Windows only. On Linux the CLI builds, but flock install, the DNS setup, the CA trust and the background daemon have no Linux implementation, so a Linux machine can't serve *.test sites.
Approach
The daemon and the web server are already portable. What needs adding is the per-OS setup, in internal/cli/install_linux.go and internal/dns.
- The CLI is named
flock-phpon Linux. util-linux shipsflock(1)on every distribution, and scripts rely on it. - The daemon:
- It runs as a systemd user unit, falling back to a detached process without a user manager.
setcap cap_net_bind_servicelets it bind ports 80 and 443 without root.
- DNS:
- A small root unit,
flock-dns.service, creates a dummy linkflock0and routes~testto Flock's DNS server through systemd-resolved (resolvectl dns/domain). It doesn't use a globalresolved.confdrop-in, which breaks when the user hasDNS=servers. - A NetworkManager drop-in keeps NetworkManager off
flock0. - The daemon reports when the link drifts.
- A small root unit,
- Trust: the CA goes into the system store (
update-ca-certificates/update-ca-trust) and into NSS databases (Chrome, Firefox). - Packages: the Linux builds of PHP and the services are in feat: Linux packages: PHP for x64 and arm64, and the mirrored services binaries#24–ci: let pull requests that change only docs/ through without an issue, and label them #28.
Status
The implementation is ready as #12. I opened it before the issue rule existed and will add Fixes #<this> to it once this is approved.
- @Nejcc tested it end to end on Arch, Ubuntu 24.04 and Fedora with real systemd and NetworkManager: 0 failures on the current head.
- His harness is test(linux): an end-to-end test of Flock on Arch, Ubuntu and Fedora #22, and his install.sh and AUR package are feat(linux): install.sh, release archives and an AUR package for the Linux CLI #16.
- With approval I'll rebase feat: Linux support for the CLI and daemon #12 on today's
develop, which has a conflict inbuild.yml, and add the Linux part ofdocs/installation.md.
Activity
Nejcc commentedon Oct 21, 2026
Confirming: I ran the #22 harness against #12's current head on Arch, Ubuntu 24.04 and Fedora (real systemd + NetworkManager), with 0 failures. Once this is approved I'll add
Refs #48to #16 and #22, and re-run the harness after #12 is rebased onto develop.Nejcc commentedon Oct 21, 2026
Here is my own run of the harness from #22, as promised.
ebfdb53(feat: Linux support for the CLI and daemon #12 head9d631eeplus only the feat(linux): install.sh, release archives and an AUR package for the Linux CLI #16 packaging and test(linux): an end-to-end test of Flock on Arch, Ubuntu and Fedora #22 harness commits, no Go changes)tools/linux-e2e/run.sh arch ubuntu fedoradummymodule loadedResult: 116 checks passed, 0 failed (arch 0 failed, ubuntu 0 failed, fedora 0 failed), exit 0.
Full output
lukas-frey commentedon Oct 26, 2026
I replied inside the PR.