An open-source, self-hosted productivity platform unifying projects, workflows, task tracking, and knowledge management in a single lightweight binary.
Features • Quickstart • Production Deployment • Configuration • Documentation • Star History
Updated source package: Start with START_HERE.md for this version and IMPLEMENTATION_STATUS.md for its scope and validation limits. Published upstream images do not include these changes.
Trestle is built for developers, indie creators, and teams who want complete data ownership over their everyday work without SaaS bloat or telemetry.
It couples a high-performance Go (net/http) backend with a reactive Svelte 5 SPA frontend, compiled into a single static binary via go:embed. At runtime, it only requires a PostgreSQL database — zero Node.js runtime, zero CDN dependencies, and strict Content Security Policy.
- 🏢 Multi-Tenant Workspaces: Isolated workspaces with role-based permissions (
Owner,Admin,Member), custom workflow pipelines, and seamless switching. - 📋 Canonical Projects & Tasks: Atomic project-scoped keys (
API-1,WEB-42), custom priorities, due dates, estimates, and Markdown task descriptions. - 🔄 Dual Views (List & Kanban): Switch instantly between high-density tabular list views and visual drag-and-drop Kanban boards with inline status editing.
- 📐 Visual Diagrams & Whiteboards: Full-featured diagramming and infinite whiteboard sketching tools with vector shapes, sticky notes, connectors, freehand drawing, full import/export (.diagram.xml, .whiteboard.json), always-accessible properties palette, and Grid/List workspace views with last modified recency.
- 📚 Hierarchical Documents & Knowledge Base: Trilium-inspired 3-pane note system featuring a nested document tree, parent-child inheritance, bi-directional backlinks (
[[id|title]]), live markdown reader/editor, attributes inspector, revision history, and child-safe tree deletion. - ⏱️ Live Task Time Tracking & Pause: Persistent live stopwatch that survives browser restarts, start/pause/resume states, timesheet reporting, and project workload aggregations.
- 🗺️ Milestone Roadmaps & Planning: Interactive Gantt timelines, milestone completion math, progress tracking rails, and dedicated project resource planning.
- 🤖 Chat & Webhook Alerts: Real-time task notification cards sent to Telegram (with forum topic ID support), Discord, and Slack.
- 📦 Data Portability & Safety: JSON snapshots for workspaces and projects; PostgreSQL backups preserve complete database history. Permanent deletion with sub-tree safety and in-app modal confirmation.
- 🎨 Themeable & Accessible: Dark and light modes with 5 accent presets, custom avatars, spring motion, and shared accessibility-oriented controls. Final WCAG conformance is not verified.
Run Trestle locally with a single command. The runner automatically verifies prerequisites, checks ports, launches PostgreSQL, applies migrations, provisions the admin account, and starts the app:
git clone https://github.com/blackstart-labs/trestle.git && cd trestle && ./run.shgit clone https://github.com/blackstart-labs/trestle.git; cd trestle; .\run.ps1Access the app at http://127.0.0.1:3000 with the local credentials printed by the runner.
To stop the background database:
./run.sh stopOn a Linux host with Docker Compose, install the latest published Trestle release:
installer=$(curl -fsSL --proto '=https' --proto-redir '=https' https://github.com/blackstart-labs/trestle/releases/latest/download/trestle-install.sh) && bash -c "$installer"The installer verifies the deployment bundle, pulls the release image by
digest, and prompts for the first user and Workspace. Set up an HTTPS reverse
proxy before signing in, or set TRESTLE_DOMAIN to use the bundled Caddy
proxy. For rootless Podman, use
TRESTLE_RUNTIME=podman bash -c "$installer" in the same command. See
Operations & Deployment for Quadlet prerequisites,
proxy setup, backups, and upgrades on AMD64, ARM64, and RISC-V.
Upgrading an existing deployment? Inspect the running PostgreSQL container's
actual data mount and verify a logical backup before recreating it. Older README
examples mounted PostgreSQL 18 at /var/lib/postgresql/data, while the upstream
image stores its data under /var/lib/postgresql/18/docker by default.
Then set TRESTLE_IMAGE_TAG in .env and drop the build: key from your
Compose file, or keep building on the server itself. The prebuilt Hub image
marufsarker/trestle:latest is also usable.
See docs/operations.md for the full environment table, health probes, backups and troubleshooting.
Configure Trestle via environment variables:
| Setting | Default | Description |
|---|---|---|
DATABASE_URL |
Required | PostgreSQL connection URL (postgres://user:pass@host:5432/db). |
TRESTLE_BIND_ADDR |
127.0.0.1:3000 |
Socket address and port to bind the HTTP server. |
TRESTLE_MAX_DB_CONNECTIONS |
5 |
Maximum active database connections (range: 1–32). |
TRESTLE_DB_TIMEOUT_MS |
2000 |
Database pool query timeout in milliseconds. |
TRESTLE_DEV_MODE |
false |
When true, relaxes Secure cookie flag for loopback HTTP testing only. |
SESSION_TTL_HOURS |
336 |
Absolute session lifetime in hours (1–8760); the idle limit stays 12 hours. |
The static binary provides operator CLI commands:
./trestle migrate # Apply database schema migrations
./trestle bootstrap # Run initial admin account setup
./trestle adduser # Provision a new user with a workspace role
./trestle resetpassword # Securely reset a user's password
./trestle disableuser # Deactivate a user account
./trestle enableuser # Re-enable a user accountVisit the interactive user manual at tresstle.vercel.app for in-depth walkthroughs, shortcuts (⌘K), and guides:
- Architecture & Design — Monolith structure, boundaries, and data flow.
- REST API Reference — Complete endpoint specifications, CSRF defense, and envelopes.
- Database Schema — PostgreSQL tables, indices, and migration lifecycles.
- Boards: Diagrams & Whiteboards — Visual editing, Grid/List layouts, vector export, and architecture.
- Documents & Knowledge Base — Trilium-inspired 3-pane note hierarchy, backlinks, and markdown editor.
- Operations & Backups — Reverse proxies (Caddy, Nginx), backups, and recovery.
- Design System & Tokens — Semantic tokens, motion curves, and accessibility.
Trestle is licensed under the GNU Affero General Public License v3 (AGPL-3.0).
