- Rust 87.2%
- Nix 6.8%
- HTML 2.8%
- CSS 1.7%
- Shell 0.6%
- Other 0.8%
- wasmBindgenVersion: 0.2.114 -> 0.2.125 (match Cargo.lock) - sqlx workspace dep: 0.8 -> 0.9 (eliminate dual-version conflict with pgvector 0.4.2 which requires sqlx >=0.9) |
||
|---|---|---|
| .agents | ||
| .cargo | ||
| .claude/skills | ||
| .forgejo/workflows | ||
| .skills | ||
| crates | ||
| csr | ||
| docs | ||
| e2e | ||
| logo | ||
| modules | ||
| nix | ||
| public | ||
| scripts | ||
| website | ||
| .envrc | ||
| .gitignore | ||
| .woodpecker.yml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| input.css | ||
| justfile | ||
| LICENSE | ||
| plinth.code-workspace | ||
| plinth.toml | ||
| README.md | ||
A full-stack personal website platform built with Leptos 0.8
Plinth is a self-hosted personal website and blog engine written in Rust. It uses Leptos for server-side rendering with WASM hydration, Postgres with pgvector for storage and similarity search, and supports authoring blog posts in both Markdown and Typst.
Features
- SSR + WASM hydration — fast initial load with an interactive client
- Postgres + pgvector — relational storage with HNSW-indexed semantic search
- Semantic search — fastembed vector embeddings, cosine similarity in pgvector
- Typst support — author blog posts in Typst with image management
- Immich integration — self-hosted image proxy with aggressive caching
- NixOS module — declarative deployment with systemd hardening
- Plausible analytics — optional self-hosted Plausible integration
- OTLP observability — built-in OpenTelemetry tracing export
Quick start
git clone https://codeberg.org/caniko/plinth.git
cd plinth
nix develop
./scripts/dev-db.sh start
cargo leptos watch
Open http://127.0.0.1:3000 to see your site. Publish a post:
cargo run --package plinth-cli -- publish my-post.md
Build for production
nix build .#plinth
Output in result/:
| Path | Contents |
|---|---|
result/bin/plinth-server |
Server binary (sets LEPTOS_SITE_ROOT automatically) |
result/site/ |
Compiled WASM, JS, CSS, and static assets |
result/share/plinth/plinth.toml |
Example configuration |
Architecture
Four-crate Rust workspace:
| Crate | Role |
|---|---|
plinth-shared |
Domain types shared across all crates |
plinth-client |
Leptos frontend compiled to WASM |
plinth-server |
Axum HTTP server with Leptos SSR, Kameo actors, Postgres + pgvector |
plinth-cli |
CLI for publishing Markdown/Typst articles with embeddings |
Configuration
Configure via plinth.toml and environment variables. See the configuration docs for all options.
Key environment variables:
| Variable | Default | Purpose |
|---|---|---|
DATABASE_URL |
postgres://plinth:plinth@localhost:5432/plinth |
Postgres connection URL |
PLINTH_API_KEY |
dev_api_key_change_in_production |
Admin API auth |
LEPTOS_SITE_ADDR |
127.0.0.1:3000 |
Server bind address |
IMMICH_API_URL |
— | Immich server URL for image proxy |
PLAUSIBLE_DOMAIN |
— | Site domain for Plausible analytics |
PLAUSIBLE_SCRIPT_URL |
— | URL to self-hosted Plausible script |
Deployment
Plinth includes a NixOS module for declarative deployment:
{
services.plinth = {
enable = true;
settings.site.name = "My Site";
};
}
See deployment docs for full options including reverse proxy setup.
CI
Woodpecker CI on Codeberg runs nix flake check (build, clippy, fmt, and tests) on every push and pull request.
License
EUPL-1.2. See LICENSE for details.