Choose even the first region in the browser; update Docker and Nix

A node now starts without any region (it only helps others connect, and
prints a hint). The owner's sign-in link leads straight to the Regions page
when none is followed, visitors get a notice instead of an empty search, and
status always lists regions as an array.

The Docker image no longer pins Bonn, the NixOS module no longer requires
regions, and the VM test now starts without any, chooses the first region
over the API and checks it survives a restart. README and the init hint
follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 10:41:10 +01:00
co-authored by Claude Sonnet 5.5
parent fd439710df
commit e3d0c12e55
18 changed files with 212 additions and 71 deletions
+8 -3
View File
@@ -4,7 +4,12 @@
# docker build -t allmende .
# docker run --rm -it -v allmende-data:/data allmende init # once; shows the recovery phrase
# docker run -d --name allmende -v allmende-data:/data \
# -p 127.0.0.1:8080:8080 -p 4001:4001 -p 4001:4001/udp allmende # run (Bonn by default)
# -p 127.0.0.1:8080:8080 -p 4001:4001 -p 4001:4001/udp allmende # run
# docker logs allmende # the owner sign-in link; open it and choose your regions
#
# The node starts without a region: the owner picks one by place name in the
# browser ("My listings" > "Regions") and it applies at once. The choice is kept
# in the volume (/data/regions.json) and wins over --region from then on.
#
# The HTTP port also serves the owner API, which the admin token protects, so
# publish it on 127.0.0.1 only and put a TLS proxy in front for public use.
@@ -30,9 +35,9 @@ EXPOSE 8080 4001/tcp 4001/udp
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s \
CMD wget -qO- http://127.0.0.1:8080/api/v1/status >/dev/null || exit 1
ENTRYPOINT ["allmende"]
# Override the whole command to change regions or add peers, e.g.
# Override the whole command to start with regions or add peers, e.g.
# docker run ... allmende run --http 0.0.0.0:8080 \
# --listen /ip4/0.0.0.0/tcp/4001 --listen /ip4/0.0.0.0/udp/4001/quic-v1 \
# --region u1j --region u1h --bootstrap /ip4/203.0.113.5/tcp/4001/p2p/<peer id>
# A bootstrap node adds --public (and needs a public address).
CMD ["run", "--http", "0.0.0.0:8080", "--listen", "/ip4/0.0.0.0/tcp/4001", "--listen", "/ip4/0.0.0.0/udp/4001/quic-v1", "--region", "u1j"]
CMD ["run", "--http", "0.0.0.0:8080", "--listen", "/ip4/0.0.0.0/tcp/4001", "--listen", "/ip4/0.0.0.0/udp/4001/quic-v1"]