From executable to first record.
Run one Trestle process with SQLite or PostgreSQL, create the first administrator, define a typed collection and write through the HTTP API.
Install and start
curl -fsSL https://trestle.dev/install.sh | sh
~/.local/bin/trestleTrestle listens on 127.0.0.1:8090 and creates its data directory on first start.
Choose SQLite or PostgreSQL
Open http://127.0.0.1:8090. SQLite is embedded and can continue directly to administrator creation. For PostgreSQL, select PostgreSQL, enter a connection URL for an empty PostgreSQL 16-18 database, and choose Test and use PostgreSQL. Trestle validates the server, persists the owner-only bootstrap configuration, and asks you to restart before credentials are shown.
postgres://trestle:CHANGE_ME@127.0.0.1:5432/trestle?sslmode=requireAfter restart, reload the dashboard and create the administrator. Competing setup requests produce exactly one administrator on either provider.
Define a collection
In Collections, create notes with required text fields named title and body. Trestle materializes provider-appropriate physical storage while keeping display names out of SQL identifiers.
Create a scoped credential
In Integrations, create a service credential with records:read and records:write. Copy the secret once.
Write and query
curl http://127.0.0.1:8090/api/v1/collections/notes/records \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"values":{"title":"First note","body":"Trestle is ready."}}'
curl 'http://127.0.0.1:8090/api/v1/collections/notes/records?limit=25' \
-H 'Authorization: Bearer YOUR_TOKEN'Terminate TLS, configure trusted proxies explicitly, protect SQLite files or PostgreSQL credentials, create a tested backup, and review the security boundary.