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:
@@ -9,9 +9,13 @@ server and no cost. See [docs/PROTOCOL.md](docs/PROTOCOL.md).
|
||||
```
|
||||
go build -o bin/allmende ./cmd/allmende
|
||||
bin/allmende init # shows your 12-word recovery phrase once
|
||||
bin/allmende run --region u1x # u1x = Hamburg area; UI and API on http://127.0.0.1:8080
|
||||
bin/allmende run # UI and API on http://127.0.0.1:8080
|
||||
```
|
||||
|
||||
`run` prints a sign-in link. Open it and choose your region by place name
|
||||
("My listings" > "Regions"). To start with a region instead, add `--region u1x`
|
||||
(u1x = Hamburg area).
|
||||
|
||||
Open http://127.0.0.1:8080 to search. Your browser checks every listing's
|
||||
signature itself, so you don't have to trust the node it talks to. The UI is
|
||||
pre-built and embedded; Node.js is only needed to change it
|
||||
@@ -29,8 +33,9 @@ pasted coordinates (only a ~1 km area is published, never the address), and
|
||||
listings can be edited, renewed (30 days, manually) or deleted there.
|
||||
|
||||
**Regions** are the areas a node keeps listings for (3-character geohash cells,
|
||||
about 100 to 150 km wide). `--region` sets them the first time. After that the
|
||||
owner changes them in the browser: "My listings", then "Regions". Search a place
|
||||
about 100 to 150 km wide). A new node follows none: the owner chooses them in the
|
||||
browser, "My listings", then "Regions" (or `--region` sets them at the first start).
|
||||
Search a place
|
||||
by name (Bonn, Cologne, München, …); the page offers the place's own cell and any
|
||||
cell within about 40 km, and the change applies at once, without a restart. The
|
||||
choice is kept in `regions.json` in the data directory and wins over `--region`
|
||||
@@ -65,13 +70,13 @@ targets: `make build run test check e2e docker` (`make help` lists them).
|
||||
docker build -t allmende . # or: make docker
|
||||
docker run --rm -it -v allmende-data:/data allmende init # once; write down the 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 # Bonn (u1j) by default
|
||||
-p 127.0.0.1:8080:8080 -p 4001:4001 -p 4001:4001/udp allmende # then choose regions in the browser
|
||||
docker logs allmende | grep -A1 'Owner login' # the sign-in link
|
||||
```
|
||||
|
||||
The image runs as a non-root user and keeps its data in the `/data` volume.
|
||||
To change regions or add peers, replace the command (see the end of the
|
||||
`Dockerfile`). Publish port 8080 on `127.0.0.1` only: it also serves the owner
|
||||
Regions are chosen in the browser and kept in the volume. To start with some
|
||||
or to add peers, replace the command (see the end of the `Dockerfile`). Publish port 8080 on `127.0.0.1` only: it also serves the owner
|
||||
API. For public use put a TLS reverse proxy in front.
|
||||
|
||||
**NixOS** (flake)
|
||||
@@ -83,7 +88,7 @@ API. For public use put a TLS reverse proxy in front.
|
||||
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
allmende.nixosModules.default
|
||||
{ services.allmende = { enable = true; regions = [ "u1j" ]; openFirewall = true; }; }
|
||||
{ services.allmende = { enable = true; openFirewall = true; }; } # regions: choose in the browser, or regions = [ "u1j" ]
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user