Files
volumen/docs/configuration.md
T

58 lines
1.7 KiB
Markdown
Raw Normal View History

# Configuration
> Status: initial draft. Field semantics are finalised as the loader lands.
volumen is configured by a single **TOML** file. By default it lives at
`/etc/volumen/config.toml` and is auto-generated on first start. CLI flags
passed to `volumen serve` override the file.
## Example `config.toml`
```toml
[server]
host = "0.0.0.0"
port = 9090
# Directory containing your Markdown posts.
content_dir = "/var/lib/volumen/posts"
[site]
title = "My Blog"
description = "A blog powered by volumen."
base_url = "https://example.com"
language = "en"
author = "Anonymous"
# Site-wide fediverse handle (e.g. Mastodon). Exposed as `fediverse_creator`
# on /api/volumen/site and used as the fallback in the RSS / JSON feeds when
# a post does not set its own `fediverse_creator` frontmatter field. Leave
# empty if you do not publish to the fediverse.
fediverse_creator = "@you@example.social"
[admin]
# scrypt hash produced by `volumen hash-password`.
password_hash = ""
# Secret used to sign session cookies. Leave empty to auto-generate per start
# (sessions reset on restart).
session_key = ""
# Session lifetime in seconds (default 24h).
session_ttl = 86400
```
## CLI overrides
```bash
volumen serve --config /etc/volumen/config.toml \
--content ./posts \
--host 127.0.0.1 \
--port 9000
```
## Why TOML
- **First-class dates** — `date = 2026-01-15` is a real date, not a string.
- **Explicit typing** — no YAML-style implicit coercion (`no` → false, etc.).
- **No whitespace pitfalls** — indentation is not significant.
The same format is used for post frontmatter; see the post format section in
the project [`README.md`](../README.md).