Docs / Getting Started / Quickstart
Documentation

Quickstart

Get a local opendray-v2 instance running in about five minutes.

2 min read Updated May 22, 2026 Source Edit History

Quickstart#

Get a local opendray-v2 instance running in about five minutes.

Prerequisites#

Tool Version Why
Go 1.25+ Backend + embedded web bundle
pnpm 10+ Web SPA build
Node.js 22+ pnpm runtime (build only — not needed at deploy time)
Docker recent Local Postgres for dev / tests (optional if you bring your own DB)

Verify:

[object Promise]

5-minute path#

[object Promise]

You should now have:

URL What
http://127.0.0.1:8770/admin/ Web admin SPA — log in with admin + the password you set
http://127.0.0.1:8770/api/v1/... REST + WebSocket API

Stop the server with Ctrl-C. Stop the Postgres with `systemctl stop postgresql # or brew services stop postgresql

Frontend hot-reload (optional)#

For iterating on the React SPA without rebuilding the Go binary:

[object Promise]

Vite proxies /api calls (REST + WebSocket) to :8770, so the dev experience is identical to production.

Using your own Postgres#

If you already have a Postgres 15+ instance, skip step 1 and edit config.toml instead:

[object Promise]

Required: pgvector extension#

Opendray's memory subsystem needs the pgvector extension. A locally-installed Postgres uses the pgvector/pgvector:pg17 image which preinstalls and auto-enables it, so no manual step there. For a BYO Postgres, install pgvector once with a superuser before running opendray migrate:

[object Promise]

After that, opendray's regular CRUD-only role can run migrations without needing further superuser access — migration 0011_memory just creates the memories table (the extension is already present).

Recommendations#

  • Create a project-scoped role with only the CRUD privileges opendray needs — never use postgres / superuser at runtime.
  • Rotate credentials out of band; don't commit them.
  • Connection pool size is configurable via [database].max_conns (default 16).
  • Supported Postgres versions: 15, 16, 17. The encrypted-backup subsystem additionally requires pg_dump / pg_restore matching the server's major version (see operator-guide.md [backup]).

Running the test suite#

[object Promise]

Optional: encrypted DB backups + data exports#

[object Promise]

Restart opendray serve; a Backups page appears in the admin sidebar (/backups) along with /export for zip-bundle data exports and imports. See docs/operator-guide.md §Backup for the full lifecycle.

Building a single distributable binary#

The repo ships a goreleaser config for cross-platform release builds:

[object Promise]

For tagged releases, goreleaser release produces a draft GitHub release; a maintainer reviews the notes and publishes.

Troubleshooting#

pnpm build fails / internal/web/dist is empty#

The Go binary uses //go:embed all:dist and refuses to start with an empty dist/. Run cd app/web && pnpm build and confirm the directory is populated. If you only need the API and want to skip the web build, run the Vite dev server (pnpm dev) instead.

go run ./cmd/opendray migrate reports connection refused#

Postgres is not running, or the DSN in config.toml is wrong. Check `systemctl is-active postgresql # should print active

go test ./internal/memory/summarizer/... says --- SKIP#

Expected behaviour. Those tests need a real Postgres; export OPENDRAY_DEV_DB_URL (see Running the test suite above) and re-run.

Port 5432 / 8770 already in use#

[object Promise]

Kill the conflicting process or change the port:

  • Postgres: edit your PG config (port in postgresql.conf) and update config.toml accordingly.
  • Gateway: edit listen = "127.0.0.1:8770" in config.toml (or set OPENDRAY_LISTEN).

Next steps#