Install
Fernwick builds to a single static binary for Linux (amd64, arm64) and FreeBSD (amd64). Go 1.22 or newer is required.
With the Go toolchain
go install fernwick.hi97.top/fernwick/cmd/[email protected]
sudo install -m 0755 "$(go env GOPATH)/bin/fernwick" /usr/local/bin/
Cross-compiling for a small VPS works as usual: GOOS=linux GOARCH=arm64 go install …
Run it under systemd
[Unit]
Description=Fernwick log shipper
After=network-online.target
[Service]
ExecStart=/usr/local/bin/fernwick --config /etc/fernwick/fernwick.toml
StateDirectory=fernwick
DynamicUser=yes
SupplementaryGroups=adm systemd-journal
Restart=on-failure
[Install]
WantedBy=multi-user.target
Save it as /etc/systemd/system/fernwick.service, then systemctl enable --now fernwick.
Check that it works
fernwick check --config /etc/fernwick/fernwick.toml
journalctl -u fernwick -f
Next: write a config file.