-- Leo's gemini proxy

-- Connecting to rawtext.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

=====================================================================
             ___       __  _ __
  ___  _____/ (_)___  / /_(_) /__
 / _ \/ ___/ / / __ \/ __/ / //_/
/  __/ /__/ / / /_/ / /_/ / ,<
\___/\___/_/_/ .___/\__/_/_/|_|
            /_/
=====================================================================

Superhighway84 on FreeBSD

2022-01-17 | #ipfs #smolweb #freebsd


Intro


A couple of weeks ago I saw Superhighway84[1] on HackerNews[2] and started to check it out, but didn't get very far. I finally spent some time to get it up and running on FreeBSD[3] which works, but requires a few additional steps.


1: https://%E3%83%9E%E3%83%AA%E3%82%A6%E3%82%B9.com/superhighway84/

2: https://news.ycombinator.com/item?id=29698412

3: https://www.freebsd.org


I wanted to get Superhighway84 on a spare RaspberryPi 3 running FreeBSD 13, primarily used for a Gemini Capsule in FreeBSD[4], since it doesn't have much traffic and is mostly idle.


4: https://www.ecliptik.com/Gemini-Capsule-in-a-FreeBSD-Jail/


> Superhighway84 is an USENET-inspired decentralized internet discussion system, featuring a retro text user interface and powered by IPFS and OrbitDB.


Superhighway84 [IMG]



IPFS on FreeBSD


Superhighway84 uses IPFS[5] as it's backend, making it fully decentralized. Reading through the setup docs, an `ipfs init` is required to build the initial `~/.ipfs` filesystem. There is a ipfs-go[6] in FreeBSD ports, but it doesn't seem to work, at least on arm64.


5: https://ipfs.io

6: https://www.freshports.org/sysutils/ipfs-go/


To work around this, building ipfs-go[7] from source is doable in a few steps,


7: https://github.com/ipfs/go-ipfs


First, install a few required packages to compile the `go` binaries


$ doas pkg install gcc gmake go openssl

Next, clone the source of `go-ipfs` and checkout the latest stable branch, otherwise there might be a version mismatch error on startup,


$ git clone https://github.com/ipfs/go-ipfs.git
$ cd go-ipfs
$ git checkout tags/v0.11.0

Set a few environment vars to compile with `gcc` and use `openssl`,


$ export PATH=$PATH:/usr/local/go/bin
$ export PATH=$PATH:$GOPATH/bin
$ export CGO_ENABLED=1
$ export GOTAGS=openssl

Build from source using `gmake`


$ doas gmake install
go version go1.17.5 freebsd/arm64
bin/check_go_version 1.15.2
plugin/loader/preload.sh > plugin/loader/preload.go
go fmt plugin/loader/preload.go >/dev/null
go install "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -ldflags="-X "github.com/ipfs/go-ipfs".CurrentCommit=67220edaa" ./cmd/ipfs

After the build is finished, copy the binary to `~/bin` and export it into the `$PATH` ,


$ cp ~/go/bin/ipfs ~/bin
$ export PATH="~/bin:$PATH"

Initialize `~/.ipfs` and set profile config to lowpower for running on a RaspberryPi


$ ipfs init --profile=lowpower

Building Superhighway84


With IPFS initialized, build Superhighway84 and copy the binary to `~/bin`. There are binary releases[8] for FreeBSD arm64, but compiling it from source is relatively easy as well.


8: https://github.com/mrusme/superhighway84/releases/tag/v0.0.11


$ git clone https://github.com/mrusme/superhighway84.git
$ cd superhighway84
$ go build .
$ cp superhighway64 ~/bin

Start up `superhighway84`, and wait a few minutes to fully sync. Using a "light" terminal theme is not recommened as it's difficult to read, and I recommended switching to a darker terminal theme.


$ superhighway84

Tags


freebsd

smolweb

ipfs

____________________________________________________________________


Home

-- Response ended

-- Page fetched on Sat Apr 27 23:13:03 2024