Skip to content

Commit

Permalink
Fix OpenBSD build docs
Browse files Browse the repository at this point in the history
- OpenBSD 7.2 installs go 1.19 by default
- Doubt you can run nix so skip the makefile/nix build and just go build directly
  • Loading branch information
mikejsavage authored and juanfont committed Feb 26, 2023
1 parent cf7767d commit dcc246c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions docs/running-headscale-openbsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ describing how to make `headscale` run properly in a server environment.

1. Install from ports (Not Recommend)

As of OpenBSD 7.1, there's a headscale in ports collection, however, it's severely outdated(v0.12.4).
As of OpenBSD 7.2, there's a headscale in ports collection, however, it's severely outdated(v0.12.4).
You can install it via `pkg_add headscale`.

2. Install from source on OpenBSD 7.1
2. Install from source on OpenBSD 7.2

```shell
# Install prerequistes
# 1. go v1.19+: headscale newer than 0.17 needs go 1.19+ to compile
# 2. gmake: Makefile in the headscale repo is written in GNU make syntax
pkg_add -D snap go
pkg_add gmake
pkg_add go

git clone https://github.com/juanfont/headscale.git

Expand All @@ -33,7 +30,7 @@ latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)

git checkout $latestTag

gmake build
go build -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$latestTag" github.com/juanfont/headscale

# make it executable
chmod a+x headscale
Expand Down

0 comments on commit dcc246c

Please sign in to comment.