Vole docs Source

Configuration#

Edit vole.toml to configure an instance, then restart vole serve. Start with Which config Vole reads if commands are not finding the file you expect.

Goal Section
Run a local instance A minimal config
Serve HTTPS directly Automatic HTTPS with ACME
Serve HTTPS through a proxy Running behind a proxy
Allow public account registration Open registration
Use browser login in a local development checkout Development sign-in
Bound storage, pushes, or anonymous traffic Set resource limits and Anonymous read limits

The settings table lists every setting and default; Refused configurations lists combinations Vole rejects at startup.

Which config Vole reads#

Local commands look for a configuration in this order:

  1. --config <path>
  2. the VOLE_CONFIG environment variable
  3. ./vole.toml
  4. ~/.vole/vole.toml

If no file exists, Vole uses its built-in defaults with data_dir = "./data". Initializing ~/.vole therefore lets later commands find the instance from any directory. For another location, run from that directory or name the file:

vole admin --config /srv/vole/vole.toml account list
export VOLE_CONFIG=/srv/vole/vole.toml
vole admin account list

Restart vole serve after editing the file.

A minimal config#

A local instance needs only paths and listeners:

data_dir = "./data"
http_addr = "127.0.0.1:8080"
ssh_addr = "127.0.0.1:2222"
# public_url = "https://forge.example.com"

vole admin init --dir <directory> writes a commented starter file. Keep the listeners on loopback until you have chosen how to expose the service.

SSH surface#

ssh_listen decides what serves SSH.

The socket mode expects sshd to run vole ssh-authorized-keys for a dedicated git account whose shell is vole ssh-shell. The package creates that account and ships the sshd configuration; it does not install it, because editing somebody's sshd is their decision. If the machine already has a git account, the package leaves it alone and you set ssh_user to an account you create.

Public URL#

Set public_url to the canonical browser origin:

public_url = "https://forge.example.com"

Vole uses this origin for passkeys, generated issue and release links, clone URLs, LFS downloads, and Go module import prefixes. Browser sign-in is enabled only when this is an HTTPS URL. The SSH clone host also comes from this name; its port comes from ssh_addr.

Do not add a path, query, fragment, or user information. Set public_url on every non-loopback instance so generated links do not depend on a request's untrusted Host header.

Automatic HTTPS with ACME#

Vole can obtain and renew certificates without a separate proxy. Point DNS at the server, make TCP ports 80 and 443 reachable, and set:

http_addr  = ":80"
https_addr = ":443"
public_url = "https://forge.example.com"
acme_email = "admin@example.com"

Setting https_addr enables ACME. The HTTPS listener serves the forge; the HTTP listener answers HTTP-01 challenges and redirects everything else to HTTPS. Vole also tries TLS-ALPN-01 on port 443. Certificates are obtained on first use and renewed in the background.

By default, the certificate name comes from public_url. To serve multiple names, list each one explicitly:

acme_domains = ["forge.example.com", "git.example.com"]

Wildcard certificates are not supported. ACME state, including the account key, lives in data/acme/ by default. Back it up with the instance.

While testing, avoid production certificate rate limits:

acme_directory_url = "https://acme-staging-v02.api.letsencrypt.org/directory"

Binding ports below 1024 requires CAP_NET_BIND_SERVICE in the packaged systemd unit. See Deploy on Linux.

Running behind a proxy#

When a proxy terminates TLS, leave https_addr empty and keep Vole on loopback:

http_addr = "127.0.0.1:8080"
public_url = "https://forge.example.com"
git_http_client_ip_header = "X-Forwarded-For"

Preserve the original Host header so repository and site routing work:

server {
  listen 443 ssl;
  server_name forge.example.com;
  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://127.0.0.1:8080;
  }
}

git_http_client_ip_header tells Vole which trusted-proxy header carries the client address. Vole uses the last entry, appended by the nearest proxy, for per-client read and sign-in limits. Leave the setting empty without a trusted proxy; otherwise clients can supply the header themselves.

Expose ssh_addr directly or through a TCP proxy. HTTP proxy configuration does not forward Git over SSH.

Open registration#

By default, only an instance admin creates accounts. To allow visitors to register their own passkeys:

public_url = "https://forge.example.com"
open_registration = true
open_registration_role = "contributor"

Registration requires an HTTPS public_url. The instance-wide role applies only to public repositories; contributor allows discussion and pushes to the account's own contributor namespace. It does not grant access to private repositories or shared branches. Vole refuses runner, maintainer, and admin for self-registration.

Registration has no email verification

Leave it disabled unless the instance intends to accept public accounts. See Accounts and access.

Development sign-in#

For a loopback-only development server, you can sign browser requests in without a passkey:

http_addr = "127.0.0.1:8080"
dev_only = true
dev_login = "you"

Vole requires dev_only, a loopback HTTP listener, no HTTPS listener, and an unset or loopback public_url. It rejects forwarded headers for this automatic sign-in so a proxy cannot turn a remote request into a local one.

Signing out opts the browser out until you visit /-/dev/login. Remove dev_login and restart to disable it.

Never enable development sign-in on a shared instance

It signs browser requests in without a passkey. Vole rejects it unless the instance is loopback-only, but the setting itself is a development shortcut.

For a development checkout, DEVELOPMENT.md provides a complete throwaway instance procedure.

Set resource limits#

The defaults target a small team. Set repository quotas explicitly on a shared instance; their default of 0 means no limit:

repo_max_refs = 500
repo_max_metadata_entries = 2000
repo_max_metadata_bytes = 33554432
repo_max_bytes = 5368709120
repo_max_lfs_bytes = 10737418240

Other settings bound individual files, whole pushes, anonymous reads, SSH connections, runner leases, and site caches. The settings table lists all defaults, and anonymous read limits explains the HTTP transport controls.

Settings#

Setting Default What it does
data_dir "./data" Repositories, databases, stored files, logs, and the audit log
secrets_key <data_dir>/secrets.key Key that seals repository secrets; store backups apart from the database
http_addr "127.0.0.1:8080" Web and anonymous Git listener; with https_addr, ACME challenges and HTTPS redirects
https_addr empty Automatic HTTPS listener; setting it enables ACME
ssh_addr "127.0.0.1:2222" SSH listener in tcp mode, and the host and port clone URLs carry
ssh_listen "tcp" How SSH is served: "tcp" by this process, "socket" through the system sshd, "none"
ssh_user "git" Account in clone URLs; with ssh_listen = "socket", the account sshd runs the forced command as
ssh_public_host_key_file empty sshd's public host key, which a CI job verifies when sshd is the front door
ssh_max_connections 64 Simultaneous SSH connections; excess connections close before handshake
ssh_max_git_processes 16 Git processes across all SSH connections
ssh_handshake_timeout_seconds 20 Maximum time for an SSH handshake
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
instance_name "Vole" Instance heading, document titles, and brand-link accessible name
instance_repo "vole-instance" Repository that supplies instance customization; empty disables it
public_url empty Canonical browser origin; HTTPS enables passkey sign-in
acme_email empty Contact address sent to the certificate authority
acme_domains empty Certificate host names; empty uses the host in public_url
acme_cache_dir <data_dir>/acme ACME account key and certificates
acme_directory_url Let's Encrypt production ACME directory; use staging or a private CA for testing
dev_login empty Development-only loopback browser identity; requires dev_only
dev_only false Explicit acknowledgment required by dev_login
open_registration false Allow visitors to create accounts with passkeys; requires HTTPS public_url
open_registration_role "none" Instance-wide role for self-registered accounts on public repositories
max_blob_bytes 104857600 (100 MiB) Largest single file accepted in a push
receive_max_bytes 1073741824 (1 GiB) Largest whole push accepted by Git
lfs_object_max_bytes 2147483648 (2 GiB) Largest single LFS object
lfs_warn_bytes 5242880 (5 MiB) Warn about a larger binary committed outside LFS; 0 disables the warning
repo_max_refs 0 (no limit) Branches and tags in one repository
repo_max_metadata_entries 0 (no limit) Issue, change, comment, approval, and release files in one repository
repo_max_metadata_bytes 0 (no limit) Total size of metadata files in one repository
repo_max_bytes 0 (no limit) Git objects in one repository; further pushes are refused above it
repo_max_lfs_bytes 0 (no limit) LFS objects, CI logs, and run artifacts in one repository, checked on upload
contributor_writes_per_hour 300 Browser writes per hour for contributor accounts; trusted roles are not budgeted
git_http true Anonymous smart-HTTP clone, fetch, and LFS downloads
git_http_max_concurrent 16 Simultaneous anonymous reads; excess requests receive 503 and Retry-After
git_http_max_per_client 8 Simultaneous reads per client address; 0 disables this per-client rule
git_http_client_ip_header empty Trusted-proxy header containing the client address
git_http_timeout_seconds 600 Maximum duration of one anonymous clone, including its Git process
lease_seconds 60 Time a runner can hold a job without checking in before requeue
max_jobs_per_repo 0 (no limit) Jobs one repository may run at once
pages_domain empty Site suffix <repo>.<pages_domain>; empty disables sites
pages_ref "pages" Branch served as a repository website
pages_procs 4 Git reader processes per active site
pages_cache_bytes 33554432 (32 MiB) Memory used to cache site files

max_blob_bytes applies to each file in a push. receive_max_bytes caps the whole incoming pack before refs move.

Anonymous read limits#

Smart HTTP serves anonymous clone, fetch, and LFS downloads. Pushes always use SSH. The default limits bound both total and per-address work:

git_http = true
git_http_max_concurrent = 16
git_http_max_per_client = 8
git_http_timeout_seconds = 600

A request above the global limit receives 503 and Retry-After rather than joining a queue. git_http_max_per_client = 0 disables only the per-address rule. git_http_timeout_seconds bounds the whole clone and its Git process.

Behind a trusted proxy, git_http_client_ip_header identifies the header that carries visitor addresses. Vole uses its last entry, which the nearest proxy appends. The same address keys browser sign-in rate limits. Without a proxy, leave the setting empty so clients cannot choose their own limit identity.

Set git_http = false to remove the anonymous HTTP transport. SSH continues to serve Git. HTTP LFS downloads are disabled with the transport, so git lfs can report missing objects for clients that relied on them.

Release tarballs have a separate concurrency bound; the smart-HTTP timeout does not apply to those downloads.

Refused configurations#

Vole validates configuration before opening listeners and reports all detected problems together.

Refused when Reason
dev_login without dev_only Credential-free development sign-in must be explicit
dev_login with https_addr Development sign-in cannot use a network HTTPS listener
dev_login with a non-loopback public_url A published origin is not a development instance
dev_login with a non-loopback http_addr Automatic sign-in is limited to the local machine
open_registration without an HTTPS public_url WebAuthn credentials require a secure origin
open_registration_role = "runner" Self-registration cannot grant CI trust or output publishing
open_registration_role = "maintainer" Self-registration cannot grant shared-branch writes, triage, or secrets access
open_registration_role = "admin" Self-registration cannot grant instance administration
public_url with a user, path, query, or fragment The value must be an origin to which links can be appended
pages_domain that is not a bare DNS suffix Site routing matches the request host against this suffix
receive_max_bytes below max_blob_bytes No push could contain a permitted file
https_addr without acme_domains or public_url Vole has no certificate host name
acme_email that is not one address The certificate authority needs one contact address
acme_directory_url that is not HTTPS Certificate renewal requires a secure directory URL
A negative size, lease, or limit Negative resource limits are invalid

Instance data#

The data directory contains both authoritative state and derived indexes. Do not treat every database as disposable.

There are two SQLite files. instance.db holds everything that has to be restored together: accounts, keys, sessions, access rules, locks, release channels, CI queue and history, and the sealed secret rows. index.db is derived and can be rebuilt. vole admin db list prints them with that classification.

Before release channels joined the account database, it was data/users.db; see Upgrade an installed server.

Data Where it lives Can Vole rebuild it?
Repositories data/repos/<name>.git No; Git is the source
Issues, changes, approvals, and release pointers The vole branch in each repository No; Git is the source
CI runs, steps, queue state, artifact pointers, and contributor CI approvals data/instance.db No; back it up
Accounts, roles, keys, passkeys, sessions, access rules, locks, release channels, and sealed secrets data/instance.db No; back it up
Web, activity, and search indexes data/index.db Yes, with vole admin index rebuild
CI attempt logs data/logs/ No; back them up
LFS files and build artifacts data/lfs/ No; stored by content
Privileged-action history data/audit.log No; it is the audit record
Repository secrets The secrets tables in data/instance.db, sealed by data/secrets.key No; back up both and store the key separately
SSH host key data/ssh_host_ed25519_key No; back it up
ACME account key and certificates data/acme/ No, but Vole can request new certificates

Git holds repository and collaboration history. SQLite holds accounts, CI state, release channels, and derived indexes. A clone does not contain accounts, permissions, CI history, or stored artifacts. Back up and restore turns this inventory into a procedure.

Audit log#

data/audit.log records roster and key changes, access rules, forced overrides, admin commands, sessions, and pushes. Each tab-separated record has:

timestamp   action  actor   subject detail

Actions use lower-case dotted names such as acl.update, push.force, channel.set, and session.create. Fields are escaped and capped at 4 KiB so user-controlled text cannot add rows or columns. The file is owner-only (0600), and Vole rejects unsafe file types and ownership.

Privileged changes fail closed when their audit record cannot be written. Ordinary pushes and web metadata writes are already durable in Git, so an audit write failure is logged rather than making the accepted change appear rejected. A log that cannot be opened safely prevents vole serve and vole admin from starting.

Instance admins can read paginated records at Admin → Audit log. Ship an append-only copy to storage the Vole service account cannot modify. Anyone who can write the local data directory can alter the local log.

Next#

↑↓ to move Enter to open Esc to close