vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Document the front door and the way back
bca53bdad334204063f07158d6885e22c5eb69ff · Keenan Nemetz · 16d ago · parent 09610c0f
Document the front door and the way back The feature works and the package ships it, and nothing tells anyone. This is the deploy page's half: what the front door is, the four steps that turn it on, how to move an existing instance onto it, and how to move back. The cloud-init templates needed a fix before they could be documented. SSH_PORT alone only changed the port in the rendered configuration, so SSH_PORT=22 produced a machine whose Vole tried to bind 22 itself and lost to sshd on first boot. The render now derives the mode as well: ssh_listen = "socket", sshd's public host key, and a guarded block in the first-boot script that appends the Include, runs sshd -t and reloads. It checks for the drop-in before writing anything, so a package without it leaves the machine alone with the reason in the log. The rest is prose that had to become true: the port table, the troubleshooting rows, the clone-URL examples, the runner's remote and ssh-keyscan in both shapes, the backup gaining /etc/ssh/ssh_host_ed25519_key, the quickstart saying why a development instance stays on 2222, and the architecture page naming one SSH endpoint per instance as a choice. check-deploy renders both flavours and fails if the front-door one still names 2222, keeps Vole's own listener, or omits any of the three settings that make the mode work. The design document itself is not here: #268 has not landed, so there is no docs/design/sshd-front-door.md on main to mark accepted, and a link to it would be a dead relative link that check-links rejects.
docs/operations.md +18−3
| @@ -11,8 +11,10 @@ Before exposing an instance, verify these controls: | |||
| 11 | 11 | - **Set the canonical origin.** Use an HTTPS `public_url` and either Vole's ACME | |
| 12 | 12 | listener or a TLS proxy that preserves `Host`. See | |
| 13 | 13 | [Configuration](configuration.md#public-url). | |
| 14 | - **Separate the write transport.** Firewall SSH on port 2222 to people who need | ||
| 15 | it. Keep shell SSH and Vole Git SSH as distinct services. | ||
| 14 | - **Separate the write transport.** Firewall Vole's SSH port to the people who | ||
| 15 | push, and put the system sshd in front rather than exposing a second listener: | ||
| 16 | with the [front door](deploy/index.md#put-sshd-in-front-of-vole) there is one | ||
| 17 | SSH endpoint on 22, and `vole serve` binds no TCP port of its own. | ||
| 16 | 18 | - **Remove development shortcuts.** Leave `dev_only`, `dev_login`, and | |
| 17 | 19 | `open_registration` disabled unless their policies are intentional. | |
| 18 | 20 | - **Set quotas on shared instances.** Repository ref, metadata, object, and LFS | |
| @@ -82,6 +84,16 @@ cp data/ssh_host_ed25519_key backup/ | |||
| 82 | 84 | cp data/audit.log backup/ | |
| 83 | 85 | ``` | |
| 84 | 86 | ||
| 87 | `data/ssh_host_ed25519_key` is the host key of Vole's own SSH listener. An | ||
| 88 | instance running the [sshd front door](deploy/index.md#put-sshd-in-front-of-vole) | ||
| 89 | presents sshd's key instead, so also copy the private half of that: | ||
| 90 | |||
| 91 | ```sh | ||
| 92 | sudo install -m 0600 /etc/ssh/ssh_host_ed25519_key backup/ssh_host_ed25519_key.sshd | ||
| 93 | ``` | ||
| 94 | |||
| 95 | A restore that omits it hands every CI job a key that cannot verify the host. | ||
| 96 | |||
| 85 | 97 | `data/index.db` is derived and does not need a backup: `vole admin index rebuild` | |
| 86 | 98 | recreates it from the repositories. Every other database was copied by | |
| 87 | 99 | `vole admin db backup`. | |
| @@ -134,6 +146,7 @@ data/repos/ | |||
| 134 | 146 | data/lfs/ | |
| 135 | 147 | data/logs/ | |
| 136 | 148 | data/ssh_host_ed25519_key | |
| 149 | ssh_host_ed25519_key.sshd # copied from /etc/ssh, front-door instances only | ||
| 137 | 150 | data/audit.log | |
| 138 | 151 | data/acme/ # when automatic HTTPS is enabled | |
| 139 | 152 | ``` | |
| @@ -289,7 +302,9 @@ accounts, secrets, logs, or artifacts. | |||
| 289 | 302 | ||
| 290 | 303 | ## Security notes | |
| 291 | 304 | ||
| 292 | - Restrict the SSH host key and `secrets.key` to the Vole user. Vole creates | ||
| 305 | - Restrict the SSH host key and `secrets.key` to the Vole user. With the sshd | ||
| 306 | front door the host key is sshd's, and `/etc/ssh/ssh_host_ed25519_key` belongs | ||
| 307 | to root. Vole creates | ||
| 293 | 308 | private state with restrictive modes and tightens unsafe world access at | |
| 294 | 309 | startup; startup fails if it cannot protect a required secret. | |
| 295 | 310 | - Encryption at rest protects a copied secrets database without its key. It does | |