Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Rewrite documentation around reader tasks

d1f44d838966c0a4762073f12375ec7562582fdf · Keenan Nemetz · 21h ago · parent 9103f6a8

docs/configuration.md +178−47

@@ -1,12 +1,21 @@
1 1 # Configuration
2 2
3 Vole reads one TOML file at startup. The built-in defaults support a loopback
4 instance; configure a public URL and HTTPS before people use browser sign-in.
5 The Admin page's **Configuration** tab shows the effective values read-only.
3 Edit `vole.toml` to configure an instance, then restart `vole serve`. Start with
4 [Which config Vole reads](#which-config-vole-reads) if commands are not finding
5 the file you expect.
6 6
7 Use this guide for common setups. The
8 [configuration reference](reference/configuration.md) lists every setting,
9 default, limit, and refused combination.
7 | Goal | Section |
8 |---|---|
9 | Run a local instance | [A minimal config](#a-minimal-config) |
10 | Serve HTTPS directly | [Automatic HTTPS with ACME](#automatic-https-with-acme) |
11 | Serve HTTPS through a proxy | [Running behind a proxy](#running-behind-a-proxy) |
12 | Allow public account registration | [Open registration](#open-registration) |
13 | Use browser login in a local development checkout | [Development sign-in](#development-sign-in) |
14 | Bound storage, pushes, or anonymous traffic | [Set resource limits](#set-resource-limits) and [Anonymous read limits](#anonymous-read-limits) |
15
16 The [settings table](#settings) lists every setting and default;
17 [Refused configurations](#refused-configurations) lists combinations Vole
18 rejects at startup.
10 19
11 20 ## Which config Vole reads
12 21
@@ -53,7 +62,7 @@ listeners on loopback until you have chosen how to expose the service.
53 62 forced command that reaches `vole serve` over `ssh_socket`, and this process
54 63 binds no TCP port. The package ships the sshd drop-in at
55 64 `/usr/share/vole/sshd/vole.conf` and does not install it;
56 [Put sshd in front of Vole](deploy/index.md#put-sshd-in-front-of-vole) has the
65 [Put sshd in front of Vole](deploy/linux.md#put-sshd-in-front-of-vole) has the
57 66 four steps. `ssh_addr` then only names the host and port clone URLs
58 67 carry (sshd on 22 makes the port disappear), `ssh_user` names the account sshd
59 68 runs, and `ssh_public_host_key_file` is sshd's public key, which a CI job
@@ -118,7 +127,7 @@ acme_directory_url = "https://acme-staging-v02.api.letsencrypt.org/directory"
118 127 ```
119 128
120 129 Binding ports below 1024 requires `CAP_NET_BIND_SERVICE` in the packaged systemd
121 unit. See [Packages and upgrades](packaging.md#what-the-package-installs).
130 unit. See [Deploy on Linux](deploy/linux.md#what-the-package-installs).
122 131
123 132 ## Running behind a proxy
124 133
@@ -170,9 +179,9 @@ account's own contributor namespace. It does not grant access to private
170 179 repositories or shared branches. Vole refuses `runner`, `maintainer`, and `admin`
171 180 for self-registration.
172 181
173 Registration has no email verification. Leave it disabled unless the instance
174 intends to accept public accounts. See
175 [Accounts and access](accounts-and-access.md#browser-sign-in).
182 !!! warning "Registration has no email verification"
183 Leave it disabled unless the instance intends to accept public accounts. See
184 [Accounts and access](accounts-and-access.md#browser-sign-in).
176 185
177 186 ## Development sign-in
178 187
@@ -190,7 +199,11 @@ unset or loopback `public_url`. It rejects forwarded headers for this automatic
190 199 sign-in so a proxy cannot turn a remote request into a local one.
191 200
192 201 Signing out opts the browser out until you visit `/-/dev/login`. Remove
193 `dev_login` and restart to disable it. Never enable this on a shared instance.
202 `dev_login` and restart to disable it.
203
204 !!! danger "Never enable development sign-in on a shared instance"
205 It signs browser requests in without a passkey. Vole rejects it unless the
206 instance is loopback-only, but the setting itself is a development shortcut.
194 207
195 208 For a development checkout, `DEVELOPMENT.md` provides a complete throwaway
196 209 instance procedure.
@@ -210,56 +223,174 @@ repo_max_lfs_bytes = 10737418240
210 223
211 224 Other settings bound individual files, whole pushes, anonymous reads, SSH
212 225 connections, runner leases, and site caches. The
213 [settings table](reference/configuration.md#settings) lists all defaults, and
214 [anonymous read limits](reference/configuration.md#anonymous-read-limits)
226 [settings table](#settings) lists all defaults, and
227 [anonymous read limits](#anonymous-read-limits)
215 228 explains the HTTP transport controls.
216 229
217 ## Customizing the instance
218
219 `instance_repo` names a repository whose files customize the landing page and
220 appearance:
230 ## Settings
231
232 | Setting | Default | What it does |
233 |---|---:|---|
234 | `data_dir` | `"./data"` | Repositories, databases, stored files, logs, and the audit log |
235 | `secrets_key` | `<data_dir>/secrets.key` | Key that seals repository secrets; store backups apart from the database |
236 | `http_addr` | `"127.0.0.1:8080"` | Web and anonymous Git listener; with `https_addr`, ACME challenges and HTTPS redirects |
237 | `https_addr` | empty | Automatic HTTPS listener; setting it enables ACME |
238 | `ssh_addr` | `"127.0.0.1:2222"` | SSH listener in `tcp` mode, and the host and port clone URLs carry |
239 | `ssh_listen` | `"tcp"` | How SSH is served: `"tcp"` by this process, `"socket"` through the system sshd, `"none"` |
240 | `ssh_user` | `"git"` | Account in clone URLs; with `ssh_listen = "socket"`, the account sshd runs the forced command as |
241 | `ssh_public_host_key_file` | empty | sshd's public host key, which a CI job verifies when sshd is the front door |
242 | `ssh_max_connections` | `64` | Simultaneous SSH connections; excess connections close before handshake |
243 | `ssh_max_git_processes` | `16` | Git processes across all SSH connections |
244 | `ssh_handshake_timeout_seconds` | `20` | Maximum time for an SSH handshake |
245 | `ssh_socket` | `/run/vole/ssh.sock` on unix, `%ProgramData%\vole\ssh.sock` on Windows | Socket `vole ssh-exec` reaches `vole serve` on when sshd authenticates; keep it outside `data_dir` |
246 | `instance_name` | `"Vole"` | Instance heading, document titles, and brand-link accessible name |
247 | `instance_repo` | `"vole-instance"` | Repository that supplies instance customization; empty disables it |
248 | `public_url` | empty | Canonical browser origin; HTTPS enables passkey sign-in |
249 | `acme_email` | empty | Contact address sent to the certificate authority |
250 | `acme_domains` | empty | Certificate host names; empty uses the host in `public_url` |
251 | `acme_cache_dir` | `<data_dir>/acme` | ACME account key and certificates |
252 | `acme_directory_url` | Let's Encrypt production | ACME directory; use staging or a private CA for testing |
253 | `dev_login` | empty | Development-only loopback browser identity; requires `dev_only` |
254 | `dev_only` | `false` | Explicit acknowledgment required by `dev_login` |
255 | `open_registration` | `false` | Allow visitors to create accounts with passkeys; requires HTTPS `public_url` |
256 | `open_registration_role` | `"none"` | Instance-wide role for self-registered accounts on public repositories |
257 | `max_blob_bytes` | `104857600` (100 MiB) | Largest single file accepted in a push |
258 | `receive_max_bytes` | `1073741824` (1 GiB) | Largest whole push accepted by Git |
259 | `lfs_object_max_bytes` | `2147483648` (2 GiB) | Largest single LFS object |
260 | `lfs_warn_bytes` | `5242880` (5 MiB) | Warn about a larger binary committed outside LFS; `0` disables the warning |
261 | `repo_max_refs` | `0` (no limit) | Branches and tags in one repository |
262 | `repo_max_metadata_entries` | `0` (no limit) | Issue, change, comment, approval, and release files in one repository |
263 | `repo_max_metadata_bytes` | `0` (no limit) | Total size of metadata files in one repository |
264 | `repo_max_bytes` | `0` (no limit) | Git objects in one repository; further pushes are refused above it |
265 | `repo_max_lfs_bytes` | `0` (no limit) | LFS objects, CI logs, and run artifacts in one repository, checked on upload |
266 | `contributor_writes_per_hour` | `300` | Browser writes per hour for `contributor` accounts; trusted roles are not budgeted |
267 | `git_http` | `true` | Anonymous smart-HTTP clone, fetch, and LFS downloads |
268 | `git_http_max_concurrent` | `16` | Simultaneous anonymous reads; excess requests receive `503` and `Retry-After` |
269 | `git_http_max_per_client` | `8` | Simultaneous reads per client address; `0` disables this per-client rule |
270 | `git_http_client_ip_header` | empty | Trusted-proxy header containing the client address |
271 | `git_http_timeout_seconds` | `600` | Maximum duration of one anonymous clone, including its Git process |
272 | `lease_seconds` | `60` | Time a runner can hold a job without checking in before requeue |
273 | `max_jobs_per_repo` | `0` (no limit) | Jobs one repository may run at once |
274 | `pages_domain` | empty | Site suffix `<repo>.<pages_domain>`; empty disables sites |
275 | `pages_ref` | `"pages"` | Branch served as a repository website |
276 | `pages_procs` | `4` | Git reader processes per active site |
277 | `pages_cache_bytes` | `33554432` (32 MiB) | Memory used to cache site files |
278
279 `max_blob_bytes` applies to each file in a push. `receive_max_bytes` caps the
280 whole incoming pack before refs move.
281
282 ## Anonymous read limits
283
284 Smart HTTP serves anonymous clone, fetch, and LFS downloads. Pushes always use
285 SSH. The default limits bound both total and per-address work:
221 286
222 287 ```toml
223 instance_name = "Acme Forge"
224 instance_repo = "vole-instance"
288 git_http = true
289 git_http_max_concurrent = 16
290 git_http_max_per_client = 8
291 git_http_timeout_seconds = 600
225 292 ```
226 293
227 `vole admin init` creates the default private customization repository. An
228 instance admin can also scaffold it from **Admin → Configuration**. Push these
229 paths to change it:
294 A request above the global limit receives `503` and `Retry-After` rather than
295 joining a queue. `git_http_max_per_client = 0` disables only the per-address
296 rule. `git_http_timeout_seconds` bounds the whole clone and its Git process.
230 297
231 | Path | Purpose |
232 |---|---|
233 | `profile/README.md` | Public landing-page introduction |
234 | `profile/private/README.md` | Optional introduction for signed-in readers |
235 | `profile/custom.css` | Instance-wide style overrides |
236 | `profile/themes/<id>.css` | Selectable theme packs |
237 | `profile/favicon.svg` | Custom favicon |
238 | `assets/` | CSS, image, and font assets |
298 Behind a trusted proxy, `git_http_client_ip_header` identifies the header that
299 carries visitor addresses. Vole uses its last entry, which the nearest proxy
300 appends. The same address keys browser sign-in rate limits. Without a proxy,
301 leave the setting empty so clients cannot choose their own limit identity.
239 302
240 Set `instance_repo = ""` to disable customization. For theme syntax, design
241 tokens, file rules, and security boundaries, see
242 [Instance customization](reference/instance-customization.md).
303 Set `git_http = false` to remove the anonymous HTTP transport. SSH continues to
304 serve Git. HTTP LFS downloads are disabled with the transport, so `git lfs` can
305 report missing objects for clients that relied on them.
306
307 Release tarballs have a separate concurrency bound; the smart-HTTP timeout does
308 not apply to those downloads.
243 309
244 310 ## Refused configurations
245 311
246 `vole serve` reports invalid combinations before opening listeners. These include
247 unsafe development sign-in, registration without HTTPS, malformed public URLs,
248 invalid ACME settings, negative limits, and a whole-push limit below the
249 single-file limit. See the
250 [refused-configuration table](reference/configuration.md#refused-configurations).
312 Vole validates configuration before opening listeners and reports all detected
313 problems together.
314
315 | Refused when | Reason |
316 |---|---|
317 | `dev_login` without `dev_only` | Credential-free development sign-in must be explicit |
318 | `dev_login` with `https_addr` | Development sign-in cannot use a network HTTPS listener |
319 | `dev_login` with a non-loopback `public_url` | A published origin is not a development instance |
320 | `dev_login` with a non-loopback `http_addr` | Automatic sign-in is limited to the local machine |
321 | `open_registration` without an HTTPS `public_url` | WebAuthn credentials require a secure origin |
322 | `open_registration_role = "runner"` | Self-registration cannot grant CI trust or output publishing |
323 | `open_registration_role = "maintainer"` | Self-registration cannot grant shared-branch writes, triage, or secrets access |
324 | `open_registration_role = "admin"` | Self-registration cannot grant instance administration |
325 | `public_url` with a user, path, query, or fragment | The value must be an origin to which links can be appended |
326 | `pages_domain` that is not a bare DNS suffix | Site routing matches the request host against this suffix |
327 | `receive_max_bytes` below `max_blob_bytes` | No push could contain a permitted file |
328 | `https_addr` without `acme_domains` or `public_url` | Vole has no certificate host name |
329 | `acme_email` that is not one address | The certificate authority needs one contact address |
330 | `acme_directory_url` that is not HTTPS | Certificate renewal requires a secure directory URL |
331 | A negative size, lease, or limit | Negative resource limits are invalid |
332
333 ## Instance data
334
335 The data directory contains both authoritative state and derived indexes. Do not
336 treat every database as disposable.
337
338 There are two SQLite files. `instance.db` holds everything that has to be
339 restored together: accounts, keys, sessions, access rules, locks, release
340 channels, CI queue and history, and the sealed secret rows.
341 `index.db` is derived and can be rebuilt. `vole admin db list` prints them with
342 that classification.
343
344 Before release channels joined the account database, it was `data/users.db`; see
345 [Upgrade an installed server](install.md#upgrade-an-installed-server).
346
347 | Data | Where it lives | Can Vole rebuild it? |
348 |---|---|---|
349 | Repositories | `data/repos/<name>.git` | No; Git is the source |
350 | Issues, changes, approvals, and release pointers | The `vole` branch in each repository | No; Git is the source |
351 | CI runs, steps, queue state, artifact pointers, and contributor CI approvals | `data/instance.db` | No; back it up |
352 | Accounts, roles, keys, passkeys, sessions, access rules, locks, release channels, and sealed secrets | `data/instance.db` | No; back it up |
353 | Web, activity, and search indexes | `data/index.db` | Yes, with `vole admin index rebuild` |
354 | CI attempt logs | `data/logs/` | No; back them up |
355 | LFS files and build artifacts | `data/lfs/` | No; stored by content |
356 | Privileged-action history | `data/audit.log` | No; it is the audit record |
357 | Repository secrets | The `secrets` tables in `data/instance.db`, sealed by `data/secrets.key` | No; back up both and store the key separately |
358 | SSH host key | `data/ssh_host_ed25519_key` | No; back it up |
359 | ACME account key and certificates | `data/acme/` | No, but Vole can request new certificates |
360
361 Git holds repository and collaboration history. SQLite holds accounts, CI state,
362 release channels, and derived indexes. A clone does not contain accounts, permissions, CI history,
363 or stored artifacts. [Back up and restore](backup-and-restore.md#back-up-an-instance) turns this
364 inventory into a procedure.
365
366 ## Audit log
367
368 `data/audit.log` records roster and key changes, access rules, forced overrides,
369 admin commands, sessions, and pushes. Each tab-separated record has:
370
371 ```text
372 timestamp action actor subject detail
373 ```
374
375 Actions use lower-case dotted names such as `acl.update`, `push.force`,
376 `channel.set`, and `session.create`. Fields are escaped and capped at 4 KiB so
377 user-controlled text cannot add rows or columns. The file is owner-only (`0600`),
378 and Vole rejects unsafe file types and ownership.
251 379
252 ## What Vole stores
380 Privileged changes fail closed when their audit record cannot be written.
381 Ordinary pushes and web metadata writes are already durable in Git, so an audit
382 write failure is logged rather than making the accepted change appear rejected.
383 A log that cannot be opened safely prevents `vole serve` and `vole admin` from
384 starting.
253 385
254 `data_dir` contains repositories, account and CI databases, large files, logs,
255 indexes, secrets, and host keys. Some files are authoritative and others can be
256 rebuilt. [Instance data](reference/configuration.md#instance-data) is the storage
257 reference; [Back up an instance](operations.md#back-up-an-instance) turns it into
258 a procedure.
386 Instance admins can read paginated records at **Admin → Audit log**. Ship an
387 append-only copy to storage the Vole service account cannot modify. Anyone who
388 can write the local data directory can alter the local log.
259 389
260 390 ## Next
261 391
262 - [Deploy a server](deploy/index.md) — apply a public configuration on a new
392 - [Deploy on Linux](deploy/linux.md) — apply a public configuration on a new
263 393 machine.
264 394 - [Accounts and access](accounts-and-access.md) — grant roles and credentials.
265 - [Operations](operations.md) — back up, restore, and monitor the instance.
395 - [Backup and restore](backup-and-restore.md) — back up and restore an instance.
396 - [Customization](customization.md) — change the landing page, themes, and assets.