Several servers, own domains, hosted-ready server #7

Merged
backmeupplz merged 1 commit from multi-server into main 2026-11-27 17:42:25 +00:00
Owner

Lets people use any server at any address, hold accounts on several servers at once, and prepares the server for a hosted plan.

  • Login bound to the server's address. The login signature now covers the server host (crypto::server_host), so a look-alike server can't relay a login to the real one for a session. The server checks PLAINTEXT_URL when set, else the Host header. Test: a relayed login gets 401, and a server behind a proxy accepts only its public name.
  • GET /v1/info (public): {version, open, setup}, so apps know whether to ask for an invite or setup code.
  • PLAINTEXT_SIGNUP=open for a hosted server. Anyone can sign up and anyone can invite (invites still verify both sides). /v1/users lists only your invitees, while admins still see everyone. The new GET /v1/users/{name} is an exact lookup, used by pin_user, so there's no customer list to leak. Off by default.
  • CLI multi-account. plaintext account ls/use/remove, --account / PLAINTEXT_ACCOUNT, and per-account keychain and secret files. Old config.json still loads. Tested by hand against two local servers (one invite-only, one open).
  • Own link page. PLAINTEXT_LINK_PAGE, defaulting to getplaintext.org/s. Never the vault server itself.
  • Docs: DESIGN "Servers and accounts", UI.md server picker (Plaintext Cloud / my own server) and multi-account, README server settings table.

Breaking: v0.1 CLIs can't log in to this server. There are no users yet.

🤖 Generated with Claude Code

Lets people use any server at any address, hold accounts on several servers at once, and prepares the server for a hosted plan. - **Login bound to the server's address.** The login signature now covers the server host (`crypto::server_host`), so a look-alike server can't relay a login to the real one for a session. The server checks `PLAINTEXT_URL` when set, else the `Host` header. Test: a relayed login gets 401, and a server behind a proxy accepts only its public name. - **`GET /v1/info`** (public): `{version, open, setup}`, so apps know whether to ask for an invite or setup code. - **`PLAINTEXT_SIGNUP=open`** for a hosted server. Anyone can sign up and anyone can invite (invites still verify both sides). `/v1/users` lists only your invitees, while admins still see everyone. The new `GET /v1/users/{name}` is an exact lookup, used by `pin_user`, so there's no customer list to leak. Off by default. - **CLI multi-account.** `plaintext account ls/use/remove`, `--account` / `PLAINTEXT_ACCOUNT`, and per-account keychain and secret files. Old `config.json` still loads. Tested by hand against two local servers (one invite-only, one open). - **Own link page.** `PLAINTEXT_LINK_PAGE`, defaulting to getplaintext.org/s. Never the vault server itself. - **Docs:** DESIGN "Servers and accounts", UI.md server picker (Plaintext Cloud / my own server) and multi-account, README server settings table. Breaking: v0.1 CLIs can't log in to this server. There are no users yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- core: login signature covers the server host (crypto::server_host); a look-alike server can't relay a login. Server checks PLAINTEXT_URL or the Host header.
- server: Config {setup_code, open_signup, hosts}; GET /v1/info; GET /v1/users/{name}; on open servers /v1/users lists only your invitees (admins: everyone) and anyone may invite.
- client: Transport::host, server_info, LINK_PAGE; pin_user uses the exact lookup.
- cli: several accounts (config.json keeps a list; old format still loads), plaintext account ls/use/remove, --account / PLAINTEXT_ACCOUNT, per-account secret files, PLAINTEXT_LINK_PAGE.
- docs: DESIGN "Servers and accounts", UI server picker (Plaintext Cloud / my own server) and accounts, README server settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
backmeupplz deleted branch multi-server 2026-11-27 17:42:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
backmeupplz/plaintext!7
No description provided.