The community hub behind b4, a DPI-circumvention
service for Linux routers. b4 routers publish, rate and download shared sets through a hub.
One image, two roles: serve runs a hub of your own with its moderation console, mirror
runs a child of the central hub at hub.b4core.app that serves the same signed catalogue
to your routers.
Tags: latest is the newest release, <version> (for example 1.0.0) a fixed one. Both
are built for linux/amd64 and linux/arm64. Full documentation, the Compose bundle and
the release notes: https://github.com/DanielLavrushin/b4hub
A signing key once, then the hub:
docker run --rm -v b4hub:/var/lib/b4hub lavrushin/b4hub keygen
docker run -d --name b4hub -v b4hub:/var/lib/b4hub -p 127.0.0.1:7100:7100 \
-e B4HUB_PUBLIC_URL=https://hub.example.net -e B4HUB_ADMIN_PASSWORD=change-me lavrushin/b4hub
The hub speaks plain HTTP on port 7100 and expects a TLS-terminating proxy in front that
forwards X-Forwarded-Proto: https; the moderation console is at /admin. The
Compose bundle adds a
Caddy front that obtains the certificate on its own.
A child of the central hub instead of a hub of your own:
docker run -d --name b4hub -v b4hub:/var/lib/b4hub -p 127.0.0.1:7100:7100 \
-e B4HUB_PUBLIC_URL=https://hub.example.net -e B4HUB_UPSTREAM=https://hub.b4core.app \
lavrushin/b4hub mirror --announce
Every flag has an environment variable:
| Variable | Meaning | Default |
|---|---|---|
B4HUB_DATA | Data directory: store, signing key, payloads, published catalogue, geo files | /var/lib/b4hub |
B4HUB_LISTEN | Listen address | 0.0.0.0:7100 |
B4HUB_PUBLIC_URL | Public base URL, announced to routers as the hub's address | none |
B4HUB_ADMIN_PASSWORD | Password of the moderation console; the console is off without it | none |
B4HUB_UPSTREAM | Parent hub for the mirror role | none |
B4HUB_UPSTREAM_KEY | Parent key id to pin; the key compiled into b4 is trusted when unset | none |
B4HUB_TRUSTED_PROXIES | Addresses or CIDRs whose X-Forwarded-For is trusted; loopback always is | none |
B4HUB_GEOSITE_URL, B4HUB_GEOIP_URL | Sources of the geo databases, downloaded daily | v2fly and b4 GeoIP releases |
Commands: serve (default), mirror, keygen, build, moderate, version.
Everything lives in the volume mounted at /var/lib/b4hub. hub.key in it is the signing
identity that routers trust; back it up, a lost key means every router has to be pointed at
a new one. The image runs as uid 7100, so a bind mount has to be owned by that uid.
Updating is docker pull lavrushin/b4hub and recreating the container; the store migrates
on start. docker run --rm lavrushin/b4hub version prints the hub version and the b4 source
tree it was built from.
Content type
Image
Digest
sha256:530d76f3c…
Size
10.3 MB
Last updated
about 4 hours ago
docker pull lavrushin/b4hub